]> www.fi.muni.cz Git - evince.git/commitdiff
shell: Use gtk_widget_get_preferred_size() instead of size_request
authorCarlos Garcia Campos <carlosgc@gnome.org>
Sun, 26 Dec 2010 10:27:56 +0000 (11:27 +0100)
committerCarlos Garcia Campos <carlosgc@gnome.org>
Sun, 26 Dec 2010 10:36:13 +0000 (11:36 +0100)
shell/ev-navigation-action-widget.c
shell/ev-sidebar.c
shell/ev-utils.c

index 95c7fdff77f7e43001675c8385ea7be810bb9d2e..c3de6958845d26609c563f0a98b4f215c1629967 100644 (file)
@@ -134,7 +134,7 @@ menu_position_func (GtkMenu           *menu,
        gint monitor_num;
        GdkScreen *screen;
 
-       gtk_widget_size_request (GTK_WIDGET (button->menu), &menu_req);
+        gtk_widget_get_preferred_size (GTK_WIDGET (button->menu), &menu_req, NULL);
        direction = gtk_widget_get_direction (widget);
        screen = gtk_widget_get_screen (GTK_WIDGET (menu));
 
index 3a99b556a5079da7596d1d25e8e19045b869fa0d..c2b2c53beda0fd29425c4eee1cb2872370020bf6 100644 (file)
@@ -231,7 +231,7 @@ ev_sidebar_select_button_press_cb (GtkWidget      *widget,
                gtk_widget_get_allocation (widget, &allocation);
                width = allocation.width;
                gtk_widget_set_size_request (ev_sidebar->priv->menu, -1, -1);
-               gtk_widget_size_request (ev_sidebar->priv->menu, &requisition);
+                gtk_widget_get_preferred_size (ev_sidebar->priv->menu, &requisition, NULL);
                gtk_widget_set_size_request (ev_sidebar->priv->menu,
                                             MAX (width, requisition.width), -1);
                
index 83cfcdbc90b59e6f1a28e083ad0dd8391cbf0dcc..8c9bae5501617027009d9be62379e668bc136ad4 100644 (file)
@@ -225,7 +225,7 @@ ev_gui_sanitise_popup_position (GtkMenu *menu,
 
        g_return_if_fail (widget != NULL);
 
-       gtk_widget_size_request (GTK_WIDGET (menu), &req);
+       gtk_widget_get_preferred_size (GTK_WIDGET (menu), &req, NULL);
 
        monitor_num = gdk_screen_get_monitor_at_point (screen, *x, *y);
        gtk_menu_set_monitor (menu, monitor_num);
@@ -251,7 +251,7 @@ ev_gui_menu_position_tree_selection (GtkMenu   *menu,
        GtkAllocation allocation;
        GdkRectangle visible;
 
-       gtk_widget_size_request (GTK_WIDGET (menu), &req);
+       gtk_widget_get_preferred_size (GTK_WIDGET (menu), &req, NULL);
        gdk_window_get_origin (gtk_widget_get_window (widget), x, y);
        gtk_widget_get_allocation (widget, &allocation);