diff options
Diffstat (limited to 'gtk/gtkmenu.c')
-rw-r--r-- | gtk/gtkmenu.c | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/gtk/gtkmenu.c b/gtk/gtkmenu.c index 44266daaf1..c792b4e55d 100644 --- a/gtk/gtkmenu.c +++ b/gtk/gtkmenu.c @@ -1373,11 +1373,8 @@ static void gtk_menu_tearoff_bg_copy (GtkMenu *menu) { GtkMenuPrivate *priv = menu->priv; - GtkWidget *widget; gint width, height; - widget = GTK_WIDGET (menu); - if (priv->torn_off) { GdkWindow *window; @@ -3039,16 +3036,12 @@ gtk_menu_draw (GtkWidget *widget, GdkRectangle border; GdkRectangle upper; GdkRectangle lower; - GdkWindow *window; gint arrow_space; - GtkStateFlags state; GtkBorder menu_border; menu = GTK_MENU (widget); priv = menu->priv; context = gtk_widget_get_style_context (widget); - window = gtk_widget_get_window (widget); - state = gtk_widget_get_state_flags (widget); get_arrows_visible_area (menu, &border, &upper, &lower, &arrow_space); get_menu_border (widget, &menu_border); @@ -3084,9 +3077,9 @@ gtk_menu_draw (GtkWidget *widget, upper.width, upper.height); gtk_render_arrow (context, cr, 0, - upper.x + (upper.width - arrow_size) / 2, - upper.y + menu_border.top + (arrow_space - arrow_size) / 2, - arrow_size); + upper.x + (upper.width - arrow_size) / 2, + upper.y + menu_border.top + (arrow_space - arrow_size) / 2, + arrow_size); gtk_style_context_restore (context); } @@ -4568,7 +4561,6 @@ gtk_menu_set_submenu_navigation_region (GtkMenu *menu, gint submenu_top = 0; gint submenu_bottom = 0; gint width = 0; - gint height = 0; GtkWidget *event_widget; GtkMenuPopdownData *popdown_data; GdkWindow *window; @@ -4585,7 +4577,6 @@ gtk_menu_set_submenu_navigation_region (GtkMenu *menu, submenu_bottom = submenu_top + gdk_window_get_height (window); width = gdk_window_get_width (gtk_widget_get_window (event_widget)); - height = gdk_window_get_height (gtk_widget_get_window (event_widget)); if (event->x >= 0 && event->x < width) { @@ -5155,7 +5146,7 @@ gtk_menu_scroll_item_visible (GtkMenuShell *menu_shell, GtkMenuPrivate *priv = menu->priv; GtkWidget *widget = GTK_WIDGET (menu_shell); gint child_offset, child_height; - gint width, height; + gint height; gint y; gint arrow_height; gboolean last_child = 0; @@ -5164,7 +5155,6 @@ gtk_menu_scroll_item_visible (GtkMenuShell *menu_shell, * If not we need to scroll the menu so that it becomes fully * visible. */ - if (compute_child_offset (menu, menu_item, &child_offset, &child_height, &last_child)) { @@ -5175,7 +5165,6 @@ gtk_menu_scroll_item_visible (GtkMenuShell *menu_shell, GtkBorder padding; y = priv->scroll_offset; - width = gdk_window_get_width (gtk_widget_get_window (widget)); height = gdk_window_get_height (gtk_widget_get_window (widget)); gtk_widget_style_get (widget, |