evolution-data-server r8470 - trunk/camel/providers/imap
- From: mcrha svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution-data-server r8470 - trunk/camel/providers/imap
- Date: Fri, 8 Feb 2008 15:49:27 +0000 (GMT)
Author: mcrha
Date: Fri Feb 8 15:49:26 2008
New Revision: 8470
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=8470&view=rev
Log:
2008-02-08 Milan Crha <mcrha redhat com>
** Fix for bug #505806
* camel-imap-folder.c: (imap_sync_online), (do_append):
* camel-imap-utils.h: (imap_create_flag_list): Change of the prototype.
* camel-imap-utils.c: (imap_create_flag_list):
Store user flags on the server only when supported by the server.
Modified:
trunk/camel/providers/imap/ChangeLog
trunk/camel/providers/imap/camel-imap-folder.c
trunk/camel/providers/imap/camel-imap-utils.c
trunk/camel/providers/imap/camel-imap-utils.h
Modified: trunk/camel/providers/imap/camel-imap-folder.c
==============================================================================
--- trunk/camel/providers/imap/camel-imap-folder.c (original)
+++ trunk/camel/providers/imap/camel-imap-folder.c Fri Feb 8 15:49:26 2008
@@ -970,7 +970,7 @@
/* FIXME: since we don't know the previously set flags,
if unset is TRUE then just unset all the flags? */
/* FIXME: Sankar: What about custom flags ? */
- flaglist = imap_create_flag_list (unset ? folder->permanent_flags : info->info.flags & folder->permanent_flags, (CamelMessageInfo *)info);
+ flaglist = imap_create_flag_list (unset ? folder->permanent_flags : info->info.flags & folder->permanent_flags, (CamelMessageInfo *)info, folder->permanent_flags);
/* Note: to `unset' flags, use -FLAGS.SILENT (<flag list>) */
response = camel_imap_command (store, folder, &local_ex,
@@ -1362,7 +1362,7 @@
flags &= folder->permanent_flags;
if (flags)
- flagstr = imap_create_flag_list (flags, (CamelMessageInfo *)info);
+ flagstr = imap_create_flag_list (flags, (CamelMessageInfo *)info, folder->permanent_flags);
else
flagstr = NULL;
Modified: trunk/camel/providers/imap/camel-imap-utils.c
==============================================================================
--- trunk/camel/providers/imap/camel-imap-utils.c (original)
+++ trunk/camel/providers/imap/camel-imap-utils.c Fri Feb 8 15:49:26 2008
@@ -497,7 +497,7 @@
}
char *
-imap_create_flag_list (guint32 flags, CamelMessageInfo *info)
+imap_create_flag_list (guint32 flags, CamelMessageInfo *info, guint32 permanent_flags)
{
GString *gstr = g_string_new ("(");
@@ -511,10 +511,11 @@
g_string_append (gstr, "\\Flagged ");
if (flags & CAMEL_MESSAGE_SEEN)
g_string_append (gstr, "\\Seen ");
- if (flags & CAMEL_MESSAGE_JUNK)
+ if ((flags & CAMEL_MESSAGE_JUNK) != 0 && (permanent_flags & CAMEL_MESSAGE_JUNK) != 0)
g_string_append (gstr, "Junk ");
- if (info) {
+ /* send user flags to the server only when it supports it, otherwise store it locally only */
+ if (info && (permanent_flags & CAMEL_MESSAGE_USER) != 0) {
const CamelFlag *flag;
const char *name;
Modified: trunk/camel/providers/imap/camel-imap-utils.h
==============================================================================
--- trunk/camel/providers/imap/camel-imap-utils.h (original)
+++ trunk/camel/providers/imap/camel-imap-utils.h Fri Feb 8 15:49:26 2008
@@ -52,7 +52,7 @@
char **imap_parse_folder_name (CamelImapStore *store, const char *folder_name);
-char *imap_create_flag_list (guint32 flags, CamelMessageInfo *info);
+char *imap_create_flag_list (guint32 flags, CamelMessageInfo *info, guint32 permanent_flags);
gboolean imap_parse_flag_list (char **flag_list_p, guint32 *flags_out, char **custom_flags_out);
enum { IMAP_STRING, IMAP_NSTRING, IMAP_ASTRING };
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]