aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/imap
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2000-10-20 04:30:43 +0800
committerDan Winship <danw@src.gnome.org>2000-10-20 04:30:43 +0800
commit24e77716ce81735b648302bc118557f2c9df273d (patch)
tree1a5edd93ebd63fa192e51bbb01164337a1b453eb /camel/providers/imap
parentfd66663d157d72222d7e99cad417a9a6a53608d0 (diff)
downloadgsoc2013-evolution-24e77716ce81735b648302bc118557f2c9df273d.tar.gz
gsoc2013-evolution-24e77716ce81735b648302bc118557f2c9df273d.tar.zst
gsoc2013-evolution-24e77716ce81735b648302bc118557f2c9df273d.zip
Update comment here so refresh_info isn't just for reconnects any more.
* camel-folder.c (camel_folder_refresh_info): Update comment here so refresh_info isn't just for reconnects any more. Make the default implementation a no-op rather than an error. * providers/nntp/camel-nntp-folder.c: Move refresh_info impl into camel_nntp_folder_new, since it would have leaked memory and not done anything useful if it was called later. * providers/mbox/camel-mbox-folder.c: Remove no-longer-necessary refresh_info impl. * providers/imap/camel-imap-folder.c (camel_imap_folder_changed): Update imap_folder->exists, but don't actually load the new messages. This is a temporary workaround to deal with the IMAP provider stealing the message list focus at annoying times. (imap_copy_message_to, imap_move_message_to): Emit a folder_changed by hand, for now. svn path=/trunk/; revision=6046
Diffstat (limited to 'camel/providers/imap')
-rw-r--r--camel/providers/imap/camel-imap-folder.c29
1 files changed, 19 insertions, 10 deletions
diff --git a/camel/providers/imap/camel-imap-folder.c b/camel/providers/imap/camel-imap-folder.c
index 38dd495eac..cd9e374bc6 100644
--- a/camel/providers/imap/camel-imap-folder.c
+++ b/camel/providers/imap/camel-imap-folder.c
@@ -475,9 +475,16 @@ imap_copy_message_to (CamelFolder *source, const char *uid,
uid, folder_path);
camel_imap_response_free (response);
g_free (folder_path);
+
+ /* FIXME: This should go away once folder_changed is being
+ * emitted by camel_imap_folder_changed on appends again.
+ */
+ if (!camel_exception_is_set (ex)) {
+ camel_object_trigger_event (CAMEL_OBJECT (destination),
+ "folder_changed", NULL);
+ }
}
-/* FIXME: Duplication of code! */
static void
imap_move_message_to (CamelFolder *source, const char *uid,
CamelFolder *destination, CamelException *ex)
@@ -495,6 +502,12 @@ imap_move_message_to (CamelFolder *source, const char *uid,
if (camel_exception_is_set (ex))
return;
+ /* FIXME: This should go away once folder_changed is being
+ * emitted by camel_imap_folder_changed on appends again.
+ */
+ camel_object_trigger_event (CAMEL_OBJECT (destination),
+ "folder_changed", NULL);
+
camel_folder_delete_message (source, uid);
}
@@ -804,17 +817,13 @@ camel_imap_folder_changed (CamelFolder *folder, int exists,
for (i = 0; i < expunged->len; i++) {
id = g_array_index (expunged, int, i);
- d(fprintf (stderr, "Expunging message %d from the summary (i = %d)\n", id + i, i));
- camel_folder_summary_remove_index (imap_folder->summary, id - 1);
+ camel_folder_summary_remove_index (
+ imap_folder->summary, id - 1);
}
+ camel_object_trigger_event (CAMEL_OBJECT (folder),
+ "folder_changed", NULL);
}
- if (exists > imap_folder->exists) {
- int old = imap_folder->exists;
-
+ if (exists != 0)
imap_folder->exists = exists;
- imap_update_summary (folder, old + 1, exists, ex);
- }
-
- camel_object_trigger_event (CAMEL_OBJECT (folder), "folder_changed", NULL);
}