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/camel-folder-summary.c | |
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/camel-folder-summary.c')
-rw-r--r-- | camel/camel-folder-summary.c | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/camel/camel-folder-summary.c b/camel/camel-folder-summary.c index 8ea51a7bbf..9a6a96c273 100644 --- a/camel/camel-folder-summary.c +++ b/camel/camel-folder-summary.c @@ -1977,8 +1977,10 @@ camel_flag_get(CamelFlag **list, const char *name) * @value: * * Set the state of a flag @name in the list @list to @value. + * + * Return value: Whether or not it changed. **/ -void +gboolean camel_flag_set(CamelFlag **list, const char *name, gboolean value) { CamelFlag *flag, *tmp; @@ -1992,7 +1994,7 @@ camel_flag_set(CamelFlag **list, const char *name, gboolean value) flag->next = tmp->next; g_free(tmp); } - return; + return !value; } flag = tmp; } @@ -2003,6 +2005,7 @@ camel_flag_set(CamelFlag **list, const char *name, gboolean value) tmp->next = 0; flag->next = tmp; } + return value; } /** @@ -2046,7 +2049,8 @@ camel_flag_list_free(CamelFlag **list) *list = NULL; } -const char *camel_tag_get(CamelTag **list, const char *name) +const char +*camel_tag_get(CamelTag **list, const char *name) { CamelTag *tag; @@ -2066,8 +2070,11 @@ const char *camel_tag_get(CamelTag **list, const char *name) * @value: * * Set the tag @name in the tag list @list to @value. + * + * Return value: whether or not it changed **/ -void camel_tag_set(CamelTag **list, const char *name, const char *value) +gboolean +camel_tag_set(CamelTag **list, const char *name, const char *value) { CamelTag *tag, *tmp; @@ -2080,11 +2087,13 @@ void camel_tag_set(CamelTag **list, const char *name, const char *value) tag->next = tmp->next; g_free(tmp->value); g_free(tmp); + return TRUE; } else if (strcmp(tmp->value, value)) { /* has it changed? */ g_free(tmp->value); tmp->value = g_strdup(value); + return TRUE; } - return; + return FALSE; } tag = tmp; } @@ -2095,7 +2104,9 @@ void camel_tag_set(CamelTag **list, const char *name, const char *value) tmp->value = g_strdup(value); tmp->next = 0; tag->next = tmp; + return TRUE; } + return FALSE; } /** |