aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2010-05-21 22:30:40 +0800
committerMilan Crha <mcrha@redhat.com>2010-05-21 22:30:40 +0800
commita5d79e9f915dc49ef0259ce7681c1f552c335a4c (patch)
tree85a17cf63e8ac8fe68e0cb2ff8b42404f63917b1 /plugins
parent22b33668db988f628e411ef67ecc10520c9f20d3 (diff)
downloadgsoc2013-evolution-a5d79e9f915dc49ef0259ce7681c1f552c335a4c.tar
gsoc2013-evolution-a5d79e9f915dc49ef0259ce7681c1f552c335a4c.tar.gz
gsoc2013-evolution-a5d79e9f915dc49ef0259ce7681c1f552c335a4c.tar.bz2
gsoc2013-evolution-a5d79e9f915dc49ef0259ce7681c1f552c335a4c.tar.lz
gsoc2013-evolution-a5d79e9f915dc49ef0259ce7681c1f552c335a4c.tar.xz
gsoc2013-evolution-a5d79e9f915dc49ef0259ce7681c1f552c335a4c.tar.zst
gsoc2013-evolution-a5d79e9f915dc49ef0259ce7681c1f552c335a4c.zip
Bug #546551 - Dialog for mark-all-read always mentions subfolders
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mark-all-read/mark-all-read.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/plugins/mark-all-read/mark-all-read.c b/plugins/mark-all-read/mark-all-read.c
index 6f968ba0c6..f22b2276f0 100644
--- a/plugins/mark-all-read/mark-all-read.c
+++ b/plugins/mark-all-read/mark-all-read.c
@@ -30,6 +30,7 @@
#include <glib/gi18n.h>
#include <e-util/e-plugin-ui.h>
#include <mail/em-folder-tree.h>
+#include <mail/em-utils.h>
#include <mail/mail-ops.h>
#include <mail/mail-mt.h>
@@ -77,7 +78,7 @@ box_mapped_cb (GtkWidget *box,
}
static gint
-prompt_user (void)
+prompt_user (gboolean has_subfolders)
{
GtkWidget *container;
GtkWidget *dialog;
@@ -89,6 +90,11 @@ prompt_user (void)
gchar *markup;
gint response;
+ if (!has_subfolders) {
+ return em_utils_prompt_user (e_shell_get_active_window (e_shell_get_default ()), NULL, "mail:ask-mark-all-read", NULL) ?
+ GTK_RESPONSE_NO : GTK_RESPONSE_CANCEL;
+ }
+
dialog = gtk_dialog_new ();
widget = gtk_dialog_get_action_area (GTK_DIALOG (dialog));
gtk_widget_hide (widget);
@@ -371,7 +377,7 @@ mar_got_folder (gchar *folder_uri,
goto exit;
if (scan_folder_tree_for_unread (folder_uri) > 1)
- response = prompt_user ();
+ response = prompt_user (folder_info->child != NULL);
else
response = GTK_RESPONSE_NO;