diff options
author | Xan Lopez <xan@gnome.org> | 2010-10-05 13:16:32 +0800 |
---|---|---|
committer | Xan Lopez <xan@gnome.org> | 2010-10-05 13:16:32 +0800 |
commit | 6a9728101fa10bc47a2298fed0783316964eb84d (patch) | |
tree | 1b4eff184f6441a264b93b16801287b0b7ce8405 /lib/ephy-gui.c | |
parent | 2d556b740f1b21dd3b5652271de6194df0d48ac5 (diff) | |
download | gsoc2013-epiphany-6a9728101fa10bc47a2298fed0783316964eb84d.tar gsoc2013-epiphany-6a9728101fa10bc47a2298fed0783316964eb84d.tar.gz gsoc2013-epiphany-6a9728101fa10bc47a2298fed0783316964eb84d.tar.bz2 gsoc2013-epiphany-6a9728101fa10bc47a2298fed0783316964eb84d.tar.lz gsoc2013-epiphany-6a9728101fa10bc47a2298fed0783316964eb84d.tar.xz gsoc2013-epiphany-6a9728101fa10bc47a2298fed0783316964eb84d.tar.zst gsoc2013-epiphany-6a9728101fa10bc47a2298fed0783316964eb84d.zip |
Use gtk_widget_get_preferred_size instead of gtk_widget_size_request
Diffstat (limited to 'lib/ephy-gui.c')
-rw-r--r-- | lib/ephy-gui.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/ephy-gui.c b/lib/ephy-gui.c index 02aeffb3e..d5de8c76d 100644 --- a/lib/ephy-gui.c +++ b/lib/ephy-gui.c @@ -45,7 +45,7 @@ ephy_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); @@ -71,7 +71,7 @@ ephy_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); @@ -133,8 +133,8 @@ ephy_gui_menu_position_under_widget (GtkMenu *menu, container = gtk_widget_get_ancestor (widget, GTK_TYPE_CONTAINER); g_return_if_fail (container != NULL); - gtk_widget_size_request (widget, &req); - gtk_widget_size_request (GTK_WIDGET (menu), &menu_req); + gtk_widget_get_preferred_size (widget, &req, NULL); + gtk_widget_get_preferred_size (GTK_WIDGET (menu), &menu_req, NULL); screen = gtk_widget_get_screen (GTK_WIDGET (menu)); window = gtk_widget_get_window (widget); @@ -202,8 +202,8 @@ ephy_gui_menu_position_on_toolbar (GtkMenu *menu, toolbar = GTK_TOOLBAR (gtk_widget_get_ancestor (widget, GTK_TYPE_TOOLBAR)); g_return_if_fail (toolbar != NULL); - gtk_widget_size_request (widget, &req); - gtk_widget_size_request (GTK_WIDGET (menu), &menu_req); + gtk_widget_get_preferred_size (widget, &req, NULL); + gtk_widget_get_preferred_size (GTK_WIDGET (menu), &menu_req, NULL); screen = gtk_widget_get_screen (GTK_WIDGET (menu)); window = gtk_widget_get_window (widget); |