aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-popup.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2004-02-19 03:33:41 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2004-02-19 03:33:41 +0800
commit327242a925af1a111d07dc1f9171b4bead02e85f (patch)
treec891fd5ebd85b7a2d87bbf791fdba96573108f86 /mail/em-popup.c
parentc67d072763b1bb27263e63f3dac6b1d0e70cc3f1 (diff)
downloadgsoc2013-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/em-popup.c')
-rw-r--r--mail/em-popup.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/mail/em-popup.c b/mail/em-popup.c
index 4a8d86aeec..8f154ade93 100644
--- a/mail/em-popup.c
+++ b/mail/em-popup.c
@@ -46,6 +46,7 @@
#include "e-util/e-msgport.h"
#include "em-utils.h"
+#include <camel/camel-store.h>
#include <camel/camel-folder.h>
#include <camel/camel-mime-message.h>
#include <camel/camel-string-utils.h>
@@ -584,7 +585,7 @@ em_popup_target_new_part(struct _CamelMimePart *part, const char *mime_type)
/* TODO: This should be based on the CamelFolderInfo, but ... em-folder-tree doesn't keep it? */
EMPopupTarget *
-em_popup_target_new_folder(const char *uri, int isstore)
+em_popup_target_new_folder(const char *uri, guint32 info_flags, int isstore)
{
EMPopupTarget *t = g_malloc0(sizeof(*t));
guint32 mask = ~0;
@@ -619,15 +620,14 @@ em_popup_target_new_folder(const char *uri, int isstore)
/* more hack, for maildir root */
|| strcmp(path, ".") == 0))
mask |= EM_POPUP_FOLDER_DELETE|EM_POPUP_FOLDER_INFERIORS;
-
- /* since vtrash/vjunk currently make scarily bogus
- * url's, we have to check this too */
- if (strcmp(url->protocol, "vtrash") == 0
- || strcmp(url->protocol, "vjunk") == 0)
- mask |= EM_POPUP_FOLDER_DELETE|EM_POPUP_FOLDER_INFERIORS;
+
/* end hack bit */
-
- if (camel_url_get_param(url, "noselect") == NULL)
+
+ /* check for vTrash/vJunk */
+ if (info_flags & CAMEL_FOLDER_VIRTUAL)
+ mask |= EM_POPUP_FOLDER_DELETE|EM_POPUP_FOLDER_INFERIORS;
+
+ if (info_flags & CAMEL_FOLDER_NOSELECT)
mask &= ~EM_POPUP_FOLDER_SELECT;
}