diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-05-27 01:09:33 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-05-27 01:09:33 +0800 |
commit | c9ec8c3f4dce2b02c91268529977770364ef87fe (patch) | |
tree | d574f2be1b5438407e59e2fead1321766c9bbc83 /modules/mail/e-mail-shell-sidebar.c | |
parent | 6fec6bf39467dd32625847be1b021a7e5bc94d76 (diff) | |
parent | 96538878911586a9e9ca26b81e1916c04e538980 (diff) | |
download | gsoc2013-evolution-c9ec8c3f4dce2b02c91268529977770364ef87fe.tar.gz gsoc2013-evolution-c9ec8c3f4dce2b02c91268529977770364ef87fe.tar.zst gsoc2013-evolution-c9ec8c3f4dce2b02c91268529977770364ef87fe.zip |
Merge branch 'express2'
Diffstat (limited to 'modules/mail/e-mail-shell-sidebar.c')
-rw-r--r-- | modules/mail/e-mail-shell-sidebar.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/modules/mail/e-mail-shell-sidebar.c b/modules/mail/e-mail-shell-sidebar.c index 491d5068d7..ac736a0a67 100644 --- a/modules/mail/e-mail-shell-sidebar.c +++ b/modules/mail/e-mail-shell-sidebar.c @@ -201,8 +201,8 @@ guess_screen_width (EMailShellSidebar *sidebar) screen, gtk_widget_get_window (toplevel)); else { /* We don't know in which monitor the window manager - * will put us. So we will just use the geometry of the - * first monitor. + * will put us. So we will just use the geometry of + * the first monitor. */ monitor = 0; } @@ -218,18 +218,21 @@ guess_screen_width (EMailShellSidebar *sidebar) } static void -mail_shell_sidebar_size_request (GtkWidget *widget, GtkRequisition *requisition) +mail_shell_sidebar_size_request (GtkWidget *widget, + GtkRequisition *requisition) { /* We override the normal size-request handler so that we can - * spit out a treeview with a suitable width. We measure the length - * of a typical string and use that as the requisition's width. + * spit out a treeview with a suitable width. We measure the + * length of a typical string and use that as the requisition's + * width. * - * EMFolderTreeClass, our parent class, is based on GtkTreeView, which - * doesn't really have a good way of figuring out a minimum width for - * the tree. This is really GTK+'s fault at large, as it only has - * "minimum size / allocated size", instead of "minimum size / preferred - * size / allocated size". Hopefully the extended-layout branch of GTK+ - * will get merged soon and then we can remove this crap. + * EMFolderTreeClass, our parent class, is based on GtkTreeView, + * which doesn't really have a good way of figuring out a minimum + * width for the tree. This is really GTK+'s fault at large, as + * it only has "minimum size / allocated size", instead of + * "minimum size / preferred size / allocated size". Hopefully + * the extended-layout branch of GTK+ will get merged soon and + * then we can remove this crap. */ EMailShellSidebar *sidebar; @@ -256,7 +259,6 @@ mail_shell_sidebar_size_request (GtkWidget *widget, GtkRequisition *requisition) /* Thickness of frame shadow plus some slack for padding. */ 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); |