diff options
-rw-r--r-- | mail/e-mail-reader-utils.c | 8 | ||||
-rw-r--r-- | mail/e-mail-reader.c | 12 | ||||
-rw-r--r-- | mail/message-list.c | 21 | ||||
-rw-r--r-- | mail/message-list.h | 1 | ||||
-rw-r--r-- | modules/mail/e-mail-shell-view-actions.c | 12 | ||||
-rw-r--r-- | modules/mail/e-mail-shell-view-private.c | 2 | ||||
-rw-r--r-- | plugins/groupwise-features/gw-ui.c | 3 | ||||
-rw-r--r-- | plugins/groupwise-features/mail-retract.c | 3 | ||||
-rw-r--r-- | plugins/groupwise-features/status-track.c | 3 |
9 files changed, 29 insertions, 36 deletions
diff --git a/mail/e-mail-reader-utils.c b/mail/e-mail-reader-utils.c index f1ef1034b1..de171d90ad 100644 --- a/mail/e-mail-reader-utils.c +++ b/mail/e-mail-reader-utils.c @@ -182,7 +182,7 @@ e_mail_reader_mark_selected (EMailReader *reader, camel_folder_set_message_flags ( folder, uids->pdata[ii], mask, set); - message_list_free_uids (MESSAGE_LIST (message_list), uids); + em_utils_uids_free (uids); camel_folder_thaw (folder); return ii; @@ -211,7 +211,7 @@ e_mail_reader_open_selected (EMailReader *reader) uids = message_list_get_selected (MESSAGE_LIST (message_list)); if (!em_utils_ask_open_many (window, uids->len)) { - message_list_free_uids (MESSAGE_LIST (message_list), uids); + em_utils_uids_free (uids); return 0; } @@ -274,7 +274,7 @@ e_mail_reader_open_selected (EMailReader *reader) g_ptr_array_free (views, TRUE); - message_list_free_uids (MESSAGE_LIST (message_list), uids); + em_utils_uids_free (uids); return ii; } @@ -311,7 +311,7 @@ e_mail_reader_print (EMailReader *reader, g_object_unref (html_print); exit: - message_list_free_uids (MESSAGE_LIST (message_list), uids); + em_utils_uids_free (uids); } /* Helper for e_mail_reader_reply_to_message() diff --git a/mail/e-mail-reader.c b/mail/e-mail-reader.c index 346b03c056..9055d6b26a 100644 --- a/mail/e-mail-reader.c +++ b/mail/e-mail-reader.c @@ -392,7 +392,7 @@ action_mail_forward_cb (GtkAction *action, if (em_utils_ask_open_many (window, uids->len)) em_utils_forward_messages (folder, uids, folder_uri); else - message_list_free_uids (MESSAGE_LIST (message_list), uids); + em_utils_uids_free (uids); } static void @@ -416,7 +416,7 @@ action_mail_forward_attached_cb (GtkAction *action, if (em_utils_ask_open_many (window, uids->len)) em_utils_forward_attached (folder, uids, folder_uri); else - message_list_free_uids (MESSAGE_LIST (message_list), uids); + em_utils_uids_free (uids); } static void @@ -440,7 +440,7 @@ action_mail_forward_inline_cb (GtkAction *action, if (em_utils_ask_open_many (window, uids->len)) em_utils_forward_inline (folder, uids, folder_uri); else - message_list_free_uids (MESSAGE_LIST (message_list), uids); + em_utils_uids_free (uids); } static void @@ -464,7 +464,7 @@ action_mail_forward_quoted_cb (GtkAction *action, if (em_utils_ask_open_many (window, uids->len)) em_utils_forward_quoted (folder, uids, folder_uri); else - message_list_free_uids (MESSAGE_LIST (message_list), uids); + em_utils_uids_free (uids); } static void @@ -969,7 +969,7 @@ action_mail_show_source_cb (GtkAction *action, e_mail_reader_set_message (reader, uids->pdata[0]); gtk_widget_show (browser); - message_list_free_uids (MESSAGE_LIST (message_list), uids); + em_utils_uids_free (uids); } static void @@ -1003,7 +1003,7 @@ action_mail_toggle_important_cb (GtkAction *action, camel_folder_thaw (folder); - message_list_free_uids (MESSAGE_LIST (message_list), uids); + em_utils_uids_free (uids); } static void diff --git a/mail/message-list.c b/mail/message-list.c index 90c0812aff..f45afbed34 100644 --- a/mail/message-list.c +++ b/mail/message-list.c @@ -496,7 +496,7 @@ static void clear_selection(MessageList *ml, struct _MLSelection *selection) { if (selection->uids) { - message_list_free_uids(ml, selection->uids); + em_utils_uids_free(selection->uids); selection->uids = NULL; } if (selection->folder) { @@ -846,7 +846,7 @@ message_list_copy(MessageList *ml, gboolean cut) p->clipboard.folder_uri = g_strdup(ml->folder_uri); gtk_selection_owner_set(p->invisible, GDK_SELECTION_CLIPBOARD, gtk_get_current_event_time()); } else { - message_list_free_uids(ml, uids); + em_utils_uids_free(uids); gtk_selection_owner_set(NULL, GDK_SELECTION_CLIPBOARD, gtk_get_current_event_time()); } } @@ -2046,7 +2046,7 @@ ml_tree_drag_data_get (ETree *tree, gint row, ETreePath path, gint col, } } - message_list_free_uids(ml, uids); + em_utils_uids_free(uids); } /* TODO: merge this with the folder tree stuff via empopup targets */ @@ -2891,7 +2891,7 @@ build_tree (MessageList *ml, CamelFolderThread *thread, CamelFolderChangeInfo *c e_tree_memory_thaw(E_TREE_MEMORY(etm)); #ifdef BROKEN_ETREE message_list_set_selected(ml, selected); - message_list_free_uids(ml, selected); + em_utils_uids_free(selected); #else } else { static gint tree_equal(ETreeModel *etm, ETreePath ap, CamelFolderThreadNode *bp); @@ -3216,7 +3216,7 @@ build_flat (MessageList *ml, GPtrArray *summary, CamelFolderChangeInfo *changes) e_tree_memory_thaw(E_TREE_MEMORY(etm)); #ifdef BROKEN_ETREE message_list_set_selected(ml, selected); - message_list_free_uids(ml, selected); + em_utils_uids_free(selected); #else } #endif @@ -3618,7 +3618,7 @@ on_selection_changed_cmd(ETree *tree, MessageList *ml) ml->last_sel_single = uids->len == 1; - message_list_free_uids(ml, uids); + em_utils_uids_free(uids); } static gint @@ -3750,15 +3750,6 @@ message_list_thaw(MessageList *ml) } } -void message_list_free_uids(MessageList *ml, GPtrArray *uids) -{ - gint i; - - for (i=0;i<uids->len;i++) - g_free(uids->pdata[i]); - g_ptr_array_free(uids, TRUE); -} - /* set whether we are in threaded view or flat view */ void message_list_set_threaded_expand_all (MessageList *ml) diff --git a/mail/message-list.h b/mail/message-list.h index 4c3e1e4996..96ef42b91c 100644 --- a/mail/message-list.h +++ b/mail/message-list.h @@ -194,7 +194,6 @@ void message_list_thaw(MessageList *ml); GPtrArray *message_list_get_uids(MessageList *message_list); GPtrArray *message_list_get_selected(MessageList *ml); void message_list_set_selected(MessageList *ml, GPtrArray *uids); -void message_list_free_uids(MessageList *ml, GPtrArray *uids); /* select next/prev message helpers */ gboolean message_list_select (MessageList *message_list, diff --git a/modules/mail/e-mail-shell-view-actions.c b/modules/mail/e-mail-shell-view-actions.c index d9785a9cdf..a23f0a8dc2 100644 --- a/modules/mail/e-mail-shell-view-actions.c +++ b/modules/mail/e-mail-shell-view-actions.c @@ -252,7 +252,7 @@ action_mail_folder_mark_all_as_read_cb (GtkAction *action, CAMEL_MESSAGE_SEEN, CAMEL_MESSAGE_SEEN); camel_folder_thaw (folder); - message_list_free_uids (MESSAGE_LIST (message_list), uids); + em_utils_uids_free (uids); } static void @@ -485,7 +485,7 @@ action_mail_hide_selected_cb (GtkAction *action, uids = message_list_get_selected (MESSAGE_LIST (message_list)); message_list_hide_uids (MESSAGE_LIST (message_list), uids); - message_list_free_uids (MESSAGE_LIST (message_list), uids); + em_utils_uids_free (uids); } static void @@ -520,7 +520,7 @@ action_mail_label_cb (GtkToggleAction *action, } } - message_list_free_uids (MESSAGE_LIST (message_list), uids); + em_utils_uids_free (uids); } static void @@ -589,7 +589,7 @@ action_mail_label_new_cb (GtkAction *action, camel_folder_set_message_user_flag ( folder, uids->pdata[ii], label_tag, TRUE); - message_list_free_uids (MESSAGE_LIST (message_list), uids); + em_utils_uids_free (uids); g_free (label_tag); @@ -647,7 +647,7 @@ action_mail_label_none_cb (GtkAction *action, valid = gtk_tree_model_iter_next (tree_model, &iter); } - message_list_free_uids (MESSAGE_LIST (message_list), uids); + em_utils_uids_free (uids); } static void @@ -1747,7 +1747,7 @@ e_mail_shell_view_update_popup_labels (EMailShellView *mail_shell_view) ii++; } - message_list_free_uids (MESSAGE_LIST (message_list), uids); + em_utils_uids_free (uids); g_object_unref (tree_model); } diff --git a/modules/mail/e-mail-shell-view-private.c b/modules/mail/e-mail-shell-view-private.c index 86f166d916..ab48de07cd 100644 --- a/modules/mail/e-mail-shell-view-private.c +++ b/modules/mail/e-mail-shell-view-private.c @@ -893,7 +893,7 @@ e_mail_shell_view_update_sidebar (EMailShellView *mail_shell_view) num_visible), num_visible); } - message_list_free_uids (message_list, selected); + em_utils_uids_free (selected); /* Choose a suitable folder name for displaying. */ if (folder->parent_store == local_store && ( diff --git a/plugins/groupwise-features/gw-ui.c b/plugins/groupwise-features/gw-ui.c index 6a79cd3b0f..4a33a692cd 100644 --- a/plugins/groupwise-features/gw-ui.c +++ b/plugins/groupwise-features/gw-ui.c @@ -26,6 +26,7 @@ #include <mail/e-mail-reader.h> #include <mail/em-folder-tree.h> #include <mail/em-folder-tree-model.h> +#include <mail/em-utils.h> #include <mail/message-list.h> #include <calendar/gui/e-calendar-view.h> @@ -215,7 +216,7 @@ update_mmp_entries_cb (EShellView *shell_view, gpointer user_data) if (selected) n_selected = selected->len; - message_list_free_uids (MESSAGE_LIST (message_list), selected); + em_utils_uids_free (selected); visible = n_selected > 0; } diff --git a/plugins/groupwise-features/mail-retract.c b/plugins/groupwise-features/mail-retract.c index 01bf11c6fe..adb97e250e 100644 --- a/plugins/groupwise-features/mail-retract.c +++ b/plugins/groupwise-features/mail-retract.c @@ -32,6 +32,7 @@ #include <e-util/e-alert.h> #include <mail/e-mail-reader.h> +#include <mail/em-utils.h> #include <mail/message-list.h> #include "gw-ui.h" @@ -57,7 +58,7 @@ get_selected_info (EShellView *shell_view, CamelFolder **folder, gchar **selecte *selected_uid = g_strdup (g_ptr_array_index (selected, 0)); } - message_list_free_uids (MESSAGE_LIST (message_list), selected); + em_utils_uids_free (selected); return *selected_uid != NULL; } diff --git a/plugins/groupwise-features/status-track.c b/plugins/groupwise-features/status-track.c index 45d0a206c6..018e69261a 100644 --- a/plugins/groupwise-features/status-track.c +++ b/plugins/groupwise-features/status-track.c @@ -38,6 +38,7 @@ #include <camel/camel-mime-message.h> #include <mail/e-mail-reader.h> +#include <mail/em-utils.h> #include <mail/message-list.h> #include <e-gw-connection.h> @@ -81,7 +82,7 @@ get_selected_message (EShellView *shell_view, CamelFolder **folder, gchar **sele msg = camel_folder_get_message (*folder, *selected_uid, NULL); } - message_list_free_uids (MESSAGE_LIST (message_list), selected); + em_utils_uids_free (selected); return msg; } |