aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell-switcher.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-01-13 23:54:58 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-01-15 03:58:29 +0800
commit0af3ff804c0d71c76fd63f0a2a152cac7de64863 (patch)
treee80b7e357654f0dcc3cef08e1d2d459b9cf45d85 /shell/e-shell-switcher.c
parent7087e222f8422470c44ce2ecd5c598fefd2315fc (diff)
downloadgsoc2013-evolution-0af3ff804c0d71c76fd63f0a2a152cac7de64863.tar
gsoc2013-evolution-0af3ff804c0d71c76fd63f0a2a152cac7de64863.tar.gz
gsoc2013-evolution-0af3ff804c0d71c76fd63f0a2a152cac7de64863.tar.bz2
gsoc2013-evolution-0af3ff804c0d71c76fd63f0a2a152cac7de64863.tar.lz
gsoc2013-evolution-0af3ff804c0d71c76fd63f0a2a152cac7de64863.tar.xz
gsoc2013-evolution-0af3ff804c0d71c76fd63f0a2a152cac7de64863.tar.zst
gsoc2013-evolution-0af3ff804c0d71c76fd63f0a2a152cac7de64863.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.c9
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;