diff options
author | Michael Meeks <michael.meeks@novell.com> | 2010-04-12 21:50:44 +0800 |
---|---|---|
committer | Michael Meeks <michael.meeks@novell.com> | 2010-04-12 21:50:44 +0800 |
commit | 2593383aec61d0b1f2f8950e5301f30176d2cbce (patch) | |
tree | 6e2d3e7f3a095ab349cb5a3cd9f8b957841f8b1f /shell/e-shell-window.c | |
parent | dae9d2e575e0a239c53d3079b8e20bd17f6c37b4 (diff) | |
download | gsoc2013-evolution-2593383aec61d0b1f2f8950e5301f30176d2cbce.tar gsoc2013-evolution-2593383aec61d0b1f2f8950e5301f30176d2cbce.tar.gz gsoc2013-evolution-2593383aec61d0b1f2f8950e5301f30176d2cbce.tar.bz2 gsoc2013-evolution-2593383aec61d0b1f2f8950e5301f30176d2cbce.tar.lz gsoc2013-evolution-2593383aec61d0b1f2f8950e5301f30176d2cbce.tar.xz gsoc2013-evolution-2593383aec61d0b1f2f8950e5301f30176d2cbce.tar.zst gsoc2013-evolution-2593383aec61d0b1f2f8950e5301f30176d2cbce.zip |
Detect MeeGo, and propagate settings variously.
Adapt widget naming on MeeGo for theming etc.
Diffstat (limited to 'shell/e-shell-window.c')
-rw-r--r-- | shell/e-shell-window.c | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/shell/e-shell-window.c b/shell/e-shell-window.c index f6176c1a35..62c39fee37 100644 --- a/shell/e-shell-window.c +++ b/shell/e-shell-window.c @@ -324,9 +324,15 @@ shell_window_finalize (GObject *object) static void shell_window_constructed (GObject *object) { - e_shell_window_private_constructed (E_SHELL_WINDOW (object)); + EShellWindow *shell_window = E_SHELL_WINDOW (object); + + e_shell_window_private_constructed (shell_window); e_extensible_load_extensions (E_EXTENSIBLE (object)); + + if (e_shell_get_meego_mode (shell_window->priv->shell) && + e_shell_get_small_screen_mode (shell_window->priv->shell)) + gtk_window_set_decorated (GTK_WINDOW (object), FALSE); } static GtkWidget * @@ -365,6 +371,9 @@ shell_window_construct_toolbar (EShellWindow *shell_window) toolbar = e_shell_window_get_managed_widget ( shell_window, "/main-toolbar"); + if (e_shell_get_meego_mode (shell_window->priv->shell)) + gtk_widget_set_name (GTK_WIDGET (toolbar), "MeeGoToolbar"); + /* XXX Having this separator in the UI definition doesn't work * because GtkUIManager is unaware of the "New" button, so * it makes the separator invisible. One possibility is to @@ -605,9 +614,23 @@ shell_window_create_shell_view (EShellWindow *shell_window, } static void +shell_window_realize (GtkWidget *widget) +{ + EShellWindow *shell_window; + + shell_window = E_SHELL_WINDOW (widget); + e_shell_adapt_window_size (shell_window->priv->shell, + GTK_WINDOW (widget)); + + /* Chain up to parent's dispose() method. */ + GTK_WIDGET_CLASS (e_shell_window_parent_class)->realize (widget); +} + +static void e_shell_window_class_init (EShellWindowClass *class) { GObjectClass *object_class; + GtkWidgetClass *widget_class; g_type_class_add_private (class, sizeof (EShellWindowPrivate)); @@ -618,6 +641,9 @@ e_shell_window_class_init (EShellWindowClass *class) object_class->finalize = shell_window_finalize; object_class->constructed = shell_window_constructed; + widget_class = GTK_WIDGET_CLASS (class); + widget_class->realize = shell_window_realize; + class->construct_menubar = shell_window_construct_menubar; class->construct_toolbar = shell_window_construct_toolbar; class->construct_sidebar = shell_window_construct_sidebar; @@ -625,6 +651,7 @@ e_shell_window_class_init (EShellWindowClass *class) class->construct_taskbar = shell_window_construct_taskbar; class->create_shell_view = shell_window_create_shell_view; + /** * EShellWindow:active-view * |