aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/groupwise-features
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/groupwise-features')
-rw-r--r--plugins/groupwise-features/gw-ui.c14
-rw-r--r--plugins/groupwise-features/junk-mail-settings.c11
-rw-r--r--plugins/groupwise-features/mail-retract.c17
-rw-r--r--plugins/groupwise-features/status-track.c17
4 files changed, 25 insertions, 34 deletions
diff --git a/plugins/groupwise-features/gw-ui.c b/plugins/groupwise-features/gw-ui.c
index 4a33a692cd..c1146ff4d1 100644
--- a/plugins/groupwise-features/gw-ui.c
+++ b/plugins/groupwise-features/gw-ui.c
@@ -204,19 +204,17 @@ update_mmp_entries_cb (EShellView *shell_view, gpointer user_data)
if (visible) {
EShellContent *shell_content;
EMailReader *reader;
- GtkWidget *message_list;
- GPtrArray *selected;
+ GPtrArray *uids;
shell_content = e_shell_view_get_shell_content (shell_view);
- reader = (EMailReader *) (shell_content);
- message_list = e_mail_reader_get_message_list (reader);
- selected = message_list_get_selected (MESSAGE_LIST (message_list));
+ reader = E_MAIL_READER (shell_content);
+ uids = e_mail_reader_get_selected_uids (reader);
- if (selected)
- n_selected = selected->len;
+ if (uids)
+ n_selected = uids->len;
- em_utils_uids_free (selected);
+ em_utils_uids_free (uids);
visible = n_selected > 0;
}
diff --git a/plugins/groupwise-features/junk-mail-settings.c b/plugins/groupwise-features/junk-mail-settings.c
index 4fc4b735c0..61a5cb0ac9 100644
--- a/plugins/groupwise-features/junk-mail-settings.c
+++ b/plugins/groupwise-features/junk-mail-settings.c
@@ -68,16 +68,15 @@ gw_junk_mail_settings_cb (GtkAction *action, EShellView *shell_view)
gchar *msg;
EShellContent *shell_content;
EMailReader *reader;
- GtkWidget *message_list;
+ CamelFolder *folder;
shell_content = e_shell_view_get_shell_content (shell_view);
- reader = (EMailReader *) (shell_content);
- message_list = e_mail_reader_get_message_list (reader);
- g_return_if_fail (message_list != NULL);
- g_return_if_fail (MESSAGE_LIST (message_list)->folder != NULL);
+ reader = E_MAIL_READER (shell_content);
+ folder = e_mail_reader_get_folder (reader);
+ g_return_if_fail (folder != NULL);
- cnc = get_cnc (MESSAGE_LIST (message_list)->folder->parent_store);
+ cnc = get_cnc (folder->parent_store);
dialog = gtk_dialog_new_with_buttons (_("Junk Settings"),
NULL,
diff --git a/plugins/groupwise-features/mail-retract.c b/plugins/groupwise-features/mail-retract.c
index adb97e250e..0ef1fd8e88 100644
--- a/plugins/groupwise-features/mail-retract.c
+++ b/plugins/groupwise-features/mail-retract.c
@@ -43,22 +43,19 @@ get_selected_info (EShellView *shell_view, CamelFolder **folder, gchar **selecte
{
EShellContent *shell_content;
EMailReader *reader;
- GtkWidget *message_list;
- GPtrArray *selected;
+ GPtrArray *uids;
shell_content = e_shell_view_get_shell_content (shell_view);
- reader = (EMailReader *) (shell_content);
- message_list = e_mail_reader_get_message_list (reader);
- g_return_val_if_fail (message_list != NULL, FALSE);
+ reader = E_MAIL_READER (shell_content);
+ uids = e_mail_reader_get_selected_uids (reader);
- selected = message_list_get_selected (MESSAGE_LIST (message_list));
- if (selected && selected->len == 1) {
- *folder = MESSAGE_LIST (message_list)->folder;
- *selected_uid = g_strdup (g_ptr_array_index (selected, 0));
+ if (uids && uids->len == 1) {
+ *folder = e_mail_reader_get_folder (reader);
+ *selected_uid = g_strdup (g_ptr_array_index (uids, 0));
}
- em_utils_uids_free (selected);
+ em_utils_uids_free (uids);
return *selected_uid != NULL;
}
diff --git a/plugins/groupwise-features/status-track.c b/plugins/groupwise-features/status-track.c
index 018e69261a..622fc3b6cd 100644
--- a/plugins/groupwise-features/status-track.c
+++ b/plugins/groupwise-features/status-track.c
@@ -65,24 +65,21 @@ get_selected_message (EShellView *shell_view, CamelFolder **folder, gchar **sele
CamelMimeMessage *msg = NULL;
EShellContent *shell_content;
EMailReader *reader;
- GtkWidget *message_list;
- GPtrArray *selected;
+ GPtrArray *uids;
shell_content = e_shell_view_get_shell_content (shell_view);
- reader = (EMailReader *) (shell_content);
- message_list = e_mail_reader_get_message_list (reader);
- g_return_val_if_fail (message_list != NULL, NULL);
+ reader = E_MAIL_READER (shell_content);
+ uids = e_mail_reader_get_selected_uids (reader);
- selected = message_list_get_selected (MESSAGE_LIST (message_list));
- if (selected && selected->len == 1) {
- *folder = MESSAGE_LIST (message_list)->folder;
- *selected_uid = g_strdup (g_ptr_array_index (selected, 0));
+ if (uids && uids->len == 1) {
+ *folder = e_mail_reader_get_folder (reader);
+ *selected_uid = g_strdup (g_ptr_array_index (uids, 0));
msg = camel_folder_get_message (*folder, *selected_uid, NULL);
}
- em_utils_uids_free (selected);
+ em_utils_uids_free (uids);
return msg;
}