aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-popup.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2004-02-17 13:06:10 +0800
committerMichael Zucci <zucchi@src.gnome.org>2004-02-17 13:06:10 +0800
commit2edcc77ca4cab6e255a7c1830ca56302e3c5e2e0 (patch)
treee194d5ce77207a656bf17bcfec4d3c7ff21f2c73 /mail/em-popup.c
parent0c5435836a8cc45ec3d35edd57bf9ed9b05e6248 (diff)
downloadgsoc2013-evolution-2edcc77ca4cab6e255a7c1830ca56302e3c5e2e0.tar.gz
gsoc2013-evolution-2edcc77ca4cab6e255a7c1830ca56302e3c5e2e0.tar.zst
gsoc2013-evolution-2edcc77ca4cab6e255a7c1830ca56302e3c5e2e0.zip
** See bug #54200.
2004-02-17 Not Zed <NotZed@Ximian.com> ** See bug #54200. * em-popup.c (em_popup_target_new_select): add EM_POPUP_SELECT_FOLDER - to find out if we have a folder at all. Handle getting a NULL folder passed in. * em-folder-view.c (em_folder_view_get_popup_target): Added EM_FOLDER_VIEW_SELECT_FOLDER - to detect when we dont have a folder set on the emfolderview. * em-folder-browser.c (emfb_mark_all_read): if we don't have a folder, dont try and run. (emfb_enable_map[]): Disable a bunch of stuff we have no folder set. svn path=/trunk/; revision=24755
Diffstat (limited to 'mail/em-popup.c')
-rw-r--r--mail/em-popup.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/mail/em-popup.c b/mail/em-popup.c
index 58fbd9d2d8..4a8d86aeec 100644
--- a/mail/em-popup.c
+++ b/mail/em-popup.c
@@ -461,9 +461,17 @@ em_popup_target_new_select(struct _CamelFolder *folder, const char *folder_uri,
t->type = EM_POPUP_TARGET_SELECT;
t->data.select.uids = uids;
t->data.select.folder = folder;
- camel_object_ref(folder);
t->data.select.folder_uri = g_strdup(folder_uri);
+ if (folder == NULL) {
+ t->mask = mask;
+
+ return t;
+ }
+
+ camel_object_ref(folder);
+ mask &= ~EM_POPUP_SELECT_FOLDER;
+
if (em_utils_folder_is_sent(folder, folder_uri))
mask &= ~EM_POPUP_SELECT_RESEND;
@@ -635,7 +643,8 @@ em_popup_target_free(EMPopupTarget *t)
{
switch (t->type) {
case EM_POPUP_TARGET_SELECT:
- camel_object_unref(t->data.select.folder);
+ if (t->data.select.folder)
+ camel_object_unref(t->data.select.folder);
g_free(t->data.select.folder_uri);
if (t->data.select.uids)
em_utils_uids_free(t->data.select.uids);