diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2013-03-31 23:47:17 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2013-04-01 00:10:54 +0800 |
commit | 018018fabe7e660f7928b8a7b817bb63202dc734 (patch) | |
tree | 4003e5c682570d819b6baf49528631efb2c52892 | |
parent | 85fac8778261ce1fc80d8857158eb18a399da9ee (diff) | |
download | gsoc2013-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.
-rw-r--r-- | composer/e-composer-actions.c | 8 | ||||
-rw-r--r-- | composer/e-composer-header-table.c | 26 | ||||
-rw-r--r-- | composer/e-msg-composer.c | 5 | ||||
-rw-r--r-- | mail/e-mail-backend.c | 5 | ||||
-rw-r--r-- | mail/em-folder-tree.c | 20 | ||||
-rw-r--r-- | modules/calendar/e-cal-shell-content.c | 237 | ||||
-rw-r--r-- | modules/calendar/e-cal-shell-sidebar.c | 26 | ||||
-rw-r--r-- | modules/calendar/e-cal-shell-sidebar.h | 2 | ||||
-rw-r--r-- | modules/calendar/e-cal-shell-view-private.c | 8 | ||||
-rw-r--r-- | modules/calendar/e-cal-shell-view.c | 27 | ||||
-rw-r--r-- | modules/mail/e-mail-shell-backend.c | 6 | ||||
-rw-r--r-- | modules/mail/e-mail-shell-content.c | 18 | ||||
-rw-r--r-- | modules/mail/em-composer-prefs.c | 23 | ||||
-rw-r--r-- | shell/e-shell-view.c | 43 | ||||
-rw-r--r-- | shell/e-shell-window-actions.c | 43 | ||||
-rw-r--r-- | shell/e-shell-window-private.c | 12 | ||||
-rw-r--r-- | shell/e-shell-window.c | 4 |
17 files changed, 137 insertions, 376 deletions
diff --git a/composer/e-composer-actions.c b/composer/e-composer-actions.c index d085a3a751..8388888234 100644 --- a/composer/e-composer-actions.c +++ b/composer/e-composer-actions.c @@ -116,12 +116,8 @@ action_preferences_cb (GtkAction *action, GTK_WIN_POS_CENTER_ON_PARENT); gtk_window_present (GTK_WINDOW (preferences_window)); - if (e_shell_get_express_mode (shell)) - e_preferences_window_filter_page ( - E_PREFERENCES_WINDOW (preferences_window), page_name); - else - e_preferences_window_show_page ( - E_PREFERENCES_WINDOW (preferences_window), page_name); + e_preferences_window_show_page ( + E_PREFERENCES_WINDOW (preferences_window), page_name); } static void diff --git a/composer/e-composer-header-table.c b/composer/e-composer-header-table.c index 43b9c9d787..35ac6c9903 100644 --- a/composer/e-composer-header-table.c +++ b/composer/e-composer-header-table.c @@ -269,30 +269,6 @@ skip_custom: return new_destinations; } -static gboolean -from_header_should_be_visible (EComposerHeaderTable *table) -{ - EShell *shell; - EComposerHeader *header; - EComposerHeaderType type; - GtkComboBox *combo_box; - GtkTreeModel *tree_model; - - shell = e_composer_header_table_get_shell (table); - - /* Always display From in standard mode. */ - if (!e_shell_get_express_mode (shell)) - return TRUE; - - type = E_COMPOSER_HEADER_FROM; - header = e_composer_header_table_get_header (table, type); - - combo_box = GTK_COMBO_BOX (header->input_widget); - tree_model = gtk_combo_box_get_model (combo_box); - - return (gtk_tree_model_iter_n_children (tree_model, NULL) > 1); -} - static void composer_header_table_setup_mail_headers (EComposerHeaderTable *table) { @@ -333,7 +309,7 @@ composer_header_table_setup_mail_headers (EComposerHeaderTable *table) switch (ii) { case E_COMPOSER_HEADER_FROM: sensitive = TRUE; - visible = from_header_should_be_visible (table); + visible = TRUE; break; case E_COMPOSER_HEADER_BCC: diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c index f2208d7e9d..76aa82eacb 100644 --- a/composer/e-msg-composer.c +++ b/composer/e-msg-composer.c @@ -1950,11 +1950,6 @@ msg_composer_constructed (GObject *object) shell = e_msg_composer_get_shell (composer); - if (e_shell_get_express_mode (shell)) { - GtkWindow *parent = e_shell_get_active_window (shell); - gtk_window_set_transient_for (GTK_WINDOW (composer), parent); - } - e_composer_private_constructed (composer); web_view = e_msg_composer_get_web_view (composer); diff --git a/mail/e-mail-backend.c b/mail/e-mail-backend.c index cfd6f0a349..610e8913fa 100644 --- a/mail/e-mail-backend.c +++ b/mail/e-mail-backend.c @@ -382,11 +382,6 @@ mail_backend_quit_requested_cb (EShell *shell, if (reason == E_SHELL_QUIT_REMOTE_REQUEST) return; - /* In express mode, don't raise mail request in non mail window. */ - if (e_shell_get_express_mode (shell) && - strcmp (e_shell_window_get_active_view ((EShellWindow *) window), "mail") != 0) - return; - if (!e_shell_backend_is_started (mail_shell_backend)) return; diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c index 33a89b1da1..195a09fad7 100644 --- a/mail/em-folder-tree.c +++ b/mail/em-folder-tree.c @@ -3455,7 +3455,6 @@ void em_folder_tree_restore_state (EMFolderTree *folder_tree, GKeyFile *key_file) { - EShell *shell; EMFolderTreeModel *folder_tree_model; EMailSession *session; GtkTreeModel *tree_model; @@ -3464,17 +3463,12 @@ em_folder_tree_restore_state (EMFolderTree *folder_tree, gboolean valid; gchar **groups_arr; GSList *groups, *group; - gboolean express_mode; gint ii; /* Make sure we have a key file to restore state from. */ if (key_file == NULL) return; - /* XXX Pass this in. */ - shell = e_shell_get_default (); - express_mode = e_shell_get_express_mode (shell); - tree_view = GTK_TREE_VIEW (folder_tree); tree_model = gtk_tree_view_get_model (tree_view); @@ -3584,8 +3578,6 @@ em_folder_tree_restore_state (EMFolderTree *folder_tree, CamelService *service; const gchar *key = STATE_KEY_EXPANDED; const gchar *uid; - gboolean expand_row; - gboolean built_in_store; gchar *group_name; gtk_tree_model_get ( @@ -3600,17 +3592,7 @@ em_folder_tree_restore_state (EMFolderTree *folder_tree, group_name = g_strdup_printf ("Store %s", uid); /* Expand stores that have no "Expanded" key. */ - expand_row = !g_key_file_has_key ( - key_file, group_name, key, NULL); - - built_in_store = - (g_strcmp0 (uid, E_MAIL_SESSION_LOCAL_UID) == 0) || - (g_strcmp0 (uid, E_MAIL_SESSION_VFOLDER_UID) == 0); - - if (express_mode && built_in_store) - expand_row = FALSE; - - if (expand_row) { + if (!g_key_file_has_key (key_file, group_name, key, NULL)) { GtkTreePath *path; path = gtk_tree_model_get_path (tree_model, &iter); diff --git a/modules/calendar/e-cal-shell-content.c b/modules/calendar/e-cal-shell-content.c index 638fa3c72f..545287dc29 100644 --- a/modules/calendar/e-cal-shell-content.c +++ b/modules/calendar/e-cal-shell-content.c @@ -350,48 +350,39 @@ cal_shell_content_constructed (GObject *object) /* We borrow the memopad and taskpad models from the memo * and task views, loading the views if necessary. */ - if (!e_shell_get_express_mode (shell)) { - foreign_view = e_shell_window_get_shell_view (shell_window, "memos"); - foreign_content = e_shell_view_get_shell_content (foreign_view); - g_object_get (foreign_content, "model", &memo_model, NULL); - - foreign_view = e_shell_window_get_shell_view (shell_window, "tasks"); - foreign_content = e_shell_view_get_shell_content (foreign_view); - g_object_get (foreign_content, "model", &task_model, NULL); - } + foreign_view = e_shell_window_get_shell_view (shell_window, "memos"); + foreign_content = e_shell_view_get_shell_content (foreign_view); + g_object_get (foreign_content, "model", &memo_model, NULL); + + foreign_view = e_shell_window_get_shell_view (shell_window, "tasks"); + foreign_content = e_shell_view_get_shell_content (foreign_view); + g_object_get (foreign_content, "model", &task_model, NULL); /* Build content widgets. */ container = GTK_WIDGET (object); - if (!e_shell_get_express_mode (shell)) { - widget = e_paned_new (GTK_ORIENTATION_HORIZONTAL); - gtk_container_add (GTK_CONTAINER (container), widget); - priv->hpaned = g_object_ref (widget); - gtk_widget_show (widget); + widget = e_paned_new (GTK_ORIENTATION_HORIZONTAL); + gtk_container_add (GTK_CONTAINER (container), widget); + priv->hpaned = g_object_ref (widget); + gtk_widget_show (widget); - container = priv->hpaned; - } + container = priv->hpaned; widget = gtk_notebook_new (); gtk_notebook_set_show_tabs (GTK_NOTEBOOK (widget), FALSE); gtk_notebook_set_show_border (GTK_NOTEBOOK (widget), FALSE); - if (!e_shell_get_express_mode (shell)) - gtk_paned_pack1 (GTK_PANED (container), widget, TRUE, FALSE); - else - gtk_container_add (GTK_CONTAINER (container), widget); + gtk_paned_pack1 (GTK_PANED (container), widget, TRUE, FALSE); priv->notebook = g_object_ref (widget); gtk_widget_show (widget); - if (!e_shell_get_express_mode (shell)) { - /* FIXME Need to deal with saving and restoring the position. - * Month view has its own position. */ - widget = e_paned_new (GTK_ORIENTATION_VERTICAL); - e_paned_set_fixed_resize (E_PANED (widget), FALSE); - gtk_paned_pack2 (GTK_PANED (container), widget, FALSE, TRUE); - priv->vpaned = g_object_ref (widget); - gtk_widget_show (widget); - } + /* FIXME Need to deal with saving and restoring the position. + * Month view has its own position. */ + widget = e_paned_new (GTK_ORIENTATION_VERTICAL); + e_paned_set_fixed_resize (E_PANED (widget), FALSE); + gtk_paned_pack2 (GTK_PANED (container), widget, FALSE, TRUE); + priv->vpaned = g_object_ref (widget); + gtk_widget_show (widget); container = priv->notebook; @@ -418,90 +409,88 @@ cal_shell_content_constructed (GObject *object) container = priv->vpaned; - if (!e_shell_get_express_mode (shell)) { - widget = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); - gtk_paned_pack1 (GTK_PANED (container), widget, TRUE, TRUE); - gtk_widget_show (widget); - - container = widget; - - widget = gtk_separator_new (GTK_ORIENTATION_HORIZONTAL); - gtk_box_pack_start (GTK_BOX (container), widget, FALSE, TRUE, 0); - gtk_widget_show (widget); - - widget = gtk_label_new (NULL); - markup = g_strdup_printf ("<b>%s</b>", _("Tasks")); - gtk_label_set_markup (GTK_LABEL (widget), markup); - gtk_box_pack_start (GTK_BOX (container), widget, FALSE, TRUE, 0); - gtk_widget_show (widget); - g_free (markup); - - widget = gtk_scrolled_window_new (NULL, NULL); - gtk_scrolled_window_set_policy ( - GTK_SCROLLED_WINDOW (widget), - GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); - gtk_scrolled_window_set_shadow_type ( - GTK_SCROLLED_WINDOW (widget), GTK_SHADOW_IN); - gtk_box_pack_start (GTK_BOX (container), widget, TRUE, TRUE, 0); - gtk_widget_show (widget); - - container = widget; - - widget = e_task_table_new (shell_view, task_model); - gtk_container_add (GTK_CONTAINER (container), widget); - priv->task_table = g_object_ref (widget); - gtk_widget_show (widget); - - cal_shell_content_load_table_state ( - shell_content, E_TABLE (widget)); - - g_signal_connect_swapped ( - widget, "open-component", - G_CALLBACK (e_cal_shell_view_taskpad_open_task), - shell_view); - - container = priv->vpaned; - - widget = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); - gtk_paned_pack2 (GTK_PANED (container), widget, TRUE, TRUE); - gtk_widget_show (widget); - - container = widget; - - widget = gtk_label_new (NULL); - markup = g_strdup_printf ("<b>%s</b>", _("Memos")); - gtk_label_set_markup (GTK_LABEL (widget), markup); - gtk_box_pack_start (GTK_BOX (container), widget, FALSE, TRUE, 0); - gtk_widget_show (widget); - g_free (markup); - - widget = gtk_scrolled_window_new (NULL, NULL); - gtk_scrolled_window_set_policy ( - GTK_SCROLLED_WINDOW (widget), - GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); - gtk_scrolled_window_set_shadow_type ( - GTK_SCROLLED_WINDOW (widget), GTK_SHADOW_IN); - gtk_box_pack_start (GTK_BOX (container), widget, TRUE, TRUE, 0); - gtk_widget_show (widget); - - container = widget; - - widget = e_memo_table_new (shell_view, memo_model); - gtk_container_add (GTK_CONTAINER (container), widget); - priv->memo_table = g_object_ref (widget); - gtk_widget_show (widget); - - cal_shell_content_load_table_state ( - shell_content, E_TABLE (widget)); - - e_cal_model_set_default_time_func ( - memo_model, gc_get_default_time, calendar); - - g_signal_connect_swapped ( - widget, "open-component", - G_CALLBACK (e_cal_shell_view_memopad_open_memo), - shell_view); - } + widget = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); + gtk_paned_pack1 (GTK_PANED (container), widget, TRUE, TRUE); + gtk_widget_show (widget); + + container = widget; + + widget = gtk_separator_new (GTK_ORIENTATION_HORIZONTAL); + gtk_box_pack_start (GTK_BOX (container), widget, FALSE, TRUE, 0); + gtk_widget_show (widget); + + widget = gtk_label_new (NULL); + markup = g_strdup_printf ("<b>%s</b>", _("Tasks")); + gtk_label_set_markup (GTK_LABEL (widget), markup); + gtk_box_pack_start (GTK_BOX (container), widget, FALSE, TRUE, 0); + gtk_widget_show (widget); + g_free (markup); + + widget = gtk_scrolled_window_new (NULL, NULL); + gtk_scrolled_window_set_policy ( + GTK_SCROLLED_WINDOW (widget), + GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); + gtk_scrolled_window_set_shadow_type ( + GTK_SCROLLED_WINDOW (widget), GTK_SHADOW_IN); + gtk_box_pack_start (GTK_BOX (container), widget, TRUE, TRUE, 0); + gtk_widget_show (widget); + + container = widget; + + widget = e_task_table_new (shell_view, task_model); + gtk_container_add (GTK_CONTAINER (container), widget); + priv->task_table = g_object_ref (widget); + gtk_widget_show (widget); + + cal_shell_content_load_table_state ( + shell_content, E_TABLE (widget)); + + g_signal_connect_swapped ( + widget, "open-component", + G_CALLBACK (e_cal_shell_view_taskpad_open_task), + shell_view); + + container = priv->vpaned; + + widget = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); + gtk_paned_pack2 (GTK_PANED (container), widget, TRUE, TRUE); + gtk_widget_show (widget); + + container = widget; + + widget = gtk_label_new (NULL); + markup = g_strdup_printf ("<b>%s</b>", _("Memos")); + gtk_label_set_markup (GTK_LABEL (widget), markup); + gtk_box_pack_start (GTK_BOX (container), widget, FALSE, TRUE, 0); + gtk_widget_show (widget); + g_free (markup); + + widget = gtk_scrolled_window_new (NULL, NULL); + gtk_scrolled_window_set_policy ( + GTK_SCROLLED_WINDOW (widget), + GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); + gtk_scrolled_window_set_shadow_type ( + GTK_SCROLLED_WINDOW (widget), GTK_SHADOW_IN); + gtk_box_pack_start (GTK_BOX (container), widget, TRUE, TRUE, 0); + gtk_widget_show (widget); + + container = widget; + + widget = e_memo_table_new (shell_view, memo_model); + gtk_container_add (GTK_CONTAINER (container), widget); + priv->memo_table = g_object_ref (widget); + gtk_widget_show (widget); + + cal_shell_content_load_table_state ( + shell_content, E_TABLE (widget)); + + e_cal_model_set_default_time_func ( + memo_model, gc_get_default_time, calendar); + + g_signal_connect_swapped ( + widget, "open-component", + G_CALLBACK (e_cal_shell_view_memopad_open_memo), + shell_view); /* Load the view instance. */ @@ -514,21 +503,19 @@ cal_shell_content_constructed (GObject *object) * The GtkWidget::map() callback below explains why. */ priv->view_instance = view_instance; - if (!e_shell_get_express_mode (shell)) { - g_signal_connect_swapped ( - shell_view, "notify::view-id", - G_CALLBACK (cal_shell_content_notify_view_id_cb), - object); + g_signal_connect_swapped ( + shell_view, "notify::view-id", + G_CALLBACK (cal_shell_content_notify_view_id_cb), + object); - settings = g_settings_new ("org.gnome.evolution.calendar"); + settings = g_settings_new ("org.gnome.evolution.calendar"); - g_settings_bind ( - settings, "tag-vpane-position", - priv->vpaned, "proportion", - G_SETTINGS_BIND_DEFAULT); + g_settings_bind ( + settings, "tag-vpane-position", + priv->vpaned, "proportion", + G_SETTINGS_BIND_DEFAULT); - g_object_unref (settings); - } + g_object_unref (settings); if (memo_model) g_object_unref (memo_model); diff --git a/modules/calendar/e-cal-shell-sidebar.c b/modules/calendar/e-cal-shell-sidebar.c index cc4765ce15..ec87187356 100644 --- a/modules/calendar/e-cal-shell-sidebar.c +++ b/modules/calendar/e-cal-shell-sidebar.c @@ -45,7 +45,6 @@ struct _ECalShellSidebarPrivate { GtkWidget *paned; GtkWidget *selector; GtkWidget *date_navigator; - GtkWidget *new_calendar_button; /* The default client is for ECalModel. It follows the * sidebar's primary selection, even if the highlighted @@ -495,11 +494,6 @@ cal_shell_sidebar_dispose (GObject *object) priv->date_navigator = NULL; } - if (priv->new_calendar_button != NULL) { - g_object_unref (priv->new_calendar_button); - priv->new_calendar_button = NULL; - } - if (priv->default_client != NULL) { g_object_unref (priv->default_client); priv->default_client = NULL; @@ -562,17 +556,6 @@ cal_shell_sidebar_constructed (GObject *object) container = widget; - /* "New Calendar" button is only shown in express mode. - * ECalShellView will bind the button to an appropriate - * GtkAction so we don't have to reimplement it here. */ - if (e_shell_get_express_mode (shell)) { - widget = gtk_button_new (); - gtk_box_pack_end ( - GTK_BOX (container), widget, FALSE, FALSE, 0); - priv->new_calendar_button = g_object_ref (widget); - gtk_widget_show (widget); - } - widget = gtk_scrolled_window_new (NULL, NULL); gtk_scrolled_window_set_policy ( GTK_SCROLLED_WINDOW (widget), @@ -826,15 +809,6 @@ e_cal_shell_sidebar_get_default_client (ECalShellSidebar *cal_shell_sidebar) return (ECalClient *) cal_shell_sidebar->priv->default_client; } -GtkWidget * -e_cal_shell_sidebar_get_new_calendar_button (ECalShellSidebar *cal_shell_sidebar) -{ - g_return_val_if_fail ( - E_IS_CAL_SHELL_SIDEBAR (cal_shell_sidebar), NULL); - - return cal_shell_sidebar->priv->new_calendar_button; -} - ESourceSelector * e_cal_shell_sidebar_get_selector (ECalShellSidebar *cal_shell_sidebar) { diff --git a/modules/calendar/e-cal-shell-sidebar.h b/modules/calendar/e-cal-shell-sidebar.h index c9be5f64a7..17ccb48df4 100644 --- a/modules/calendar/e-cal-shell-sidebar.h +++ b/modules/calendar/e-cal-shell-sidebar.h @@ -89,8 +89,6 @@ ECalendar * e_cal_shell_sidebar_get_date_navigator (ECalShellSidebar *cal_shell_sidebar); ECalClient * e_cal_shell_sidebar_get_default_client (ECalShellSidebar *cal_shell_sidebar); -GtkWidget * e_cal_shell_sidebar_get_new_calendar_button - (ECalShellSidebar *cal_shell_sidebar); ESourceSelector * e_cal_shell_sidebar_get_selector (ECalShellSidebar *cal_shell_sidebar); diff --git a/modules/calendar/e-cal-shell-view-private.c b/modules/calendar/e-cal-shell-view-private.c index 144245514d..68b26942ce 100644 --- a/modules/calendar/e-cal-shell-view-private.c +++ b/modules/calendar/e-cal-shell-view-private.c @@ -555,7 +555,6 @@ e_cal_shell_view_private_constructed (ECalShellView *cal_shell_view) EMemoTable *memo_table; ETaskTable *task_table; ESourceSelector *selector; - GtkWidget *widget; ECalModel *model; gulong handler_id; gint ii; @@ -713,13 +712,6 @@ e_cal_shell_view_private_constructed (ECalShellView *cal_shell_view) e_cal_shell_view_update_sidebar (cal_shell_view); e_cal_shell_view_update_search_filter (cal_shell_view); - /* Express mode only: Bind the "New Calendar" - * sidebar button to the appropriate action. */ - widget = e_cal_shell_sidebar_get_new_calendar_button (cal_shell_sidebar); - if (widget != NULL) - gtk_activatable_set_related_action ( - GTK_ACTIVATABLE (widget), ACTION (CALENDAR_NEW)); - /* Keep the ECalModel in sync with the sidebar. */ g_object_bind_property ( shell_sidebar, "default-client", diff --git a/modules/calendar/e-cal-shell-view.c b/modules/calendar/e-cal-shell-view.c index f17a1386b4..312f28f8ab 100644 --- a/modules/calendar/e-cal-shell-view.c +++ b/modules/calendar/e-cal-shell-view.c @@ -93,10 +93,6 @@ cal_shell_view_constructed (GObject *object) e_cal_shell_view_private_constructed (E_CAL_SHELL_VIEW (object)); - /* no search bar in express mode */ - if (e_shell_get_express_mode (e_shell_get_default ())) - return; - shell_window = e_shell_view_get_shell_window (E_SHELL_VIEW (object)); shell_content = e_shell_view_get_shell_content (E_SHELL_VIEW (object)); searchbar = e_cal_shell_content_get_searchbar (E_CAL_SHELL_CONTENT (shell_content)); @@ -347,22 +343,6 @@ cal_shell_view_update_actions (EShellView *shell_view) shell_window = e_shell_view_get_shell_window (shell_view); shell = e_shell_window_get_shell (shell_window); - if (e_shell_get_express_mode (shell)) { - GtkWidget *widget; - - /* Hide the New button on the toolbar. */ - widget = e_shell_window_get_managed_widget ( - shell_window, "/main-toolbar"); - widget = (GtkWidget *) gtk_toolbar_get_nth_item ( - GTK_TOOLBAR (widget), 0); - gtk_widget_hide (widget); - - /* Hide the main menu. */ - widget = e_shell_window_get_managed_widget ( - shell_window, "/main-menu"); - gtk_widget_hide (widget); - } - registry = e_shell_get_registry (shell); source = e_source_registry_ref_default_mail_identity (registry); has_mail_identity = (source != NULL); @@ -555,13 +535,6 @@ cal_shell_view_class_init (ECalShellViewClass *class, shell_view_class->new_shell_sidebar = e_cal_shell_sidebar_new; shell_view_class->execute_search = cal_shell_view_execute_search; shell_view_class->update_actions = cal_shell_view_update_actions; - - /* XXX This is an unusual place to need an EShell instance. - * Would be cleaner to implement a method that either - * chains up or does nothing based on express mode. */ - if (e_shell_get_express_mode (e_shell_get_default ())) - shell_view_class->construct_searchbar = NULL; - } static void diff --git a/modules/mail/e-mail-shell-backend.c b/modules/mail/e-mail-shell-backend.c index ecb295ea10..8535e834b8 100644 --- a/modules/mail/e-mail-shell-backend.c +++ b/modules/mail/e-mail-shell-backend.c @@ -379,10 +379,8 @@ mail_shell_backend_window_added_cb (GtkApplication *application, settings = g_settings_new ("org.gnome.evolution.mail"); - /* Express mode does not honor this setting. */ - if (!e_shell_get_express_mode (shell)) - active = g_settings_get_boolean ( - settings, "composer-send-html"); + active = g_settings_get_boolean ( + settings, "composer-send-html"); g_object_unref (settings); diff --git a/modules/mail/e-mail-shell-content.c b/modules/mail/e-mail-shell-content.c index 12667c2761..08dda8242d 100644 --- a/modules/mail/e-mail-shell-content.c +++ b/modules/mail/e-mail-shell-content.c @@ -85,15 +85,6 @@ reconnect_folder_loaded_event (EMailReader *child, } static void -mail_shell_content_view_changed_cb (EMailView *view, - EMailShellContent *content) -{ - g_object_freeze_notify (G_OBJECT (content)); - g_object_notify (G_OBJECT (content), "group-by-threads"); - g_object_thaw_notify (G_OBJECT (content)); -} - -static void mail_shell_content_set_property (GObject *object, guint property_id, const GValue *value, @@ -194,14 +185,7 @@ mail_shell_content_constructed (GObject *object) container = GTK_WIDGET (object); - if (e_shell_get_express_mode (e_shell_get_default ())) { - widget = e_mail_notebook_view_new (shell_view); - g_signal_connect ( - widget, "view-changed", - G_CALLBACK (mail_shell_content_view_changed_cb), - object); - } else - widget = e_mail_paned_view_new (shell_view); + widget = e_mail_paned_view_new (shell_view); gtk_container_add (GTK_CONTAINER (container), widget); priv->mail_view = g_object_ref (widget); diff --git a/modules/mail/em-composer-prefs.c b/modules/mail/em-composer-prefs.c index a2e1628299..57de8ab8f6 100644 --- a/modules/mail/em-composer-prefs.c +++ b/modules/mail/em-composer-prefs.c @@ -317,16 +317,11 @@ em_composer_prefs_construct (EMComposerPrefs *prefs, /* Default Behavior */ - /* Express mode does not honor this setting. */ widget = e_builder_get_widget (prefs->builder, "chkSendHTML"); - if (e_shell_get_express_mode (shell)) { - gtk_widget_hide (widget); - } else { - g_settings_bind ( - settings, "composer-send-html", - widget, "active", - G_SETTINGS_BIND_DEFAULT); - } + g_settings_bind ( + settings, "composer-send-html", + widget, "active", + G_SETTINGS_BIND_DEFAULT); widget = e_builder_get_widget (prefs->builder, "chkPromptEmptySubject"); g_settings_bind ( @@ -496,12 +491,10 @@ em_composer_prefs_construct (EMComposerPrefs *prefs, widget, "editor-created", G_CALLBACK (gtk_application_add_window), shell); - /* Express mode does not honor this setting. */ - if (!e_shell_get_express_mode (shell)) - g_settings_bind ( - settings, "composer-send-html", - widget, "prefer-html", - G_SETTINGS_BIND_GET); + g_settings_bind ( + settings, "composer-send-html", + widget, "prefer-html", + G_SETTINGS_BIND_GET); /* get our toplevel widget */ target = em_config_target_new_prefs (ec); 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"); |