diff options
author | Dan Winship <danw@src.gnome.org> | 2000-12-06 00:46:15 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2000-12-06 00:46:15 +0800 |
commit | 8d4e508f40ad5910d240868b6885ab9473751b78 (patch) | |
tree | 42859cb6fc74ee4503cac63e0c72eddc3b57e759 /camel/providers/local | |
parent | b05a2b14c8c4609548fa286807dd3371c9302d1e (diff) | |
download | gsoc2013-evolution-8d4e508f40ad5910d240868b6885ab9473751b78.tar.gz gsoc2013-evolution-8d4e508f40ad5910d240868b6885ab9473751b78.tar.zst gsoc2013-evolution-8d4e508f40ad5910d240868b6885ab9473751b78.zip |
Fix the check for "flags aren't actually changing".
* providers/imap/camel-imap-folder.c (imap_set_message_flags): Fix
the check for "flags aren't actually changing".
* providers/local/camel-local-folder.c (local_set_message_flags,
local_set_message_user_flag, local_set_message_user_tag): Don't
emit message_changed unless the flags actually changed.
* providers/nntp/camel-nntp-folder.c
(nntp_folder_set_message_flags): Don't emit message_changed unless
the flags actually changed. Fix the check for marked as seen.
svn path=/trunk/; revision=6797
Diffstat (limited to 'camel/providers/local')
-rw-r--r-- | camel/providers/local/camel-local-folder.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/camel/providers/local/camel-local-folder.c b/camel/providers/local/camel-local-folder.c index c1c3256865..931c95a114 100644 --- a/camel/providers/local/camel-local-folder.c +++ b/camel/providers/local/camel-local-folder.c @@ -436,11 +436,16 @@ local_set_message_flags(CamelFolder *folder, const char *uid, guint32 flags, gui { CamelMessageInfo *info; CamelLocalFolder *mf = CAMEL_LOCAL_FOLDER(folder); + guint32 new; info = camel_folder_summary_uid(CAMEL_FOLDER_SUMMARY(mf->summary), uid); g_return_if_fail(info != NULL); - info->flags = (info->flags & ~flags) | (set & flags) | CAMEL_MESSAGE_FOLDER_FLAGGED; + new = (info->flags & ~flags) | (set & flags); + if (new == info->flags) + return; + + info->flags = new | CAMEL_MESSAGE_FOLDER_FLAGGED; camel_folder_summary_touch(CAMEL_FOLDER_SUMMARY(mf->summary)); camel_object_trigger_event(CAMEL_OBJECT(folder), "message_changed", (char *) uid); @@ -467,7 +472,9 @@ local_set_message_user_flag(CamelFolder *folder, const char *uid, const char *na info = camel_folder_summary_uid(CAMEL_FOLDER_SUMMARY(mf->summary), uid); g_return_if_fail(info != NULL); - camel_flag_set(&info->user_flags, name, value); + if (!camel_flag_set(&info->user_flags, name, value)) + return; + info->flags |= CAMEL_MESSAGE_FOLDER_FLAGGED|CAMEL_MESSAGE_FOLDER_XEVCHANGE; camel_folder_summary_touch(CAMEL_FOLDER_SUMMARY(mf->summary)); camel_object_trigger_event(CAMEL_OBJECT(folder), "message_changed", (char *) uid); @@ -494,7 +501,9 @@ local_set_message_user_tag(CamelFolder *folder, const char *uid, const char *nam info = camel_folder_summary_uid(CAMEL_FOLDER_SUMMARY(mf->summary), uid); g_return_if_fail(info != NULL); - camel_tag_set(&info->user_tags, name, value); + if (!camel_tag_set(&info->user_tags, name, value)) + return; + info->flags |= CAMEL_MESSAGE_FOLDER_FLAGGED|CAMEL_MESSAGE_FOLDER_XEVCHANGE; camel_folder_summary_touch(CAMEL_FOLDER_SUMMARY(mf->summary)); camel_object_trigger_event(CAMEL_OBJECT(folder), "message_changed", (char *) uid); |