diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2004-02-19 04:36:53 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2004-02-19 04:36:53 +0800 |
commit | a9ce8971bd4898b129fd6ff7e622204f3798ebaf (patch) | |
tree | 07e6afab8122c31e2c28fdead1938c039d66c9f2 | |
parent | c78fb71c1d633687a6c657e024bd9057675545b9 (diff) | |
download | gsoc2013-evolution-a9ce8971bd4898b129fd6ff7e622204f3798ebaf.tar.gz gsoc2013-evolution-a9ce8971bd4898b129fd6ff7e622204f3798ebaf.tar.zst gsoc2013-evolution-a9ce8971bd4898b129fd6ff7e622204f3798ebaf.zip |
Pass flags to em_popup_target_new_folder() instead of just an isstore arg.
2004-02-18 Jeffrey Stedfast <fejj@ximian.com>
* em-folder-tree.c (emft_tree_button_press): Pass flags to
em_popup_target_new_folder() instead of just an isstore arg.
(emft_tree_button_press): Fake the fi flags for vTrash/vJunk so
that em-popup.c can disable the delete flag for these.
svn path=/trunk/; revision=24787
-rw-r--r-- | mail/ChangeLog | 2 | ||||
-rw-r--r-- | mail/em-folder-tree.c | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index a2bae13be6..d68f31dca7 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -2,6 +2,8 @@ * em-folder-tree.c (emft_tree_button_press): Pass flags to em_popup_target_new_folder() instead of just an isstore arg. + (emft_tree_button_press): Fake the fi flags for vTrash/vJunk so + that em-popup.c can disable the delete flag for these. * em-popup.c (em_popup_target_new_folder): Instead of taking an isstore argument, take a flags argument so that our caller can diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c index 28f70ac3b4..fa537761ab 100644 --- a/mail/em-folder-tree.c +++ b/mail/em-folder-tree.c @@ -2209,6 +2209,7 @@ emft_tree_button_press (GtkWidget *treeview, GdkEventButton *event, EMFolderTree GtkTreeModel *model; GtkTreeIter iter; GSList *menus = NULL; + guint32 info_flags = 0; guint32 flags = 0; gboolean isstore; char *uri, *path; @@ -2242,11 +2243,15 @@ emft_tree_button_press (GtkWidget *treeview, GdkEventButton *event, EMFolderTree if (!(store == local && is_special_local_folder (folder_name))) flags |= EM_POPUP_FOLDER_DELETE; + /* hack for vTrash/vJunk */ + if (!strcmp (folder_name, CAMEL_VTRASH_NAME) || !strcmp (folder_name, CAMEL_VJUNK_NAME)) + info_flags |= CAMEL_FOLDER_VIRTUAL | CAMEL_FOLDER_NOINFERIORS; + /* handle right-click by opening a context menu */ emp = em_popup_new ("com.ximian.mail.storageset.popup.select"); /* FIXME: pass valid fi->flags here */ - target = em_popup_target_new_folder (uri, /* fi->flags */ 0, flags); + target = em_popup_target_new_folder (uri, info_flags, flags); for (i = 0; i < sizeof (emft_popup_menu) / sizeof (emft_popup_menu[0]); i++) { EMPopupItem *item = &emft_popup_menu[i]; |