aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/imap/camel-imap-store.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@helixcode.com>2000-07-12 12:13:21 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2000-07-12 12:13:21 +0800
commitbc22c33ee2e0648493d7dc5208f8fb12c466b716 (patch)
treeb003e7c64750db6b5c51ff695b788b3d84511401 /camel/providers/imap/camel-imap-store.c
parent08b0dbea5a3b880d0d991b6c3618fa750d8c2f80 (diff)
downloadgsoc2013-evolution-bc22c33ee2e0648493d7dc5208f8fb12c466b716.tar
gsoc2013-evolution-bc22c33ee2e0648493d7dc5208f8fb12c466b716.tar.gz
gsoc2013-evolution-bc22c33ee2e0648493d7dc5208f8fb12c466b716.tar.bz2
gsoc2013-evolution-bc22c33ee2e0648493d7dc5208f8fb12c466b716.tar.lz
gsoc2013-evolution-bc22c33ee2e0648493d7dc5208f8fb12c466b716.tar.xz
gsoc2013-evolution-bc22c33ee2e0648493d7dc5208f8fb12c466b716.tar.zst
gsoc2013-evolution-bc22c33ee2e0648493d7dc5208f8fb12c466b716.zip
Updated to emit the message_changed signal. (imap_delete_message): Updated
2000-07-12 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-folder.c (imap_set_message_flags): Updated to emit the message_changed signal. (imap_delete_message): Updated to use imap_set_message_flags (). (imap_move_message_to): Updated to use imap_set_message_flags () and to emit the folder_changed signal on the destination folder. (imap_copy_message_to): Updated to emit the folder_changed signal on the destination folder. (imap_append_message): Updated to emit the folder_changed signal on the destination folder. svn path=/trunk/; revision=4105
Diffstat (limited to 'camel/providers/imap/camel-imap-store.c')
-rw-r--r--camel/providers/imap/camel-imap-store.c34
1 files changed, 29 insertions, 5 deletions
diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c
index e7c9d98673..d516694c6e 100644
--- a/camel/providers/imap/camel-imap-store.c
+++ b/camel/providers/imap/camel-imap-store.c
@@ -530,7 +530,7 @@ camel_imap_command (CamelImapStore *store, CamelFolder *folder, char **ret, char
if (folder && store->current_folder != folder && strncmp (fmt, "STATUS", 6) &&
strncmp (fmt, "CREATE", 5) && strcmp (fmt, "CAPABILITY")) {
/* We need to select the correct mailbox first */
- char *r, *folder_path;
+ char *r, *folder_path, *recent;
int s;
if (url && url->path && strcmp (folder->full_name, "INBOX"))
@@ -540,7 +540,7 @@ camel_imap_command (CamelImapStore *store, CamelFolder *folder, char **ret, char
s = camel_imap_command_extended (store, folder, &r, "SELECT %s", folder_path);
g_free (folder_path);
- if (s != CAMEL_IMAP_OK) {
+ if (!r || s != CAMEL_IMAP_OK) {
*ret = r;
return s;
} else {
@@ -548,7 +548,7 @@ camel_imap_command (CamelImapStore *store, CamelFolder *folder, char **ret, char
#if 0
char *p;
- p = strstr (result, "\n");
+ p = strstr (r, "\n");
while (p) {
if (*(p + 1) == '*')
p = strstr (p, "\n");
@@ -562,6 +562,18 @@ camel_imap_command (CamelImapStore *store, CamelFolder *folder, char **ret, char
}
#endif
}
+#if 0
+ if ((recent = strstrcase (r, "RECENT"))) {
+ char *p;
+
+ for (p = recent; p > r && *p != '*'; p--);
+ for ( ; *p && (*p < '0' || *p > '9') && p < recent; p++);
+
+ if (atoi (p) > 0)
+ gtk_signal_emit_by_name (GTK_OBJECT (folder), "folder_changed");
+ }
+#endif
+ g_free (r);
store->current_folder = folder;
}
@@ -649,7 +661,7 @@ camel_imap_command_extended (CamelImapStore *store, CamelFolder *folder, char **
strncmp (fmt, "EXAMINE", 7) && strncmp (fmt, "STATUS", 6) &&
strncmp (fmt, "CREATE", 6) && strcmp (fmt, "CAPABILITY")) {
/* We need to select the correct mailbox first */
- char *r, *folder_path;
+ char *r, *folder_path, *recent;
int s;
if (url && url->path && strcmp (folder->full_name, "INBOX"))
@@ -659,10 +671,22 @@ camel_imap_command_extended (CamelImapStore *store, CamelFolder *folder, char **
s = camel_imap_command_extended (store, folder, &r, "SELECT %s", folder_path);
g_free (folder_path);
- if (s != CAMEL_IMAP_OK) {
+ if (!r || s != CAMEL_IMAP_OK) {
*ret = r;
return s;
}
+#if 0
+ if ((recent = strstrcase (r, "RECENT"))) {
+ char *p;
+
+ for (p = recent; p > r && *p != '*'; p--);
+ for ( ; *p && (*p < '0' || *p > '9') && p < recent; p++);
+
+ if (atoi (p) > 0)
+ gtk_signal_emit_by_name (GTK_OBJECT (folder), "folder_changed");
+ }
+#endif
+ g_free (r);
store->current_folder = folder;
}