aboutsummaryrefslogtreecommitdiffstats
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
parent886a208b1c624a76e2dc3ad5fd90a6534eb0e30d (diff)
downloadgsoc2013-evolution-476bead4e5fce5b87ceb275a9b4861735f9d20da.tar.gz
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>
-rw-r--r--plugins/bogo-junk-plugin/bf-junk-filter.c12
-rw-r--r--plugins/sa-junk-plugin/em-junk-filter.c12
2 files changed, 20 insertions, 4 deletions
diff --git a/plugins/bogo-junk-plugin/bf-junk-filter.c b/plugins/bogo-junk-plugin/bf-junk-filter.c
index 6d315da575..4190eebe86 100644
--- a/plugins/bogo-junk-plugin/bf-junk-filter.c
+++ b/plugins/bogo-junk-plugin/bf-junk-filter.c
@@ -51,6 +51,7 @@
#include <camel/camel-stream-fs.h>
#include <camel/camel-debug.h>
#include <gconf/gconf-client.h>
+#include "shell/e-shell.h"
#ifndef BOGOFILTER_BINARY
#define BOGOFILTER_BINARY "/usr/bin/bogofilter"
@@ -388,6 +389,7 @@ convert_unicode_cb (GtkWidget *widget, gpointer data)
GtkWidget *
org_gnome_bogo_convert_unicode (struct _EPlugin *epl, struct _EConfigHookItemFactoryData *data)
{
+ EShell *shell;
GtkWidget *check;
guint i = ((GtkTable *)data->parent)->nrows;
@@ -399,7 +401,13 @@ org_gnome_bogo_convert_unicode (struct _EPlugin *epl, struct _EConfigHookItemFac
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), em_junk_bf_unicode);
g_signal_connect (GTK_TOGGLE_BUTTON (check), "toggled", G_CALLBACK (convert_unicode_cb), (gpointer) "/apps/evolution/mail/junk/bogofilter/unicode");
gtk_table_attach((GtkTable *)data->parent, check, 0, 1, i, i+1, 0, 0, 0, 0);
- gtk_widget_show (check);
- return (GtkWidget *)check;
+
+ shell = e_shell_get_default ();
+ if (e_shell_get_express_mode (shell))
+ gtk_widget_hide (check);
+ else
+ gtk_widget_show (check);
+
+ return check;
}
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;
}