diff options
Diffstat (limited to 'shell')
-rw-r--r-- | shell/e-shell-view.c | 3 | ||||
-rw-r--r-- | shell/e-shell-window-actions.c | 8 | ||||
-rw-r--r-- | shell/e-shell-window-private.h | 1 | ||||
-rw-r--r-- | shell/e-shell-window.c | 30 | ||||
-rw-r--r-- | shell/e-shell-window.h | 1 |
5 files changed, 42 insertions, 1 deletions
diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c index 77215e73a2..be099b9869 100644 --- a/shell/e-shell-view.c +++ b/shell/e-shell-view.c @@ -670,7 +670,8 @@ shell_view_construct_searchbar (EShellView *shell_view) item = gtk_tool_button_new (image, gtk_action_get_label (action)); gtk_widget_set_name (GTK_WIDGET (item), "MeeGoCloseButton"); gtk_activatable_set_related_action (GTK_ACTIVATABLE (item), action); - gtk_toolbar_insert (GTK_TOOLBAR (main_toolbar), item, -1); + gtk_box_pack_start ((GtkBox *)e_shell_window_get_menu_bar_box(shell_window), (GtkWidget *)item, FALSE, FALSE, 0); + gtk_widget_show_all((GtkWidget *)item); } return widget; diff --git a/shell/e-shell-window-actions.c b/shell/e-shell-window-actions.c index 06fce0fe69..65c6acff7a 100644 --- a/shell/e-shell-window-actions.c +++ b/shell/e-shell-window-actions.c @@ -1453,6 +1453,14 @@ static GtkActionEntry shell_entries[] = { N_("Close this window"), G_CALLBACK (action_close_cb) }, + { "close-window-menu", + GTK_STOCK_CLOSE, + NULL, + "<Control>w", + N_("Close this window"), + G_CALLBACK (action_close_cb) }, + + { "close-window", GTK_STOCK_CLOSE, N_("_Close Window"), diff --git a/shell/e-shell-window-private.h b/shell/e-shell-window-private.h index 6050ce135d..02a688503e 100644 --- a/shell/e-shell-window-private.h +++ b/shell/e-shell-window-private.h @@ -93,6 +93,7 @@ struct _EShellWindowPrivate { GtkWidget *status_notebook; /* Miscellaneous */ + GtkWidget *menubar_box; /* Shell signal handlers. */ GArray *signal_handler_ids; 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; } diff --git a/shell/e-shell-window.h b/shell/e-shell-window.h index 58401b2dba..9baa3cf8e9 100644 --- a/shell/e-shell-window.h +++ b/shell/e-shell-window.h @@ -146,6 +146,7 @@ void e_shell_window_register_new_source_actions const gchar *backend_name, GtkActionEntry *entries, guint n_entries); +GtkWidget * e_shell_window_get_menu_bar_box (EShellWindow *shell_window); G_END_DECLS |