aboutsummaryrefslogtreecommitdiffstats
path: root/mail/message-list.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2004-05-05 21:28:03 +0800
committerMichael Zucci <zucchi@src.gnome.org>2004-05-05 21:28:03 +0800
commit6cb88a7819367f8ece5b563a2910571d3c46f77e (patch)
treef0e65c5b29f03df042d276ae5ee2f9a14c0935c3 /mail/message-list.c
parent8eef58bfe428505bc48fe4a2df67d81d04516526 (diff)
downloadgsoc2013-evolution-6cb88a7819367f8ece5b563a2910571d3c46f77e.tar.gz
gsoc2013-evolution-6cb88a7819367f8ece5b563a2910571d3c46f77e.tar.zst
gsoc2013-evolution-6cb88a7819367f8ece5b563a2910571d3c46f77e.zip
** See bug #57720.
2004-05-05 Not Zed <NotZed@Ximian.com> ** See bug #57720. * em-folder-browser.c (emfb_create_view_menus): removed some stuff done in create_view_instance in the superclass. * em-folder-view.c (emfv_create_view_instance): moved here from em-folder-browser, setup the view instance for the folder. (emfv_set_folder): if the folder is set, create the view instance. * em-folder-browser.c: moved the galview instance and menu pointers to EMFolderView, since they're basically meta-data on the messagelist @ to fix issues. * em-folder-view.c (em_folder_view_open_selected): copy over the threaded list value when the message browser is brought up. ** some clean up * evolution-mail.schemas.in.in: removed xmailer_mask stuff. * em-migrate.c (mail_display_map[]): Removed xmailer_mask stuff. * em-folder-view.c (emfv_setting_notify): removed xmailer_mask stuff. * em-format-html.c (em_format_html_set_xmailer_mask): removed. This isn't used anymore. ** Fixes the double-draw on separate mail view. * message-list.c (on_cursor_activated_cmd): noop if the cursor and uid match for all cases (clearing uid). (on_selection_changed_cmd): noop if the cursor and new selection hasn't changed & fix a memleak. svn path=/trunk/; revision=25806
Diffstat (limited to 'mail/message-list.c')
-rw-r--r--mail/message-list.c24
1 files changed, 17 insertions, 7 deletions
diff --git a/mail/message-list.c b/mail/message-list.c
index 138832c007..9ae5673bd2 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -2641,8 +2641,9 @@ on_cursor_activated_cmd (ETree *tree, int row, ETreePath path, gpointer user_dat
new_uid = NULL;
else
new_uid = get_message_uid (message_list, path);
-
- if (message_list->cursor_uid != NULL && new_uid != NULL && !strcmp (message_list->cursor_uid, new_uid))
+
+ if ((message_list->cursor_uid == NULL && new_uid == NULL)
+ || (message_list->cursor_uid != NULL && new_uid != NULL && !strcmp (message_list->cursor_uid, new_uid)))
return;
message_list->cursor_row = row;
@@ -2660,18 +2661,27 @@ static void
on_selection_changed_cmd(ETree *tree, MessageList *ml)
{
GPtrArray *uids;
+ char *newuid;
/* not sure if we could just ignore this for the cursor, i think sometimes you
only get a selection changed when you should also get a cursor activated? */
uids = message_list_get_selected(ml);
- g_free(ml->cursor_uid);
if (uids->len == 1)
- ml->cursor_uid = g_strdup(uids->pdata[0]);
+ newuid = uids->pdata[0];
else
- ml->cursor_uid = NULL;
+ newuid = NULL;
- if (!ml->idle_id)
- ml->idle_id = g_idle_add_full (G_PRIORITY_LOW, on_cursor_activated_idle, ml, NULL);
+ if ((newuid == NULL && ml->cursor_uid == NULL)
+ || (newuid != NULL && ml->cursor_uid != NULL && !strcmp(ml->cursor_uid, newuid))) {
+ /* noop */
+ } else {
+ g_free(ml->cursor_uid);
+ ml->cursor_uid = g_strdup(newuid);
+ if (!ml->idle_id)
+ ml->idle_id = g_idle_add_full (G_PRIORITY_LOW, on_cursor_activated_idle, ml, NULL);
+ }
+
+ message_list_free_uids(ml, uids);
}
static gint