diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2009-12-02 00:57:32 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2009-12-02 04:01:14 +0800 |
commit | 76fbb9d23242cba427d71ded5590a9cad271b2b3 (patch) | |
tree | 8455d618023e0e82209e610868c9a43fbf41c00e /mail | |
parent | a0b641b7c6160bfda32ed2bcef40a364973a934b (diff) | |
download | gsoc2013-evolution-76fbb9d23242cba427d71ded5590a9cad271b2b3.tar.gz gsoc2013-evolution-76fbb9d23242cba427d71ded5590a9cad271b2b3.tar.zst gsoc2013-evolution-76fbb9d23242cba427d71ded5590a9cad271b2b3.zip |
Kill message_list_free_uids().
Use em_utils_uids_free() instead.
Diffstat (limited to 'mail')
-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 |
4 files changed, 16 insertions, 26 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, |