diff options
author | Not Zed <NotZed@Ximian.com> | 2004-02-06 14:31:02 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2004-02-06 14:31:02 +0800 |
commit | 734a27187b7c4495f377c8533f9affdcf860dbbc (patch) | |
tree | d4e7496e6844564a592706e0fd3f74e5d4d0e4c6 /camel/providers/pop3 | |
parent | 9fe2942fe8ed2a561c9a3098f8a3655ae2691fcd (diff) | |
download | gsoc2013-evolution-734a27187b7c4495f377c8533f9affdcf860dbbc.tar.gz gsoc2013-evolution-734a27187b7c4495f377c8533f9affdcf860dbbc.tar.zst gsoc2013-evolution-734a27187b7c4495f377c8533f9affdcf860dbbc.zip |
changed to return a boolean to indicate if the flags were actually changed
2004-02-06 Not Zed <NotZed@Ximian.com>
* camel-folder.c (camel_folder_set_message_flags): changed to
return a boolean to indicate if the flags were actually changed or
not. Fixed all implementors.
svn path=/trunk/; revision=24643
Diffstat (limited to 'camel/providers/pop3')
-rw-r--r-- | camel/providers/pop3/camel-pop3-folder.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/camel/providers/pop3/camel-pop3-folder.c b/camel/providers/pop3/camel-pop3-folder.c index db77ad8191..edb71802bc 100644 --- a/camel/providers/pop3/camel-pop3-folder.c +++ b/camel/providers/pop3/camel-pop3-folder.c @@ -54,7 +54,7 @@ static void pop3_sync (CamelFolder *folder, gboolean expunge, CamelException *ex static gint pop3_get_message_count (CamelFolder *folder); static GPtrArray *pop3_get_uids (CamelFolder *folder); static CamelMimeMessage *pop3_get_message (CamelFolder *folder, const char *uid, CamelException *ex); -static void pop3_set_message_flags (CamelFolder *folder, const char *uid, guint32 flags, guint32 set); +static gboolean pop3_set_message_flags (CamelFolder *folder, const char *uid, guint32 flags, guint32 set); static void camel_pop3_folder_class_init (CamelPOP3FolderClass *camel_pop3_folder_class) @@ -522,15 +522,24 @@ fail: return message; } -static void +static gboolean pop3_set_message_flags (CamelFolder *folder, const char *uid, guint32 flags, guint32 set) { CamelPOP3Folder *pop3_folder = CAMEL_POP3_FOLDER (folder); CamelPOP3FolderInfo *fi; + gboolean res = FALSE; fi = g_hash_table_lookup(pop3_folder->uids_uid, uid); - if (fi) - fi->flags = (fi->flags & ~flags) | (set & flags); + if (fi) { + guint32 new = (fi->flags & ~flags) | (set & flags); + + if (fi->flags != new) { + fi->flags = new; + res = TRUE; + } + } + + return res; } static gint |