From: Carlos Garcia Campos Date: Sun, 26 Dec 2010 10:27:56 +0000 (+0100) Subject: shell: Use gtk_widget_get_preferred_size() instead of size_request X-Git-Tag: EVINCE_2_91_5~28 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=0db6439d4d228e4f9d309a33c6f6df60263f8904;p=evince.git shell: Use gtk_widget_get_preferred_size() instead of size_request --- diff --git a/shell/ev-navigation-action-widget.c b/shell/ev-navigation-action-widget.c index 95c7fdff..c3de6958 100644 --- a/shell/ev-navigation-action-widget.c +++ b/shell/ev-navigation-action-widget.c @@ -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)); diff --git a/shell/ev-sidebar.c b/shell/ev-sidebar.c index 3a99b556..c2b2c53b 100644 --- a/shell/ev-sidebar.c +++ b/shell/ev-sidebar.c @@ -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); diff --git a/shell/ev-utils.c b/shell/ev-utils.c index 83cfcdbc..8c9bae55 100644 --- a/shell/ev-utils.c +++ b/shell/ev-utils.c @@ -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);