aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-03-25 02:18:26 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-06-30 00:41:47 +0800
commit03516eae1fd03a194e57aec164e17742f636a89a (patch)
tree8827a5cd04ebe26a62ff9586402130fe4571e2ab /shell
parentd29b7f6505947681768291f10a977bbac7f81f8f (diff)
downloadgsoc2013-evolution-03516eae1fd03a194e57aec164e17742f636a89a.tar.gz
gsoc2013-evolution-03516eae1fd03a194e57aec164e17742f636a89a.tar.zst
gsoc2013-evolution-03516eae1fd03a194e57aec164e17742f636a89a.zip
Bug 645551 - Mailer statusbar jumping in size
Diffstat (limited to 'shell')
-rw-r--r--shell/e-shell-taskbar.c50
1 files changed, 42 insertions, 8 deletions
diff --git a/shell/e-shell-taskbar.c b/shell/e-shell-taskbar.c
index c424d504c8..943a098dd2 100644
--- a/shell/e-shell-taskbar.c
+++ b/shell/e-shell-taskbar.c
@@ -44,6 +44,8 @@ struct _EShellTaskbarPrivate {
GtkWidget *hbox;
GHashTable *proxy_table;
+
+ gint fixed_height;
};
enum {
@@ -274,9 +276,45 @@ shell_taskbar_constructed (GObject *object)
}
static void
+shell_taskbar_size_allocate (GtkWidget *widget,
+ GtkAllocation *allocation)
+{
+ EShellTaskbar *shell_taskbar;
+ gint fixed_height;
+
+ shell_taskbar = E_SHELL_TASKBAR (widget);
+
+ /* Maximum height allocation sticks. */
+ fixed_height = shell_taskbar->priv->fixed_height;
+ fixed_height = MAX (fixed_height, allocation->height);
+ shell_taskbar->priv->fixed_height = fixed_height;
+
+ /* Chain up to parent's size_allocate() method. */
+ GTK_WIDGET_CLASS (e_shell_taskbar_parent_class)->
+ size_allocate (widget, allocation);
+}
+
+static void
+shell_taskbar_get_preferred_height (GtkWidget *widget,
+ gint *minimum_height,
+ gint *natural_height)
+{
+ EShellTaskbar *shell_taskbar;
+
+ shell_taskbar = E_SHELL_TASKBAR (widget);
+
+ if (minimum_height != NULL)
+ *minimum_height = shell_taskbar->priv->fixed_height;
+
+ if (natural_height != NULL)
+ *natural_height = shell_taskbar->priv->fixed_height;
+}
+
+static void
e_shell_taskbar_class_init (EShellTaskbarClass *class)
{
GObjectClass *object_class;
+ GtkWidgetClass *widget_class;
g_type_class_add_private (class, sizeof (EShellTaskbarPrivate));
@@ -287,6 +325,10 @@ e_shell_taskbar_class_init (EShellTaskbarClass *class)
object_class->finalize = shell_taskbar_finalize;
object_class->constructed = shell_taskbar_constructed;
+ widget_class = GTK_WIDGET_CLASS (class);
+ widget_class->size_allocate = shell_taskbar_size_allocate;
+ widget_class->get_preferred_height = shell_taskbar_get_preferred_height;
+
/**
* EShellTaskbar:message
*
@@ -324,7 +366,6 @@ static void
e_shell_taskbar_init (EShellTaskbar *shell_taskbar)
{
GtkWidget *widget;
- gint height;
shell_taskbar->priv = G_TYPE_INSTANCE_GET_PRIVATE (
shell_taskbar, E_TYPE_SHELL_TASKBAR, EShellTaskbarPrivate);
@@ -343,13 +384,6 @@ e_shell_taskbar_init (EShellTaskbar *shell_taskbar)
gtk_box_pack_start (GTK_BOX (shell_taskbar), widget, TRUE, TRUE, 0);
shell_taskbar->priv->hbox = g_object_ref (widget);
gtk_widget_hide (widget);
-
- /* Make the taskbar large enough to accomodate a small icon.
- * XXX The "* 2" is a fudge factor to allow for some padding
- * The true value is probably buried in a style property. */
- gtk_icon_size_lookup (GTK_ICON_SIZE_MENU, NULL, &height);
- gtk_widget_set_size_request (
- GTK_WIDGET (shell_taskbar), -1, (height * 2));
}
/**
/tr> * Sort entries.knu2001-09-211-1/+3 * New port: zhconclive2001-09-091-0/+1 * Initial import of p5-Date-Chinese 1.03kevlo2001-08-141-0/+1 * This package contains the standard Big5+ Chinese Ming 24x24 bitmap font (andclive2001-07-301-0/+1 * Nuke chinese/XFree86-aoutlibs port. Since x11/XFree86-aoutlibs is nowkeith2001-06-221-1/+0 * Add this modified version of schumacher-clean that matcheskeichii2001-06-221-0/+1 * Add Big5 cursor movement friendly support.vanilla2001-04-281-0/+1 * KDE2 messages and documentation (Simplified Chinese language).demon2001-04-171-0/+1 * New port for chinese/qe.clive2001-03-171-0/+1 * New port: zh-abiwordkeith2001-03-111-0/+1 * Initial version.keith2001-03-071-0/+1 * Dia is a Visio-like program under X Window, used to draw diagrams.keith2001-03-061-0/+1 * Initial version. Gnumeric is a spreadsheet for GNOME.keith2001-03-061-0/+1 * Say bye-bye to chinese/aterm, chinese/xa+cv, chinese/xcin.clive2001-03-021-3/+0 * Remove ted.vanilla2001-02-281-1/+0 * Chineselized Tk ver. 8.3.0. This version is i18n improvement.kevlo2001-02-221-0/+1 * Chineselized Tcl ver. 8.3.0. This version is i18n improvement.kevlo2001-02-221-0/+1 * Firebird BBS is widely used telnet based Bulletin Board System invanilla2001-02-161-0/+1 * A zh-tw cursor movement friendly, wrapping clean BitchX.clive2001-01-091-0/+1 * New port added: zh-etermkeith2000-12-251-0/+1 * New port: vflibkeith2000-12-111-0/+1 * Add chinput2, it's a Chinese QuanPin X input server.vanilla2000-12-031-0/+1 * New port added: emacs20keith2000-12-011-0/+1 * New port: enscriptkeith2000-11-281-0/+1 * New port: ghostscript6keith2000-11-271-0/+1 * New port: zh-wangttfkeith2000-11-191-0/+1 * New port added: ttfmkeith2000-11-131-0/+1 * New port added: zh-joe.keith2000-11-121-0/+1 * This port follows the proposed automatic L10N for ports discussedkevlo2000-11-081-0/+1 * New port: mkisofskeith2000-11-071-0/+1 * Add two new ports: linux-netscape47-{communicator,navigator}keith2000-11-071-0/+2 * Add linux-gtk. Here's the i18n advantages over x11-toolkits/linux-gtk:keith2000-11-061-0/+1 * PR: 22479foxfair2000-11-021-0/+1 * PR: 22342foxfair2000-11-021-0/+1 * PR: 21691foxfair2000-11-021-0/+1 * PR: 21691foxfair2000-11-021-0/+1 * PR: 22408foxfair2000-11-021-0/+1 * PR: 22407foxfair2000-11-021-4/+3 * Blow away pine3 port.kris2000-11-011-1/+0 * Import of zh-xemacs21kevlo2000-10-201-0/+1 * Import big5fs-1.0kevlo2000-10-201-0/+1 * New port: chinese/pyDict.sada2000-10-151-0/+1 * Import moefonts-cid, which is MOE CIDFonts converted by Adobe.kevlo2000-10-031-0/+1 * Say hello to zh-tintin++.foxfair2000-09-261-0/+1 * Move chinese/cdict to chinese/stardictade2000-09-191-1/+1 * Activate zh-chinput.vanilla2000-09-121-0/+1 * (1) {chinese,korean,japanese}/Wnn (Wnn 4.2) was updated as follows:taoka2000-09-081-2/+3 * Activate zh-muttvanilla2000-08-261-0/+1 * Initial import of zh-xmms 1.2.2kevlo2000-08-241-0/+1 * Active zh-emacs.foxfair2000-01-041-0/+1 * Activate the tocps port.steve1999-11-271-0/+1 * Activate cdictcpiazza1999-11-251-0/+1 * remove those ports as the original distribution is not available any moreitojun1999-11-221-3/+0 * Add autoconvertnakai1999-10-271-0/+1 * Active arphicttf.foxfair1999-10-191-0/+1 * Active xa+cv.foxfair1999-09-091-0/+1 * Deactive xphotohunter.foxfair1999-09-071-1/+0 * Active xcin25.foxfair1999-09-071-0/+1 * Active xphotohunter.foxfair1999-09-061-0/+1 * Active libtabe.foxfair1999-09-011-0/+1 * Active ve now.foxfair1999-09-011-0/+1 * Change Id->FreeBSD.obrien1999-08-251-1/+1 * moettf ---> ports/chinese/moettf && Active moettf in Makefile.foxfair1999-07-18