aboutsummaryrefslogtreecommitdiffstats
path: root/modules/mail
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-05-02 11:18:28 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-05-02 11:18:28 +0800
commitc30d29425eccafea02e95ea6e81679508c878784 (patch)
tree43881a8ae0b03d55cc6facac3b4e6375524c7c4c /modules/mail
parent6c7520b73d1360504672804ebeba6c4de18de318 (diff)
downloadgsoc2013-evolution-c30d29425eccafea02e95ea6e81679508c878784.tar.gz
gsoc2013-evolution-c30d29425eccafea02e95ea6e81679508c878784.tar.zst
gsoc2013-evolution-c30d29425eccafea02e95ea6e81679508c878784.zip
Coding style and whitespace cleanup.
Diffstat (limited to 'modules/mail')
-rw-r--r--modules/mail/e-mail-shell-sidebar.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/modules/mail/e-mail-shell-sidebar.c b/modules/mail/e-mail-shell-sidebar.c
index a5ec67d4c4..491d5068d7 100644
--- a/modules/mail/e-mail-shell-sidebar.c
+++ b/modules/mail/e-mail-shell-sidebar.c
@@ -178,12 +178,12 @@ mail_shell_sidebar_constructed (GObject *object)
shell_sidebar);
}
-static int
+static gint
guess_screen_width (EMailShellSidebar *sidebar)
{
GtkWidget *widget;
GdkScreen *screen;
- int screen_width;
+ gint screen_width;
widget = GTK_WIDGET (sidebar);
@@ -192,12 +192,13 @@ guess_screen_width (EMailShellSidebar *sidebar)
screen = gtk_widget_get_screen (widget);
if (screen) {
GtkWidget *toplevel;
- int monitor;
+ gint monitor;
GdkRectangle rect;
toplevel = gtk_widget_get_toplevel (widget);
if (toplevel && gtk_widget_get_realized (toplevel))
- monitor = gdk_screen_get_monitor_at_window (screen, gtk_widget_get_window (toplevel));
+ monitor = gdk_screen_get_monitor_at_window (
+ 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
@@ -235,16 +236,17 @@ mail_shell_sidebar_size_request (GtkWidget *widget, GtkRequisition *requisition)
PangoLayout *layout;
PangoRectangle ink_rect;
GtkStyle *style;
- int border;
- int sidebar_width;
- int screen_width;
+ gint border;
+ gint sidebar_width;
+ gint screen_width;
sidebar = E_MAIL_SHELL_SIDEBAR (widget);
GTK_WIDGET_CLASS (parent_class)->size_request (widget, requisition);
/* This string is a mockup only; it doesn't need to be translated */
- layout = gtk_widget_create_pango_layout (widget, "typical.account@mailservice.com");
+ layout = gtk_widget_create_pango_layout (
+ widget, "typical.account@mailservice.com");
pango_layout_get_pixel_extents (layout, &ink_rect, NULL);
g_object_unref (layout);
@@ -252,7 +254,9 @@ mail_shell_sidebar_size_request (GtkWidget *widget, GtkRequisition *requisition)
screen_width = guess_screen_width (sidebar);
- border = 2 * style->xthickness + 4; /* Thickness of frame shadow plus some slack for padding */
+ /* 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);