diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2013-06-03 05:04:18 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2013-06-03 05:10:30 +0800 |
commit | 4792c683b0e97bd96aba736b5dcd685abdc13060 (patch) | |
tree | 4177abd2ccee63ee5c3ae68332624c85f7751c18 /mail | |
parent | 89d274e476b27ef0b52e6bfcf72bbe210076b391 (diff) | |
download | gsoc2013-evolution-4792c683b0e97bd96aba736b5dcd685abdc13060.tar gsoc2013-evolution-4792c683b0e97bd96aba736b5dcd685abdc13060.tar.gz gsoc2013-evolution-4792c683b0e97bd96aba736b5dcd685abdc13060.tar.bz2 gsoc2013-evolution-4792c683b0e97bd96aba736b5dcd685abdc13060.tar.lz gsoc2013-evolution-4792c683b0e97bd96aba736b5dcd685abdc13060.tar.xz gsoc2013-evolution-4792c683b0e97bd96aba736b5dcd685abdc13060.tar.zst gsoc2013-evolution-4792c683b0e97bd96aba736b5dcd685abdc13060.zip |
EMailReader: Remove unused actions.
These are just Express Mode leftovers.
Also remove obsolete functions:
e_mail_reader_get_enable_show_folder()
e_mail_reader_enable_show_folder()
e_mail_paned_view_set_enable_show_folder()
Diffstat (limited to 'mail')
-rw-r--r-- | mail/e-mail-message-pane.c | 8 | ||||
-rw-r--r-- | mail/e-mail-paned-view.c | 19 | ||||
-rw-r--r-- | mail/e-mail-paned-view.h | 3 | ||||
-rw-r--r-- | mail/e-mail-reader.c | 186 | ||||
-rw-r--r-- | mail/e-mail-reader.h | 5 |
5 files changed, 1 insertions, 220 deletions
diff --git a/mail/e-mail-message-pane.c b/mail/e-mail-message-pane.c index bae8e85af9..c6aa272807 100644 --- a/mail/e-mail-message-pane.c +++ b/mail/e-mail-message-pane.c @@ -88,15 +88,9 @@ e_mail_message_pane_init (EMailMessagePane *message_pane) EMailView * e_mail_message_pane_new (EShellView *shell_view) { - EMailView *widget; - g_return_val_if_fail (E_IS_SHELL_VIEW (shell_view), NULL); - widget = g_object_new ( + return g_object_new ( E_TYPE_MAIL_MESSAGE_PANE, "shell-view", shell_view, NULL); - - e_mail_paned_view_set_enable_show_folder (E_MAIL_PANED_VIEW (widget), TRUE); - - return widget; } diff --git a/mail/e-mail-paned-view.c b/mail/e-mail-paned-view.c index ea654aa4c5..9f39347973 100644 --- a/mail/e-mail-paned-view.c +++ b/mail/e-mail-paned-view.c @@ -63,7 +63,6 @@ struct _EMailPanedViewPrivate { /* Signal handler IDs */ guint message_list_built_id; - guint enable_show_folder : 1; }; enum { @@ -612,16 +611,6 @@ mail_paned_view_reader_open_selected_mail (EMailReader *reader) return class->open_selected_mail (paned_view); } -static gboolean -mail_paned_view_enable_show_folder (EMailReader *reader) -{ - EMailPanedView *paned_view; - - paned_view = E_MAIL_PANED_VIEW (reader); - - return paned_view->priv->enable_show_folder; -} - static void mail_paned_view_constructed (GObject *object) { @@ -1056,14 +1045,12 @@ e_mail_paned_view_reader_init (EMailReaderInterface *interface) interface->get_window = mail_paned_view_get_window; interface->set_folder = mail_paned_view_set_folder; interface->open_selected_mail = mail_paned_view_reader_open_selected_mail; - interface->enable_show_folder = mail_paned_view_enable_show_folder; } static void e_mail_paned_view_init (EMailPanedView *view) { view->priv = E_MAIL_PANED_VIEW_GET_PRIVATE (view); - view->priv->enable_show_folder = FALSE; g_signal_connect ( view, "notify::group-by-threads", @@ -1101,9 +1088,3 @@ e_mail_paned_view_get_preview (EMailPanedView *view) return GTK_WIDGET (mail_paned_view_get_mail_display (E_MAIL_READER (view))); } -void -e_mail_paned_view_set_enable_show_folder (EMailPanedView *view, - gboolean set) -{ - view->priv->enable_show_folder = set; -} diff --git a/mail/e-mail-paned-view.h b/mail/e-mail-paned-view.h index dbea57b99f..65d4a774de 100644 --- a/mail/e-mail-paned-view.h +++ b/mail/e-mail-paned-view.h @@ -70,9 +70,6 @@ void e_mail_paned_view_hide_message_list_pane (EMailPanedView *view, gboolean visible); GtkWidget * e_mail_paned_view_get_preview (EMailPanedView *view); -void e_mail_paned_view_set_enable_show_folder - (EMailPanedView *view, - gboolean set); G_END_DECLS diff --git a/mail/e-mail-reader.c b/mail/e-mail-reader.c index f63908cd54..6625d9bf40 100644 --- a/mail/e-mail-reader.c +++ b/mail/e-mail-reader.c @@ -103,10 +103,6 @@ enum { MESSAGE_SEEN, SHOW_SEARCH_BAR, UPDATE_ACTIONS, - SHOW_FOLDER, - SHOW_PREVTAB, - SHOW_NEXTTAB, - CLOSE_TAB, LAST_SIGNAL }; @@ -977,34 +973,6 @@ exit: } static void -action_mail_folder_cb (GtkAction *action, - EMailReader *reader) -{ - g_signal_emit (reader, signals[SHOW_FOLDER], 0); -} - -static void -action_mail_nexttab_cb (GtkAction *action, - EMailReader *reader) -{ - g_signal_emit (reader, signals[SHOW_NEXTTAB], 0); -} - -static void -action_mail_prevtab_cb (GtkAction *action, - EMailReader *reader) -{ - g_signal_emit (reader, signals[SHOW_PREVTAB], 0); -} - -static void -action_mail_closetab_cb (GtkAction *action, - EMailReader *reader) -{ - g_signal_emit (reader, signals[CLOSE_TAB], 0); -} - -static void action_mail_next_cb (GtkAction *action, EMailReader *reader) { @@ -2172,34 +2140,6 @@ static GtkActionEntry mail_reader_entries[] = { N_("Move selected messages to another folder"), G_CALLBACK (action_mail_move_cb) }, - { "mail-goto-folder", - NULL, - N_("_Switch to Folder"), - "<Control>Up", - N_("Display the parent folder"), - G_CALLBACK (action_mail_folder_cb) }, - - { "mail-goto-nexttab", - NULL, - N_("Switch to _next tab"), - "<Shift><Control>Down", - N_("Switch to the next tab"), - G_CALLBACK (action_mail_nexttab_cb) }, - - { "mail-goto-prevtab", - NULL, - N_("Switch to _previous tab"), - "<Shift><Control>Up", - N_("Switch to the previous tab"), - G_CALLBACK (action_mail_prevtab_cb) }, - - { "mail-close-tab", - NULL, - N_("Cl_ose current tab"), - "<Shift><Control>w", - N_("Close current tab"), - G_CALLBACK (action_mail_closetab_cb) }, - { "mail-next", GTK_STOCK_GO_FORWARD, N_("_Next Message"), @@ -3059,12 +2999,6 @@ mail_reader_get_folder (EMailReader *reader) return MESSAGE_LIST (message_list)->folder; } -static gboolean -mail_reader_get_enable_show_folder (EMailReader *reader) -{ - return FALSE; -} - static void mail_reader_set_folder (EMailReader *reader, CamelFolder *folder) @@ -3533,27 +3467,6 @@ mail_reader_update_actions (EMailReader *reader, action = e_mail_reader_get_action (reader, action_name); gtk_action_set_sensitive (action, sensitive); - action_name = "mail-goto-folder"; - sensitive = e_mail_reader_get_enable_show_folder (reader); - action = e_mail_reader_get_action (reader, action_name); - gtk_action_set_sensitive (action, sensitive); - gtk_action_set_visible (action, sensitive); - - action_name = "mail-goto-nexttab"; - action = e_mail_reader_get_action (reader, action_name); - gtk_action_set_sensitive (action, TRUE); - gtk_action_set_visible (action, FALSE); - - action_name = "mail-goto-prevtab"; - action = e_mail_reader_get_action (reader, action_name); - gtk_action_set_sensitive (action, TRUE); - gtk_action_set_visible (action, FALSE); - - action_name = "mail-close-tab"; - action = e_mail_reader_get_action (reader, action_name); - gtk_action_set_sensitive (action, TRUE); - gtk_action_set_visible (action, FALSE); - action_name = "mail-move"; sensitive = any_messages_selected; action = e_mail_reader_get_action (reader, action_name); @@ -3716,7 +3629,6 @@ e_mail_reader_default_init (EMailReaderInterface *interface) interface->get_alert_sink = mail_reader_get_alert_sink; interface->get_selected_uids = mail_reader_get_selected_uids; interface->get_folder = mail_reader_get_folder; - interface->enable_show_folder = mail_reader_get_enable_show_folder; interface->set_folder = mail_reader_set_folder; interface->set_message = mail_reader_set_message; interface->open_selected_mail = e_mail_reader_open_selected; @@ -3813,42 +3725,6 @@ e_mail_reader_default_init (EMailReaderInterface *interface) g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); - signals[SHOW_FOLDER] = g_signal_new ( - "show-folder", - G_OBJECT_CLASS_TYPE (interface), - G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION, - 0, - NULL, NULL, - g_cclosure_marshal_VOID__VOID, - G_TYPE_NONE, 0); - - signals[SHOW_NEXTTAB] = g_signal_new ( - "show-next-tab", - G_OBJECT_CLASS_TYPE (interface), - G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION, - 0, - NULL, NULL, - g_cclosure_marshal_VOID__VOID, - G_TYPE_NONE, 0); - - signals[SHOW_PREVTAB] = g_signal_new ( - "show-previous-tab", - G_OBJECT_CLASS_TYPE (interface), - G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION, - 0, - NULL, NULL, - g_cclosure_marshal_VOID__VOID, - G_TYPE_NONE, 0); - - signals[CLOSE_TAB] = g_signal_new ( - "close-tab", - G_OBJECT_CLASS_TYPE (interface), - G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION, - 0, - NULL, NULL, - g_cclosure_marshal_VOID__VOID, - G_TYPE_NONE, 0); - signals[UPDATE_ACTIONS] = g_signal_new ( "update-actions", G_OBJECT_CLASS_TYPE (interface), @@ -3869,7 +3745,6 @@ e_mail_reader_init (EMailReader *reader, GtkActionGroup *action_group; GtkWidget *message_list; GtkAction *action; - gboolean sensitive; const gchar *action_name; EMailDisplay *display; GSettings *settings; @@ -3994,27 +3869,6 @@ e_mail_reader_init (EMailReader *reader, action = e_mail_reader_get_action (reader, action_name); gtk_action_set_is_important (action, TRUE); - action_name = "mail-goto-folder"; - action = e_mail_reader_get_action (reader, action_name); - sensitive = e_mail_reader_get_enable_show_folder (reader); - gtk_action_set_sensitive (action, sensitive); - gtk_action_set_visible (action, FALSE); - - action_name = "mail-goto-nexttab"; - action = e_mail_reader_get_action (reader, action_name); - gtk_action_set_sensitive (action, TRUE); - gtk_action_set_visible (action, FALSE); - - action_name = "mail-goto-prevtab"; - action = e_mail_reader_get_action (reader, action_name); - gtk_action_set_sensitive (action, TRUE); - gtk_action_set_visible (action, FALSE); - - action_name = "mail-close-tab"; - action = e_mail_reader_get_action (reader, action_name); - gtk_action_set_sensitive (action, TRUE); - gtk_action_set_visible (action, FALSE); - action_name = "mail-next"; action = e_mail_reader_get_action (reader, action_name); gtk_action_set_short_label (action, _("Next")); @@ -4737,46 +4591,6 @@ e_mail_reader_show_search_bar (EMailReader *reader) } void -e_mail_reader_enable_show_folder (EMailReader *reader) -{ - CamelFolder *folder; - GtkAction *action; - const gchar *action_name; - const gchar *full_name; - gboolean sensitive; - gchar *label; - - g_return_if_fail (E_IS_MAIL_READER (reader)); - - folder = e_mail_reader_get_folder (reader); - - full_name = camel_folder_get_full_name (folder); - label = g_strdup_printf (_("Folder '%s'"), full_name); - - action_name = "mail-goto-folder"; - action = e_mail_reader_get_action (reader, action_name); - sensitive = e_mail_reader_get_enable_show_folder (reader); - gtk_action_set_label (action, label); - gtk_action_set_visible (action, TRUE); - gtk_action_set_sensitive (action, sensitive); - - g_free (label); -} - -gboolean -e_mail_reader_get_enable_show_folder (EMailReader *reader) -{ - EMailReaderInterface *interface; - - g_return_val_if_fail (E_IS_MAIL_READER (reader), FALSE); - - interface = E_MAIL_READER_GET_INTERFACE (reader); - g_return_val_if_fail (interface->enable_show_folder != NULL, FALSE); - - return interface->enable_show_folder (reader); -} - -void e_mail_reader_avoid_next_mark_as_seen (EMailReader *reader) { EMailReaderPrivate *priv; diff --git a/mail/e-mail-reader.h b/mail/e-mail-reader.h index 6303ce99b0..392a1717e7 100644 --- a/mail/e-mail-reader.h +++ b/mail/e-mail-reader.h @@ -111,7 +111,6 @@ struct _EMailReaderInterface { void (*set_message) (EMailReader *reader, const gchar *message_uid); guint (*open_selected_mail) (EMailReader *reader); - gboolean (*enable_show_folder) (EMailReader *reader); /* Signals */ void (*composer_created) (EMailReader *reader, @@ -176,10 +175,6 @@ void e_mail_reader_create_charset_menu GtkUIManager *ui_manager, guint merge_id); void e_mail_reader_show_search_bar (EMailReader *reader); -gboolean e_mail_reader_get_enable_show_folder - (EMailReader *reader); -void e_mail_reader_enable_show_folder - (EMailReader *reader); void e_mail_reader_avoid_next_mark_as_seen (EMailReader *reader); void e_mail_reader_composer_created (EMailReader *reader, |