aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/sa-junk-plugin/em-junk-filter.c
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@novell.com>2010-04-10 07:34:45 +0800
committerFederico Mena Quintero <federico@novell.com>2010-04-14 04:42:26 +0800
commit476bead4e5fce5b87ceb275a9b4861735f9d20da (patch)
treead6e486b26b6b8054b55f9d8499a45791e74994d /plugins/sa-junk-plugin/em-junk-filter.c
parent886a208b1c624a76e2dc3ad5fd90a6534eb0e30d (diff)
downloadgsoc2013-evolution-476bead4e5fce5b87ceb275a9b4861735f9d20da.tar
gsoc2013-evolution-476bead4e5fce5b87ceb275a9b4861735f9d20da.tar.gz
gsoc2013-evolution-476bead4e5fce5b87ceb275a9b4861735f9d20da.tar.bz2
gsoc2013-evolution-476bead4e5fce5b87ceb275a9b4861735f9d20da.tar.lz
gsoc2013-evolution-476bead4e5fce5b87ceb275a9b4861735f9d20da.tar.xz
gsoc2013-evolution-476bead4e5fce5b87ceb275a9b4861735f9d20da.tar.zst
gsoc2013-evolution-476bead4e5fce5b87ceb275a9b4861735f9d20da.zip
Hide the junk plugin options in Express mode
Signed-off-by: Federico Mena Quintero <federico@novell.com>
Diffstat (limited to 'plugins/sa-junk-plugin/em-junk-filter.c')
-rw-r--r--plugins/sa-junk-plugin/em-junk-filter.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/plugins/sa-junk-plugin/em-junk-filter.c b/plugins/sa-junk-plugin/em-junk-filter.c
index c0b59891a1..c8c53c6169 100644
--- a/plugins/sa-junk-plugin/em-junk-filter.c
+++ b/plugins/sa-junk-plugin/em-junk-filter.c
@@ -47,6 +47,7 @@
#include <gtk/gtk.h>
#include "mail/em-config.h"
+#include "shell/e-shell.h"
#include <gconf/gconf-client.h>
@@ -926,6 +927,7 @@ use_remote_tests_cb (GtkWidget *widget, gpointer data)
GtkWidget *
org_gnome_sa_use_remote_tests (struct _EPlugin *epl, struct _EConfigHookItemFactoryData *data)
{
+ EShell *shell;
GtkWidget *check, *vbox, *label;
gchar *text = g_strdup_printf (" <small>%s</small>", _("This will make SpamAssassin more reliable, but slower"));
guint i = ((GtkTable *)data->parent)->nrows;
@@ -944,7 +946,13 @@ org_gnome_sa_use_remote_tests (struct _EPlugin *epl, struct _EConfigHookItemFact
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), !em_junk_sa_local_only);
g_signal_connect (GTK_TOGGLE_BUTTON (check), "toggled", G_CALLBACK (use_remote_tests_cb), (gpointer) "/apps/evolution/mail/junk/sa/local_only");
gtk_table_attach((GtkTable *)data->parent, vbox, 0, 1, i, i+1, 0, 0, 0, 0);
- gtk_widget_show_all (vbox);
- return (GtkWidget *)vbox;
+
+ shell = e_shell_get_default ();
+ if (e_shell_get_express_mode (shell))
+ gtk_widget_hide (vbox);
+ else
+ gtk_widget_show_all (vbox);
+
+ return vbox;
}