diff options
Diffstat (limited to 'shell')
-rw-r--r-- | shell/e-shell-content.c | 13 | ||||
-rw-r--r-- | shell/e-shell-sidebar.c | 9 | ||||
-rw-r--r-- | shell/e-shell-switcher.c | 9 |
3 files changed, 20 insertions, 11 deletions
diff --git a/shell/e-shell-content.c b/shell/e-shell-content.c index 62cfdd4176..a97c095947 100644 --- a/shell/e-shell-content.c +++ b/shell/e-shell-content.c @@ -44,6 +44,9 @@ #include "e-shell-view.h" #include "e-shell-window-actions.h" +/* backward-compatibility cruft */ +#include "e-util/gtk-compat.h" + #define E_SHELL_CONTENT_GET_PRIVATE(obj) \ (G_TYPE_INSTANCE_GET_PRIVATE \ ((obj), E_TYPE_SHELL_CONTENT, EShellContentPrivate)) @@ -226,16 +229,16 @@ shell_content_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); - gtk_widget_size_request (priv->alert_bar, &child_requisition); + gtk_widget_get_preferred_size (priv->alert_bar, &child_requisition, NULL); requisition->width = MAX (requisition->width, child_requisition.width); requisition->height += child_requisition.height; if (priv->searchbar == NULL) return; - gtk_widget_size_request (priv->searchbar, &child_requisition); + gtk_widget_get_preferred_size (priv->searchbar, &child_requisition, NULL); requisition->width = MAX (requisition->width, child_requisition.width); requisition->height += child_requisition.height; } @@ -267,7 +270,7 @@ shell_content_size_allocate (GtkWidget *widget, child_allocation.y += child_requisition.height; if (gtk_widget_get_visible (child)) - gtk_widget_size_request (child, &child_requisition); + gtk_widget_get_preferred_size (child, &child_requisition, NULL); else child_requisition.height = 0; @@ -282,7 +285,7 @@ shell_content_size_allocate (GtkWidget *widget, child_allocation.y += child_requisition.height; if (child != NULL) - gtk_widget_size_request (child, &child_requisition); + gtk_widget_get_preferred_size (child, &child_requisition, NULL); else child_requisition.height = 0; 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; 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; |