aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-03-31 23:47:17 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-04-01 00:10:54 +0800
commit018018fabe7e660f7928b8a7b817bb63202dc734 (patch)
tree4003e5c682570d819b6baf49528631efb2c52892 /shell
parent85fac8778261ce1fc80d8857158eb18a399da9ee (diff)
downloadgsoc2013-evolution-018018fabe7e660f7928b8a7b817bb63202dc734.tar
gsoc2013-evolution-018018fabe7e660f7928b8a7b817bb63202dc734.tar.gz
gsoc2013-evolution-018018fabe7e660f7928b8a7b817bb63202dc734.tar.bz2
gsoc2013-evolution-018018fabe7e660f7928b8a7b817bb63202dc734.tar.lz
gsoc2013-evolution-018018fabe7e660f7928b8a7b817bb63202dc734.tar.xz
gsoc2013-evolution-018018fabe7e660f7928b8a7b817bb63202dc734.tar.zst
gsoc2013-evolution-018018fabe7e660f7928b8a7b817bb63202dc734.zip
Remove more Express Mode hacks.
This removes all traces of Express Mode from all but the contact editor and calendar appointment editor. Need to evaluate the remaining cases individually.
Diffstat (limited to 'shell')
-rw-r--r--shell/e-shell-view.c43
-rw-r--r--shell/e-shell-window-actions.c43
-rw-r--r--shell/e-shell-window-private.c12
-rw-r--r--shell/e-shell-window.c4
4 files changed, 10 insertions, 92 deletions
diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c
index 2d876ff80c..f13b7c8d69 100644
--- a/shell/e-shell-view.c
+++ b/shell/e-shell-view.c
@@ -629,55 +629,16 @@ shell_view_constructed (GObject *object)
static GtkWidget *
shell_view_construct_searchbar (EShellView *shell_view)
{
- EShell *shell;
- EShellWindow *shell_window;
EShellContent *shell_content;
- EShellSearchbar *shell_searchbar;
EShellViewClass *shell_view_class;
- GtkToolItem *item;
- GtkAction *action;
- GtkWidget *main_toolbar;
GtkWidget *widget;
shell_content = e_shell_view_get_shell_content (shell_view);
- shell_window = e_shell_view_get_shell_window (shell_view);
- shell = e_shell_window_get_shell (shell_window);
shell_view_class = E_SHELL_VIEW_GET_CLASS (shell_view);
widget = shell_view_class->new_shell_searchbar (shell_view);
-
- /* In normal mode, we hand the searchbar off to EShellContent. */
- if (!e_shell_get_express_mode (shell)) {
- e_shell_content_set_searchbar (shell_content, widget);
- gtk_widget_show (widget);
- return widget;
- }
-
- /* Express mode is more complicated. We append a heavily simplified
- * version of it to the main toolbar, but only show it when this shell
- * view is active. So each view still gets its own searchbar. */
-
- shell_searchbar = E_SHELL_SEARCHBAR (widget);
- e_shell_searchbar_set_express_mode (shell_searchbar, TRUE);
-
- /* XXX Hardcoded sizes are evil, but what should the width be
- * relative to. Window width? The other toolbar width? */
- gtk_widget_set_size_request (widget, SIMPLE_SEARCHBAR_WIDTH, -1);
-
- main_toolbar = e_shell_window_get_managed_widget (
- shell_window, "/search-toolbar");
-
- item = gtk_tool_item_new ();
- gtk_container_add (GTK_CONTAINER (item), widget);
- gtk_widget_show (GTK_WIDGET (item));
-
- action = e_shell_view_get_action (shell_view);
- g_object_bind_property (
- action, "active",
- widget, "visible",
- G_BINDING_SYNC_CREATE);
-
- gtk_toolbar_insert (GTK_TOOLBAR (main_toolbar), item, -1);
+ e_shell_content_set_searchbar (shell_content, widget);
+ gtk_widget_show (widget);
return widget;
}
diff --git a/shell/e-shell-window-actions.c b/shell/e-shell-window-actions.c
index 0863c1bdcd..b254328e42 100644
--- a/shell/e-shell-window-actions.c
+++ b/shell/e-shell-window-actions.c
@@ -372,16 +372,10 @@ action_preferences_cb (GtkAction *action,
shell_backend = e_shell_view_get_shell_backend (shell_view);
shell_backend_class = E_SHELL_BACKEND_GET_CLASS (shell_backend);
- if (shell_backend_class->preferences_page != NULL) {
- if (e_shell_get_express_mode (shell))
- e_preferences_window_filter_page (
- E_PREFERENCES_WINDOW (preferences_window),
- shell_backend_class->preferences_page);
- else
- e_preferences_window_show_page (
- E_PREFERENCES_WINDOW (preferences_window),
- shell_backend_class->preferences_page);
- }
+ if (shell_backend_class->preferences_page != NULL)
+ e_preferences_window_show_page (
+ E_PREFERENCES_WINDOW (preferences_window),
+ shell_backend_class->preferences_page);
}
/**
@@ -1404,30 +1398,9 @@ e_shell_window_actions_init (EShellWindow *shell_window)
g_free (path);
}
-static GList *
-express_filter_new_actions (GList *list)
-{
- GList *l, *filtered = NULL;
-
- for (l = list; l; l = l->next) {
- const gchar *backend_name;
-
- backend_name = g_object_get_data (
- G_OBJECT (l->data), "backend-name");
-
- /* only the addressbook pieces in express mode */
- if (!strcmp (backend_name, "addressbook"))
- filtered = g_list_prepend (filtered, l->data);
- }
- g_list_free (list);
-
- return g_list_reverse (filtered);
-}
-
GtkWidget *
e_shell_window_create_new_menu (EShellWindow *shell_window)
{
- EShell *shell;
GtkActionGroup *action_group;
GList *new_item_actions;
GList *new_source_actions;
@@ -1435,8 +1408,6 @@ e_shell_window_create_new_menu (EShellWindow *shell_window)
GtkWidget *menu;
GtkWidget *separator;
- shell = e_shell_window_get_shell (shell_window);
-
/* Get sorted lists of "new item" and "new source" actions. */
action_group = ACTION_GROUP (NEW_ITEM);
@@ -1464,12 +1435,6 @@ e_shell_window_create_new_menu (EShellWindow *shell_window)
for (iter = list; iter != NULL; iter = iter->next)
iter->data = gtk_action_create_menu_item (iter->data);
- if (e_shell_get_express_mode (shell)) {
- new_item_actions = express_filter_new_actions (new_item_actions);
- g_list_free (new_source_actions);
- new_source_actions = NULL;
- }
-
for (iter = new_item_actions; iter != NULL; iter = iter->next)
iter->data = gtk_action_create_menu_item (iter->data);
diff --git a/shell/e-shell-window-private.c b/shell/e-shell-window-private.c
index b3070a6bcf..100a8bef0d 100644
--- a/shell/e-shell-window-private.c
+++ b/shell/e-shell-window-private.c
@@ -432,14 +432,10 @@ e_shell_window_private_constructed (EShellWindow *shell_window)
shell_window, "taskbar-visible",
G_SETTINGS_BIND_DEFAULT);
- if (e_shell_get_express_mode (shell)) {
- e_shell_window_set_switcher_visible (shell_window, FALSE);
- } else {
- g_settings_bind (
- settings, "buttons-visible",
- shell_window, "switcher-visible",
- G_SETTINGS_BIND_DEFAULT);
- }
+ g_settings_bind (
+ settings, "buttons-visible",
+ shell_window, "switcher-visible",
+ G_SETTINGS_BIND_DEFAULT);
g_settings_bind (
settings, "toolbar-visible",
diff --git a/shell/e-shell-window.c b/shell/e-shell-window.c
index 85c76d222a..57c94df573 100644
--- a/shell/e-shell-window.c
+++ b/shell/e-shell-window.c
@@ -428,13 +428,11 @@ e_shell_window_get_menu_bar_box (EShellWindow *shell_window)
static GtkWidget *
shell_window_construct_toolbar (EShellWindow *shell_window)
{
- EShell *shell;
GtkUIManager *ui_manager;
GtkWidget *toolbar;
GtkWidget *box;
GtkToolItem *item;
- shell = e_shell_window_get_shell (shell_window);
ui_manager = e_shell_window_get_ui_manager (shell_window);
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
@@ -490,8 +488,6 @@ shell_window_construct_toolbar (EShellWindow *shell_window)
toolbar = e_shell_window_get_managed_widget (
shell_window, "/search-toolbar");
gtk_toolbar_set_show_arrow (GTK_TOOLBAR (toolbar), FALSE);
- if (e_shell_get_express_mode (shell))
- gtk_box_pack_start (GTK_BOX (box), toolbar, FALSE, FALSE, 0);
toolbar = e_shell_window_get_managed_widget (
shell_window, "/close-toolbar");