diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-01-13 23:54:58 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2011-01-15 03:58:29 +0800 |
commit | 0af3ff804c0d71c76fd63f0a2a152cac7de64863 (patch) | |
tree | e80b7e357654f0dcc3cef08e1d2d459b9cf45d85 /shell/e-shell-sidebar.c | |
parent | 7087e222f8422470c44ce2ecd5c598fefd2315fc (diff) | |
download | gsoc2013-evolution-0af3ff804c0d71c76fd63f0a2a152cac7de64863.tar.gz 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-sidebar.c')
-rw-r--r-- | shell/e-shell-sidebar.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/shell/e-shell-sidebar.c b/shell/e-shell-sidebar.c index a7cb28e803..e460d30100 100644 --- a/shell/e-shell-sidebar.c +++ b/shell/e-shell-sidebar.c @@ -31,6 +31,9 @@ #include <e-util/e-unicode.h> #include <shell/e-shell-view.h> +/* backward-compatibility cruft */ +#include "e-util/gtk-compat.h" + #define E_SHELL_SIDEBAR_GET_PRIVATE(obj) \ (G_TYPE_INSTANCE_GET_PRIVATE \ ((obj), E_TYPE_SHELL_SIDEBAR, EShellSidebarPrivate)) @@ -233,10 +236,10 @@ shell_sidebar_size_request (GtkWidget *widget, requisition->height = 0; child = gtk_bin_get_child (GTK_BIN (widget)); - gtk_widget_size_request (child, requisition); + gtk_widget_get_preferred_size (child, requisition, NULL); child = priv->event_box; - gtk_widget_size_request (child, &child_requisition); + gtk_widget_get_preferred_size (child, &child_requisition, NULL); requisition->width = MAX (requisition->width, child_requisition.width); requisition->height += child_requisition.height; } @@ -255,7 +258,7 @@ shell_sidebar_size_allocate (GtkWidget *widget, gtk_widget_set_allocation (widget, allocation); child = priv->event_box; - gtk_widget_size_request (child, &child_requisition); + gtk_widget_get_preferred_size (child, &child_requisition, NULL); child_allocation.x = allocation->x; child_allocation.y = allocation->y; |