diff options
author | Srinivasa Ragavan <sragavan@gnome.org> | 2010-03-23 16:55:40 +0800 |
---|---|---|
committer | Srinivasa Ragavan <sragavan@gnome.org> | 2010-03-23 16:55:40 +0800 |
commit | 7245c36554efbdb90aca29840fff74661ddf540e (patch) | |
tree | 618b944da666ba5975786492c45d7e6cd00a0d36 /modules/mail/e-mail-shell-sidebar.c | |
parent | f644fea17fcce98a7b1c9f2f613592797c5a22c1 (diff) | |
download | gsoc2013-evolution-7245c36554efbdb90aca29840fff74661ddf540e.tar.gz gsoc2013-evolution-7245c36554efbdb90aca29840fff74661ddf540e.tar.zst gsoc2013-evolution-7245c36554efbdb90aca29840fff74661ddf540e.zip |
Don't hardcode a width, but compute a suitable one
We do this by measuring a template string, which contains a sample name for an email account.
This is what normally gets displayed in the folder tree, so such a sample string
should give a reasonable width.
Signed-off-by: Federico Mena Quintero <federico@novell.com>
Conflicts:
modules/mail/e-mail-shell-sidebar.c
Diffstat (limited to 'modules/mail/e-mail-shell-sidebar.c')
-rw-r--r-- | modules/mail/e-mail-shell-sidebar.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/mail/e-mail-shell-sidebar.c b/modules/mail/e-mail-shell-sidebar.c index 1b55f0524f..30dd9d5e51 100644 --- a/modules/mail/e-mail-shell-sidebar.c +++ b/modules/mail/e-mail-shell-sidebar.c @@ -211,6 +211,14 @@ mail_shell_sidebar_size_request (GtkWidget *widget, GtkRequisition *requisition) requisition->width = MAX (requisition->width, ink_rect.width + border); } +static void +mail_shell_sidebar_size_allocate (GtkWidget *widget, GtkAllocation *allocation) +{ + GTK_WIDGET_CLASS (parent_class)->size_allocate (widget, allocation); + g_print ("EMailShellSidebar allocation: %dx%d\n", allocation->width, allocation->height); +} + + static guint32 mail_shell_sidebar_check_state (EShellSidebar *shell_sidebar) { @@ -240,6 +248,7 @@ mail_shell_sidebar_class_init (EMailShellSidebarClass *class) widget_class = GTK_WIDGET_CLASS (class); widget_class->size_request = mail_shell_sidebar_size_request; + widget_class->size_allocate = mail_shell_sidebar_size_allocate; shell_sidebar_class = E_SHELL_SIDEBAR_CLASS (class); shell_sidebar_class->check_state = mail_shell_sidebar_check_state; |