[evince] shell: Use gtk_widget_get_preferred_size() instead of size_request
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince] shell: Use gtk_widget_get_preferred_size() instead of size_request
- Date: Sun, 26 Dec 2010 10:45:50 +0000 (UTC)
commit 0db6439d4d228e4f9d309a33c6f6df60263f8904
Author: Carlos Garcia Campos <carlosgc gnome org>
Date: Sun Dec 26 11:27:56 2010 +0100
shell: Use gtk_widget_get_preferred_size() instead of size_request
shell/ev-navigation-action-widget.c | 2 +-
shell/ev-sidebar.c | 2 +-
shell/ev-utils.c | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/shell/ev-navigation-action-widget.c b/shell/ev-navigation-action-widget.c
index 95c7fdf..c3de695 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 3a99b55..c2b2c53 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 83cfcdb..8c9bae5 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]