diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-01-13 23:54:58 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@gnome-db.org> | 2011-06-30 00:41:19 +0800 |
commit | 2485ba3936c9fdd4e185393d49c34dae7ba1f49d (patch) | |
tree | 0836c8d3ebd4636ffa836de97f7217598264e999 /shell/e-shell-switcher.c | |
parent | 57d45a6536711e3fe974b97642f218ac859e36e7 (diff) | |
download | gsoc2013-evolution-2485ba3936c9fdd4e185393d49c34dae7ba1f49d.tar gsoc2013-evolution-2485ba3936c9fdd4e185393d49c34dae7ba1f49d.tar.gz gsoc2013-evolution-2485ba3936c9fdd4e185393d49c34dae7ba1f49d.tar.bz2 gsoc2013-evolution-2485ba3936c9fdd4e185393d49c34dae7ba1f49d.tar.lz gsoc2013-evolution-2485ba3936c9fdd4e185393d49c34dae7ba1f49d.tar.xz gsoc2013-evolution-2485ba3936c9fdd4e185393d49c34dae7ba1f49d.tar.zst gsoc2013-evolution-2485ba3936c9fdd4e185393d49c34dae7ba1f49d.zip |
Fudge gtk_widget_get_preferred_size() for gtk2.
Easy enough to fake gtk_widget_get_preferred_size() in gtk2 using
gtk_widget_size_request(). Reduces diff noise with gtk3 branch.
Diffstat (limited to 'shell/e-shell-switcher.c')
-rw-r--r-- | shell/e-shell-switcher.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/shell/e-shell-switcher.c b/shell/e-shell-switcher.c index fec943c021..6dbcc86fb1 100644 --- a/shell/e-shell-switcher.c +++ b/shell/e-shell-switcher.c @@ -30,6 +30,9 @@ #include <glib/gi18n.h> #include <e-util/e-extensible.h> +/* backward-compatibility cruft */ +#include "e-util/gtk-compat.h" + #define E_SHELL_SWITCHER_GET_PRIVATE(obj) \ (G_TYPE_INSTANCE_GET_PRIVATE \ ((obj), E_TYPE_SHELL_SWITCHER, EShellSwitcherPrivate)) @@ -100,7 +103,7 @@ shell_switcher_layout_actions (EShellSwitcher *switcher) GtkWidget *widget = p->data; GtkRequisition requisition; - gtk_widget_size_request (widget, &requisition); + gtk_widget_get_preferred_size (widget, &requisition, NULL); max_height = MAX (max_height, requisition.height); max_width = MAX (max_width, requisition.width); } @@ -261,7 +264,7 @@ shell_switcher_size_request (GtkWidget *widget, child = gtk_bin_get_child (GTK_BIN (widget)); if (child != NULL) - gtk_widget_size_request (child, requisition); + gtk_widget_get_preferred_size (child, requisition, NULL); if (!priv->toolbar_visible) return; @@ -270,7 +273,7 @@ shell_switcher_size_request (GtkWidget *widget, GtkWidget *widget = iter->data; GtkRequisition child_requisition; - gtk_widget_size_request (widget, &child_requisition); + gtk_widget_get_preferred_size (widget, &child_requisition, NULL); child_requisition.width += H_PADDING; child_requisition.height += V_PADDING; |