diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2006-01-25 06:53:07 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2006-01-25 06:53:07 +0000 |
commit | 34a24148d4315d15e092760c983ff45115a32e00 (patch) | |
tree | 0592ef51839ecb8ebc2d01ccff57bc11dcb91eb5 /src | |
parent | eca7e29772e97171adbcdad759c11dbd945c7f66 (diff) |
don't show 'Empty trash' dialog if trashed messages don't exist.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@927 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src')
-rw-r--r-- | src/folderview.c | 6 | ||||
-rw-r--r-- | src/mainwindow.c | 3 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/folderview.c b/src/folderview.c index 8349b9e5..5a903324 100644 --- a/src/folderview.c +++ b/src/folderview.c @@ -1605,8 +1605,10 @@ static gboolean folderview_menu_popup(FolderView *folderview, rename_folder = delete_folder = TRUE; if (folder->klass->move_folder) move_folder = TRUE; - } else if (item->stype == F_TRASH) - empty_trash = TRUE; + } else if (item->stype == F_TRASH) { + if (item->total > 0) + empty_trash = TRUE; + } } else if (FOLDER_TYPE(folder) == F_NEWS) { if (item->parent != NULL) delete_folder = TRUE; diff --git a/src/mainwindow.c b/src/mainwindow.c index e42f6f89..632355de 100644 --- a/src/mainwindow.c +++ b/src/mainwindow.c @@ -1616,6 +1616,9 @@ void main_window_empty_trash(MainWindow *mainwin, gboolean confirm) { GList *list; + if (!procmsg_trash_messages_exist()) + return; + if (confirm) { if (alertpanel(_("Empty all trash"), _("Delete all messages in trash folders?"), |