aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@gnome-db.org>2010-12-10 20:15:27 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-06-30 00:41:26 +0800
commitb5aba428f4d7daca78a6b079e1766d9fba5a8bc3 (patch)
treec8cd9400a62f2cf2b3ba84bd6e6b01774f2b3085 /modules
parentcd633936b1f2f2e8c678dfb4e3e38ba9713e41a4 (diff)
downloadgsoc2013-evolution-b5aba428f4d7daca78a6b079e1766d9fba5a8bc3.tar
gsoc2013-evolution-b5aba428f4d7daca78a6b079e1766d9fba5a8bc3.tar.gz
gsoc2013-evolution-b5aba428f4d7daca78a6b079e1766d9fba5a8bc3.tar.bz2
gsoc2013-evolution-b5aba428f4d7daca78a6b079e1766d9fba5a8bc3.tar.lz
gsoc2013-evolution-b5aba428f4d7daca78a6b079e1766d9fba5a8bc3.tar.xz
gsoc2013-evolution-b5aba428f4d7daca78a6b079e1766d9fba5a8bc3.tar.zst
gsoc2013-evolution-b5aba428f4d7daca78a6b079e1766d9fba5a8bc3.zip
Adapt size_request vfuncs to latest gtk+-3.0 API.
Diffstat (limited to 'modules')
-rw-r--r--modules/mail/e-mail-shell-sidebar.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/modules/mail/e-mail-shell-sidebar.c b/modules/mail/e-mail-shell-sidebar.c
index 2b24aae5e1..7c538de519 100644
--- a/modules/mail/e-mail-shell-sidebar.c
+++ b/modules/mail/e-mail-shell-sidebar.c
@@ -231,8 +231,17 @@ guess_screen_width (EMailShellSidebar *sidebar)
}
static void
-mail_shell_sidebar_size_request (GtkWidget *widget,
- GtkRequisition *requisition)
+mail_shell_sidebar_get_preferred_height (GtkWidget *widget,
+ gint *minimum_height,
+ gint *natural_height)
+{
+ GTK_WIDGET_CLASS (parent_class)->get_preferred_height (widget, minimum_height, natural_height);
+}
+
+static void
+mail_shell_sidebar_get_preferred_width (GtkWidget *widget,
+ gint *minimum_width,
+ gint *natural_width)
{
/* We override the normal size-request handler so that we can
* spit out a treeview with a suitable width. We measure the
@@ -258,7 +267,7 @@ mail_shell_sidebar_size_request (GtkWidget *widget,
sidebar = E_MAIL_SHELL_SIDEBAR (widget);
- GTK_WIDGET_CLASS (parent_class)->size_request (widget, requisition);
+ GTK_WIDGET_CLASS (parent_class)->get_preferred_width (widget, minimum_width, natural_width);
/* This string is a mockup only; it doesn't need to be translated */
layout = gtk_widget_create_pango_layout (
@@ -274,7 +283,7 @@ mail_shell_sidebar_size_request (GtkWidget *widget,
border = 2 * style->xthickness + 4;
sidebar_width = ink_rect.width + border;
sidebar_width = MIN (sidebar_width, screen_width / 4);
- requisition->width = MAX (requisition->width, sidebar_width);
+ *minimum_width = *natural_width = MAX (*natural_width, sidebar_width);
}
static guint32
@@ -305,7 +314,8 @@ mail_shell_sidebar_class_init (EMailShellSidebarClass *class)
object_class->constructed = mail_shell_sidebar_constructed;
widget_class = GTK_WIDGET_CLASS (class);
- widget_class->size_request = mail_shell_sidebar_size_request;
+ widget_class->get_preferred_width = mail_shell_sidebar_get_preferred_width;
+ widget_class->get_preferred_height = mail_shell_sidebar_get_preferred_height;
shell_sidebar_class = E_SHELL_SIDEBAR_CLASS (class);
shell_sidebar_class->check_state = mail_shell_sidebar_check_state;