diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2004-02-19 03:33:41 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2004-02-19 03:33:41 +0800 |
commit | 327242a925af1a111d07dc1f9171b4bead02e85f (patch) | |
tree | c891fd5ebd85b7a2d87bbf791fdba96573108f86 /mail/mail-folder-cache.c | |
parent | c67d072763b1bb27263e63f3dac6b1d0e70cc3f1 (diff) | |
download | gsoc2013-evolution-327242a925af1a111d07dc1f9171b4bead02e85f.tar.gz gsoc2013-evolution-327242a925af1a111d07dc1f9171b4bead02e85f.tar.zst gsoc2013-evolution-327242a925af1a111d07dc1f9171b4bead02e85f.zip |
Updated for em-popup API change (altho currently passes a dummy value).
2004-02-12 Jeffrey Stedfast <fejj@ximian.com>
* em-folder-tree.c (emft_tree_button_press): Updated for em-popup
API change (altho currently passes a dummy value).
* em-popup.c (em_popup_target_new_folder): Check for vTrash/vJunk
by checking the CAMEL_FOLDER_VIRTUAL info flags bit. (perhaps this
flag should be renamed to SPECIAL? VIRTUAL might not have been a
good name). Also changed to check flags & CAMEL_FOLDER_NOSELECT
rather than checking the uri string for a noselect param.
* mail-folder-cache.c (unset_folder_info): Instead of checking for
";noselect" in the uri, check for a CAMEL_FOLDER_NOSELECT flag on
mfi->flags.
(setup_folder): Copy the fi->flags to mfi->flags here.
(rename_folders): Same.
(setup_folder): Check fi->flags for CAMEL_FOLDER_NOSELECT here
instead.
(rename_folders): Same. Also gets rid of a FIXME.
svn path=/trunk/; revision=24784
Diffstat (limited to 'mail/mail-folder-cache.c')
-rw-r--r-- | mail/mail-folder-cache.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/mail/mail-folder-cache.c b/mail/mail-folder-cache.c index 0887f55bca..ecadeb50b5 100644 --- a/mail/mail-folder-cache.c +++ b/mail/mail-folder-cache.c @@ -69,7 +69,9 @@ struct _folder_info { char *path; /* shell path */ char *full_name; /* full name of folder/folderinfo */ char *uri; /* uri of folder */ - + + guint32 flags; + CamelFolder *folder; /* if known */ }; @@ -272,7 +274,7 @@ unset_folder_info(struct _folder_info *mfi, int delete, int unsub) camel_object_unhook_event(folder, "finalize", folder_finalised, mfi); } - if (strstr(mfi->uri, ";noselect") == NULL) { + if (mfi->flags & CAMEL_FOLDER_NOSELECT) { up = g_malloc0(sizeof(*up)); up->remove = TRUE; @@ -377,6 +379,8 @@ setup_folder(CamelFolderInfo *fi, struct _store_info *si) mfi->full_name = g_strdup(fi->full_name); mfi->uri = g_strdup(fi->url); mfi->store_info = si; + mfi->flags = fi->flags; + g_hash_table_insert(si->folders, mfi->full_name, mfi); g_hash_table_insert(si->folders_uri, mfi->uri, mfi); @@ -387,7 +391,8 @@ setup_folder(CamelFolderInfo *fi, struct _store_info *si) up->unread = (fi->unread_message_count==-1)?0:fi->unread_message_count; up->store = si->store; camel_object_ref(up->store); - if (strstr(fi->url, ";noselect") == NULL) + + if (fi->flags & CAMEL_FOLDER_NOSELECT) up->add = TRUE; e_dlist_addtail(&updates, (EDListNode *)up); @@ -595,6 +600,8 @@ rename_folders(struct _store_info *si, const char *oldbase, const char *newbase, mfi->path = g_strdup(fi->path); mfi->full_name = g_strdup(fi->full_name); mfi->uri = g_strdup(fi->url); + mfi->flags = fi->flags; + g_hash_table_insert(si->folders, mfi->full_name, mfi); g_hash_table_insert(si->folders_uri, mfi->uri, mfi); } else { @@ -605,6 +612,8 @@ rename_folders(struct _store_info *si, const char *oldbase, const char *newbase, mfi->full_name = g_strdup(fi->full_name); mfi->uri = g_strdup(fi->url); mfi->store_info = si; + mfi->flags = fi->flags; + g_hash_table_insert(si->folders, mfi->full_name, mfi); g_hash_table_insert(si->folders_uri, mfi->uri, mfi); } @@ -617,8 +626,8 @@ rename_folders(struct _store_info *si, const char *oldbase, const char *newbase, up->unread = fi->unread_message_count==-1?0:fi->unread_message_count; up->store = si->store; camel_object_ref(up->store); - /* FIXME: use fi->flags */ - if (strstr(fi->url, ";noselect") == NULL) + + if (fi->flags & CAMEL_FOLDER_NOSELECT) up->add = TRUE; e_dlist_addtail(&updates, (EDListNode *)up); |