From 2edcc77ca4cab6e255a7c1830ca56302e3c5e2e0 Mon Sep 17 00:00:00 2001 From: Not Zed Date: Tue, 17 Feb 2004 05:06:10 +0000 Subject: ** See bug #54200. 2004-02-17 Not Zed ** 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 --- mail/em-folder-browser.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'mail/em-folder-browser.c') diff --git a/mail/em-folder-browser.c b/mail/em-folder-browser.c index 745c44fa17..09d2a9b45e 100644 --- a/mail/em-folder-browser.c +++ b/mail/em-folder-browser.c @@ -562,7 +562,10 @@ emfb_mark_all_read(BonoboUIComponent *uid, void *data, const char *path) EMFolderView *emfv = data; GPtrArray *uids; int i; - + + if (emfv->folder == NULL) + return; + uids = camel_folder_get_uids(emfv->folder); camel_folder_freeze(emfv->folder); for (i=0;ilen;i++) @@ -709,7 +712,11 @@ static EPixmap emfb_pixmaps[] = { }; static const EMFolderViewEnable emfb_enable_map[] = { + { "EditInvertSelection", EM_POPUP_SELECT_FOLDER }, + { "EditSelectAll", EM_POPUP_SELECT_FOLDER }, { "EditSelectThread", EM_FOLDER_VIEW_SELECT_THREADED }, + { "MailPost", EM_POPUP_SELECT_FOLDER }, + { "MessageMarkAllAsRead", EM_POPUP_SELECT_FOLDER }, { "ViewHideSelected", EM_POPUP_SELECT_MANY }, { "ViewShowAll", EM_FOLDER_VIEW_SELECT_HIDDEN }, { NULL }, -- cgit