aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell-window.c
diff options
context:
space:
mode:
authorSrinivasa Ragavan <sragavan@gnome.org>2010-05-11 21:17:09 +0800
committerSrinivasa Ragavan <sragavan@gnome.org>2010-05-11 21:19:12 +0800
commitbde1bc6bca4c5ed63a193f7dc50252e550a0fb40 (patch)
tree5de040dc4d9919f7aca9aca631890215b7434b46 /shell/e-shell-window.c
parente439bfcddac8e9db50f34d9fd13aebf61f995c44 (diff)
downloadgsoc2013-evolution-bde1bc6bca4c5ed63a193f7dc50252e550a0fb40.tar
gsoc2013-evolution-bde1bc6bca4c5ed63a193f7dc50252e550a0fb40.tar.gz
gsoc2013-evolution-bde1bc6bca4c5ed63a193f7dc50252e550a0fb40.tar.bz2
gsoc2013-evolution-bde1bc6bca4c5ed63a193f7dc50252e550a0fb40.tar.lz
gsoc2013-evolution-bde1bc6bca4c5ed63a193f7dc50252e550a0fb40.tar.xz
gsoc2013-evolution-bde1bc6bca4c5ed63a193f7dc50252e550a0fb40.tar.zst
gsoc2013-evolution-bde1bc6bca4c5ed63a193f7dc50252e550a0fb40.zip
Handle adding 'X' close button on the menu bar. Restore adding the same
for adding in calendar since it doesn't have a toolbar.
Diffstat (limited to 'shell/e-shell-window.c')
-rw-r--r--shell/e-shell-window.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/shell/e-shell-window.c b/shell/e-shell-window.c
index 0460823b3f..7970f5b015 100644
--- a/shell/e-shell-window.c
+++ b/shell/e-shell-window.c
@@ -344,6 +344,23 @@ shell_window_construct_menubar (EShellWindow *shell_window)
shell_window, "/main-menu");
gtk_widget_show (main_menu);
+ if (e_shell_get_small_screen_mode (shell_window->priv->shell)) {
+ GtkWidget *parent, *child;
+
+ parent = gtk_widget_get_parent (main_menu);
+ g_object_ref (parent);
+ gtk_container_remove ((GtkContainer *)parent, main_menu);
+ child = gtk_hbox_new (FALSE, 0);
+ gtk_box_pack_start ((GtkBox *)child, main_menu, TRUE, TRUE, 0);
+ gtk_widget_show (child);
+ gtk_container_add ((GtkContainer *)parent, child);
+ shell_window->priv->menubar_box = child;
+
+ e_mutual_binding_new (main_menu, "visible",
+ child, "visible");
+ main_menu = child;
+ }
+
g_signal_connect (
shell_window, "notify::active-view",
G_CALLBACK (shell_window_menubar_update_new_menu), NULL);
@@ -351,6 +368,12 @@ shell_window_construct_menubar (EShellWindow *shell_window)
return main_menu;
}
+GtkWidget *
+e_shell_window_get_menu_bar_box (EShellWindow *shell_window)
+{
+ return shell_window->priv->menubar_box;
+}
+
static GtkWidget *
shell_window_construct_toolbar (EShellWindow *shell_window)
{
@@ -411,6 +434,13 @@ shell_window_construct_toolbar (EShellWindow *shell_window)
if (e_shell_get_meego_mode (shell_window->priv->shell))
gtk_widget_set_name (GTK_WIDGET (toolbar), "MeeGoToolbar");
+ toolbar = e_shell_window_get_managed_widget (
+ shell_window, "/close-toolbar");
+ gtk_toolbar_set_show_arrow (GTK_TOOLBAR (toolbar), FALSE);
+ gtk_box_pack_start (GTK_BOX (box), toolbar, FALSE, FALSE, 0);
+ if (e_shell_get_meego_mode (shell_window->priv->shell))
+ gtk_widget_set_name (GTK_WIDGET (toolbar), "MeeGoToolbar");
+
return box;
}