aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog19
-rw-r--r--mail/GNOME_Evolution_Mail.server.in.in24
-rw-r--r--mail/Makefile.am2
-rw-r--r--mail/em-network-prefs.c588
-rw-r--r--mail/em-network-prefs.h112
-rw-r--r--mail/mail-component-factory.c4
-rw-r--r--mail/mail-config-factory.c3
-rw-r--r--mail/mail-config.glade774
8 files changed, 1521 insertions, 5 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index c02c6be28b..5a05bde1e0 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,22 @@
+2008-03-25 Veerapuram Varadhan <vvaradhan@novell.com>
+
+ ** Added configurable Proxy settings for Evolution.
+
+ * GNOME_Evolution_Mail.server.in.in:
+ * Makefile.am:
+ * em-network-prefs.c: (em_network_prefs_get_type),
+ (em_network_prefs_class_init), (em_network_prefs_init),
+ (em_network_prefs_finalise), (em_network_prefs_destroy),
+ (toggle_button_toggled), (toggle_button_init), (emnp_widget_glade),
+ (emnp_set_sensitiveness), (emnp_parse_ignore_hosts),
+ (emnp_load_sys_settings), (notify_proxy_type_changed),
+ (widget_entry_changed_cb), (emnp_free), (emnp_set_markups),
+ (em_network_prefs_construct), (em_network_prefs_new):
+ * em-network-prefs.h:
+ * mail-component-factory.c: (factory):
+ * mail-config-factory.c: (mail_config_control_factory_cb):
+ * mail-config.glade:
+
2008-03-19 Milan Crha <mcrha@redhat.com>
** Fix for bug #511978
diff --git a/mail/GNOME_Evolution_Mail.server.in.in b/mail/GNOME_Evolution_Mail.server.in.in
index 623a6510cf..8df4fc2afa 100644
--- a/mail/GNOME_Evolution_Mail.server.in.in
+++ b/mail/GNOME_Evolution_Mail.server.in.in
@@ -161,6 +161,30 @@
</oaf_server>
+ <!-- Network Preferences -->
+ <oaf_server iid="OAFIID:GNOME_Evolution_Mail_NetworkPrefs_ConfigControl:@VERSION@"
+ type="factory"
+ location="OAFIID:GNOME_Evolution_Mail_Factory:@VERSION@">
+
+ <oaf_attribute name="repo_ids" type="stringv">
+ <item value="IDL:GNOME/Evolution/ConfigControl:@VERSION@"/>
+ </oaf_attribute>
+
+ <oaf_attribute name="evolution2:config_item:title" type="string"
+ _value="Network Preferences"/>
+
+ <oaf_attribute name="evolution2:config_item:description" type="string"
+ _value="Configure your network connection settings here"/>
+
+ <oaf_attribute name="evolution2:config_item:icon_name" type="string"
+ value="stock_proxy"/>
+
+ <oaf_attribute name="evolution2:config_item:priority" type="string" value="-8"/>
+
+ <oaf_attribute name="name" type="string"
+ _value="Evolution Network configuration control"/>
+
+ </oaf_server>
</oaf_info>
diff --git a/mail/Makefile.am b/mail/Makefile.am
index 77a7f0ea6b..ba0ba784db 100644
--- a/mail/Makefile.am
+++ b/mail/Makefile.am
@@ -164,6 +164,8 @@ libevolution_mail_la_SOURCES = \
em-message-browser.c \
em-migrate.c \
em-migrate.h \
+ em-network-prefs.c \
+ em-network-prefs.h \
em-popup.c \
em-search-context.c \
em-search-context.h \
diff --git a/mail/em-network-prefs.c b/mail/em-network-prefs.c
new file mode 100644
index 0000000000..1407fce27d
--- /dev/null
+++ b/mail/em-network-prefs.c
@@ -0,0 +1,588 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ * Authors: Veerapuram Varadhan <vvaradhan@novell.com>
+ *
+ * Copyright 2007 Novell, Inc. (www.novell.com)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <fcntl.h>
+
+#include "em-network-prefs.h"
+
+#include <bonobo/bonobo-generic-factory.h>
+
+#include <gdk/gdkkeysyms.h>
+#include <gconf/gconf-client.h>
+#include <glade/glade.h>
+
+#include <gtk/gtkentry.h>
+#include <gtk/gtkdialog.h>
+#include <gtk/gtktogglebutton.h>
+#include <gtk/gtkspinbutton.h>
+#include <gtk/gtklabel.h>
+
+#include <gtk/gtkfilechooserbutton.h>
+#include <glib/gstdio.h>
+
+#include "e-util/e-error.h"
+#include "e-util/e-util-private.h"
+#include "e-util/e-icon-factory.h"
+
+#include "mail-config.h"
+#include "em-config.h"
+
+#define d(x)
+
+#define GCONF_E_SHELL_NETWORK_CONFIG_PATH "/apps/evolution/shell/network_config/"
+#define GCONF_E_HTTP_HOST_KEY GCONF_E_SHELL_NETWORK_CONFIG_PATH "http_host"
+#define GCONF_E_HTTP_PORT_KEY GCONF_E_SHELL_NETWORK_CONFIG_PATH "http_port"
+#define GCONF_E_HTTPS_HOST_KEY GCONF_E_SHELL_NETWORK_CONFIG_PATH "secure_host"
+#define GCONF_E_HTTPS_PORT_KEY GCONF_E_SHELL_NETWORK_CONFIG_PATH "secure_port"
+#define GCONF_E_SOCKS_HOST_KEY GCONF_E_SHELL_NETWORK_CONFIG_PATH "socks_host"
+#define GCONF_E_SOCKS_PORT_KEY GCONF_E_SHELL_NETWORK_CONFIG_PATH "socks_port"
+#define GCONF_E_IGNORE_HOSTS_KEY GCONF_E_SHELL_NETWORK_CONFIG_PATH "ignore_hosts"
+#define GCONF_E_USE_AUTH_KEY GCONF_E_SHELL_NETWORK_CONFIG_PATH "use_authentication"
+#define GCONF_E_PROXY_TYPE_KEY GCONF_E_SHELL_NETWORK_CONFIG_PATH "proxy_type"
+#define GCONF_E_AUTH_USER_KEY GCONF_E_SHELL_NETWORK_CONFIG_PATH "authentication_user"
+#define GCONF_E_AUTH_PWD_KEY GCONF_E_SHELL_NETWORK_CONFIG_PATH "authentication_password"
+#define GCONF_E_USE_PROXY_KEY GCONF_E_SHELL_NETWORK_CONFIG_PATH "use_http_proxy"
+#define GCONF_E_AUTOCONFIG_URL_KEY GCONF_E_SHELL_NETWORK_CONFIG_PATH "autoconfig_url"
+
+#define GCONF_SYS_PROXY_PATH "/system/proxy/"
+#define GCONF_SYS_HTTP_PROXY_PATH "/system/http_proxy"
+#define GCONF_SYS_HTTP_HOST_KEY GCONF_SYS_HTTP_PROXY_PATH "host"
+#define GCONF_SYS_HTTP_PORT_KEY GCONF_SYS_HTTP_PROXY_PATH "port"
+#define GCONF_SYS_HTTPS_HOST_KEY GCONF_SYS_PROXY_PATH "secure_host"
+#define GCONF_SYS_HTTPS_PORT_KEY GCONF_SYS_PROXY_PATH "secure_port"
+#define GCONF_SYS_SOCKS_HOST_KEY GCONF_SYS_PROXY_PATH "socks_host"
+#define GCONF_SYS_SOCKS_PORT_KEY GCONF_SYS_PROXY_PATH "socks_port"
+#define GCONF_SYS_AUTOCONFIG_URL_KEY GCONF_SYS_PROXY_PATH "autoconfig_url"
+#define GCONF_SYS_IGNORE_HOSTS_KEY GCONF_SYS_HTTP_PROXY_PATH "ignore_hosts"
+#define GCONF_SYS_USE_PROXY_KEY GCONF_SYS_HTTP_PROXY_PATH "use_http_proxy"
+#define GCONF_SYS_USE_AUTH_KEY GCONF_SYS_HTTP_PROXY_PATH "use_authentication"
+#define GCONF_SYS_AUTH_USER_KEY GCONF_SYS_HTTP_PROXY_PATH "authentication_user"
+#define GCONF_SYS_AUTH_PWD_KEY GCONF_SYS_HTTP_PROXY_PATH "authentication_password"
+
+static void em_network_prefs_class_init (EMNetworkPrefsClass *class);
+static void em_network_prefs_init (EMNetworkPrefs *dialog);
+static void em_network_prefs_destroy (GtkObject *obj);
+static void em_network_prefs_finalise (GObject *obj);
+
+
+static GtkVBoxClass *parent_class = NULL;
+
+
+GType
+em_network_prefs_get_type (void)
+{
+ static GType type = 0;
+
+ if (!type) {
+ static const GTypeInfo info = {
+ sizeof (EMNetworkPrefsClass),
+ NULL, NULL,
+ (GClassInitFunc) em_network_prefs_class_init,
+ NULL, NULL,
+ sizeof (EMNetworkPrefs),
+ 0,
+ (GInstanceInitFunc) em_network_prefs_init,
+ };
+
+ type = g_type_register_static (gtk_vbox_get_type (), "EMNetworkPrefs", &info, 0);
+ }
+
+ return type;
+}
+
+static void
+em_network_prefs_class_init (EMNetworkPrefsClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GtkObjectClass *object_class = GTK_OBJECT_CLASS (klass);
+
+ parent_class = g_type_class_ref (gtk_vbox_get_type ());
+
+ object_class->destroy = em_network_prefs_destroy;
+ gobject_class->finalize = em_network_prefs_finalise;
+}
+
+static void
+em_network_prefs_init (EMNetworkPrefs *prefs)
+{
+ /* do something here */
+}
+
+static void
+em_network_prefs_finalise (GObject *obj)
+{
+ EMNetworkPrefs *prefs = (EMNetworkPrefs *) obj;
+
+ d(g_print ("Network preferences finalize is called\n"));
+
+ /* do something here */
+ G_OBJECT_CLASS (parent_class)->finalize (obj);
+}
+
+static void
+em_network_prefs_destroy (GtkObject *obj)
+{
+ EMNetworkPrefs *prefs = (EMNetworkPrefs *) obj;
+ d(g_print ("Network preferences destroy is called\n"));
+
+ GTK_OBJECT_CLASS (parent_class)->destroy (obj);
+}
+
+static void
+toggle_button_toggled (GtkToggleButton *toggle, EMNetworkPrefs *prefs)
+{
+ const char *key;
+
+ key = g_object_get_data ((GObject *) toggle, "key");
+ gconf_client_set_bool (prefs->gconf, key, gtk_toggle_button_get_active (toggle), NULL);
+ if (toggle == prefs->use_auth) {
+ gboolean sensitivity = gtk_toggle_button_get_active (prefs->use_auth);
+ gtk_widget_set_sensitive ((GtkWidget *) prefs->lbl_auth_user, sensitivity);
+ gtk_widget_set_sensitive ((GtkWidget *) prefs->lbl_auth_pwd, sensitivity);
+ gtk_widget_set_sensitive ((GtkWidget *) prefs->auth_user, sensitivity);
+ gtk_widget_set_sensitive ((GtkWidget *) prefs->auth_pwd, sensitivity);
+ }
+}
+
+static void
+toggle_button_init (EMNetworkPrefs *prefs, GtkToggleButton *toggle, const char *key)
+{
+ gboolean bool;
+
+ bool = gconf_client_get_bool (prefs->gconf, key, NULL);
+ gtk_toggle_button_set_active (toggle, bool);
+
+ g_object_set_data ((GObject *) toggle, "key", (void *) key);
+ g_signal_connect (toggle, "toggled", G_CALLBACK (toggle_button_toggled), prefs);
+
+ if (!gconf_client_key_is_writable (prefs->gconf, key, NULL))
+ gtk_widget_set_sensitive ((GtkWidget *) toggle, FALSE);
+}
+
+static GtkWidget *
+emnp_widget_glade(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, void *data)
+{
+ EMNetworkPrefs *prefs = data;
+
+ return glade_xml_get_widget(prefs->gui, item->label);
+}
+
+static void
+emnp_set_sensitiveness (EMNetworkPrefs *prefs, NetworkConfigProxyType type, gboolean sensitivity)
+{
+ if (type == NETWORK_PROXY_AUTOCONFIG) {
+ gtk_widget_set_sensitive ((GtkWidget *) prefs->auto_proxy_url, sensitivity);
+ d(g_print ("Setting sensitivity of autoconfig to: %d\n", sensitivity));
+ } else if (type == NETWORK_PROXY_MANUAL) {
+ gboolean state;
+
+ gtk_widget_set_sensitive ((GtkWidget *) prefs->http_host, sensitivity);
+ gtk_widget_set_sensitive ((GtkWidget *) prefs->https_host, sensitivity);
+ gtk_widget_set_sensitive ((GtkWidget *) prefs->socks_host, sensitivity);
+ gtk_widget_set_sensitive ((GtkWidget *) prefs->ignore_hosts, sensitivity);
+ gtk_widget_set_sensitive ((GtkWidget *) prefs->use_auth, sensitivity);
+ gtk_widget_set_sensitive ((GtkWidget *) prefs->http_port, sensitivity);
+ gtk_widget_set_sensitive ((GtkWidget *) prefs->https_port, sensitivity);
+ gtk_widget_set_sensitive ((GtkWidget *) prefs->socks_port, sensitivity);
+ gtk_widget_set_sensitive ((GtkWidget *) prefs->lbl_ignore_hosts, sensitivity);
+ gtk_widget_set_sensitive ((GtkWidget *) prefs->lbl_http_host, sensitivity);
+ gtk_widget_set_sensitive ((GtkWidget *) prefs->lbl_http_port, sensitivity);
+ gtk_widget_set_sensitive ((GtkWidget *) prefs->lbl_https_host, sensitivity);
+ gtk_widget_set_sensitive ((GtkWidget *) prefs->lbl_https_port, sensitivity);
+ gtk_widget_set_sensitive ((GtkWidget *) prefs->lbl_socks_host, sensitivity);
+ gtk_widget_set_sensitive ((GtkWidget *) prefs->lbl_socks_port, sensitivity);
+
+ state = sensitivity && gtk_toggle_button_get_active (prefs->use_auth);
+ gtk_widget_set_sensitive ((GtkWidget *) prefs->lbl_auth_user, state);
+ gtk_widget_set_sensitive ((GtkWidget *) prefs->lbl_auth_pwd, state);
+ gtk_widget_set_sensitive ((GtkWidget *) prefs->auth_user, state);
+ gtk_widget_set_sensitive ((GtkWidget *) prefs->auth_pwd, state);
+
+ d(g_print ("Setting sensitivity of manual proxy to: %d\n", sensitivity));
+ }
+}
+
+static void
+emnp_parse_ignore_hosts (gpointer data, gpointer user_data)
+{
+ char *input = (char *)data;
+ GString *str = (GString *)user_data;
+
+ if (!str)
+ return;
+
+ /* FIXME: Remove trailing , */
+ if (data) {
+ str = g_string_append (str, data);
+ str = g_string_append_c (str, ',');
+ }
+}
+
+static void
+emnp_load_sys_settings (GConfClient *gconf)
+{
+ char *buf;
+ int port;
+ GSList *ignore_hosts;
+ gboolean toggle;
+ GString *str = NULL;
+
+ if (!gconf)
+ return;
+
+ toggle = gconf_client_get_bool (gconf, GCONF_SYS_USE_PROXY_KEY, NULL);
+ if (!toggle) {
+ gconf_client_set_bool (gconf, GCONF_E_USE_PROXY_KEY, toggle, NULL);
+ return;
+ }
+
+ toggle = gconf_client_get_bool (gconf, GCONF_SYS_USE_AUTH_KEY, NULL);
+ gconf_client_set_bool (gconf, GCONF_E_USE_AUTH_KEY, toggle, NULL);
+
+ buf = gconf_client_get_string (gconf, GCONF_SYS_HTTP_HOST_KEY, NULL);
+ gconf_client_set_string (gconf, GCONF_E_HTTP_HOST_KEY, buf, NULL);
+ g_free (buf);
+
+ buf = gconf_client_get_string (gconf, GCONF_SYS_HTTPS_HOST_KEY, NULL);
+ gconf_client_set_string (gconf, GCONF_E_HTTPS_HOST_KEY, buf, NULL);
+ g_free (buf);
+
+ buf = gconf_client_get_string (gconf, GCONF_SYS_SOCKS_HOST_KEY, NULL);
+ gconf_client_set_string (gconf, GCONF_E_SOCKS_HOST_KEY, buf, NULL);
+ g_free (buf);
+
+ buf = gconf_client_get_string (gconf, GCONF_SYS_AUTOCONFIG_URL_KEY, NULL);
+ gconf_client_set_string (gconf, GCONF_E_AUTOCONFIG_URL_KEY, buf, NULL);
+ g_free (buf);
+
+ buf = gconf_client_get_string (gconf, GCONF_SYS_AUTH_USER_KEY, NULL);
+ gconf_client_set_string (gconf, GCONF_E_AUTH_USER_KEY, buf, NULL);
+ g_free (buf);
+
+ buf = gconf_client_get_string (gconf, GCONF_SYS_AUTH_PWD_KEY, NULL);
+ gconf_client_set_string (gconf, GCONF_E_AUTH_PWD_KEY, buf, NULL);
+ g_free (buf);
+
+ port = gconf_client_get_int (gconf, GCONF_SYS_HTTP_PORT_KEY, NULL);
+ gconf_client_set_int (gconf, GCONF_E_HTTP_PORT_KEY, port, NULL);
+
+ port = gconf_client_get_int (gconf, GCONF_SYS_HTTPS_PORT_KEY, NULL);
+ gconf_client_set_int (gconf, GCONF_E_HTTPS_PORT_KEY, port, NULL);
+
+ port = gconf_client_get_int (gconf, GCONF_SYS_SOCKS_PORT_KEY, NULL);
+ gconf_client_set_int (gconf, GCONF_E_SOCKS_PORT_KEY, port, NULL);
+
+ ignore_hosts = gconf_client_get_list (gconf, GCONF_SYS_IGNORE_HOSTS_KEY,
+ GCONF_VALUE_STRING, NULL);
+ if (ignore_hosts) {
+ str = g_string_sized_new (32);
+ g_slist_foreach (ignore_hosts, (GFunc) emnp_parse_ignore_hosts, str);
+ g_slist_foreach (ignore_hosts, (GFunc) g_free, NULL);
+ g_slist_free (ignore_hosts);
+
+ gconf_client_set_string (gconf, GCONF_E_IGNORE_HOSTS_KEY,
+ str->str, NULL);
+ g_string_free (str, TRUE);
+ }
+}
+
+static void
+notify_proxy_type_changed (GtkWidget *widget, EMNetworkPrefs *prefs)
+{
+ int type;
+
+ if (gtk_toggle_button_get_active (prefs->sys_proxy))
+ type = NETWORK_PROXY_SYS_SETTINGS;
+ else if (gtk_toggle_button_get_active (prefs->no_proxy))
+ type = NETWORK_PROXY_DIRECT_CONNECTION;
+ else if (gtk_toggle_button_get_active (prefs->manual_proxy))
+ type = NETWORK_PROXY_MANUAL;
+ else
+ type = NETWORK_PROXY_AUTOCONFIG;
+
+ gconf_client_set_int (prefs->gconf, "/apps/evolution/shell/network_config/proxy_type", type, NULL);
+
+ if (type == NETWORK_PROXY_DIRECT_CONNECTION ||
+ type == NETWORK_PROXY_SYS_SETTINGS) {
+ emnp_set_sensitiveness (prefs, NETWORK_PROXY_MANUAL, FALSE);
+ emnp_set_sensitiveness (prefs, NETWORK_PROXY_AUTOCONFIG, FALSE);
+ if (type == NETWORK_PROXY_SYS_SETTINGS) {
+ d(g_print ("%s:%s:%d: Loading sys settings... \n",
+ __FILE__, __PRETTY_FUNCTION__, __LINE__));
+ emnp_load_sys_settings (prefs->gconf);
+ }
+
+ } else if (type == NETWORK_PROXY_AUTOCONFIG) {
+ emnp_set_sensitiveness (prefs, NETWORK_PROXY_MANUAL, FALSE);
+ emnp_set_sensitiveness (prefs, NETWORK_PROXY_AUTOCONFIG, TRUE);
+ } else if (type == NETWORK_PROXY_MANUAL) {
+ emnp_set_sensitiveness (prefs, NETWORK_PROXY_AUTOCONFIG, FALSE);
+ emnp_set_sensitiveness (prefs, NETWORK_PROXY_MANUAL, TRUE);
+ }
+
+ if (type != NETWORK_PROXY_DIRECT_CONNECTION)
+ gconf_client_set_bool (prefs->gconf, GCONF_E_USE_PROXY_KEY, TRUE, NULL);
+ else if (type != NETWORK_PROXY_SYS_SETTINGS)
+ gconf_client_set_bool (prefs->gconf, GCONF_E_USE_PROXY_KEY, FALSE, NULL);
+
+}
+
+static void
+widget_entry_changed_cb (GtkWidget *widget, gpointer data)
+{
+ const char *value;
+ int port = -1;
+ GConfClient *gconf = mail_config_get_gconf_client ();
+
+ /*
+ Do not change the order of comparison -
+ GtkSpinButton is an extended form of GtkEntry
+ */
+ if (GTK_IS_SPIN_BUTTON (widget)) {
+ port = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (widget));
+ gconf_client_set_int (gconf, (const char *)data, port, NULL);
+ d(g_print ("%s:%s:%d: %s is SpinButton: value = [%d]\n", __FILE__, __PRETTY_FUNCTION__, __LINE__, (const char *)data, port));
+ } else if (GTK_IS_ENTRY (widget)) {
+ value = gtk_entry_get_text (GTK_ENTRY (widget));
+ gconf_client_set_string (gconf, (const char *)data, value, NULL);
+ d(g_print ("%s:%s:%d: %s is Entry: value = [%s]\n", __FILE__, __PRETTY_FUNCTION__, __LINE__, (const char *)data, value));
+ }
+
+}
+
+/* plugin meta-data */
+static EMConfigItem emnp_items[] = {
+ { E_CONFIG_BOOK, "", "network_preferences_toplevel", emnp_widget_glade },
+ { E_CONFIG_PAGE, "00.general", "vboxGeneral", emnp_widget_glade },
+ { E_CONFIG_SECTION, "00.general/00.proxy", "frameProxy", emnp_widget_glade },
+};
+
+static void
+emnp_free(EConfig *ec, GSList *items, void *data)
+{
+ /* the prefs data is freed automagically */
+
+ g_slist_free(items);
+}
+
+static void
+emnp_set_markups (EMNetworkPrefs *prefs)
+{
+ gtk_label_set_use_markup (GTK_LABEL (GTK_BIN(prefs->sys_proxy)->child), TRUE);
+ gtk_label_set_use_markup (GTK_LABEL (GTK_BIN(prefs->no_proxy)->child), TRUE);
+ gtk_label_set_use_markup (GTK_LABEL (GTK_BIN(prefs->manual_proxy)->child), TRUE);
+ gtk_label_set_use_markup (GTK_LABEL (GTK_BIN(prefs->auto_proxy)->child), TRUE);
+}
+
+static void
+em_network_prefs_construct (EMNetworkPrefs *prefs)
+{
+ GtkWidget *toplevel;
+ GladeXML *gui;
+ GSList* l;
+ char *buf;
+ EMConfig *ec;
+ EMConfigTargetPrefs *target;
+ gboolean locked;
+ int i, val, port;
+ char *gladefile;
+
+ prefs->gconf = mail_config_get_gconf_client ();
+
+ gladefile = g_build_filename (EVOLUTION_GLADEDIR,
+ "mail-config.glade",
+ NULL);
+ gui = glade_xml_new (gladefile, "network_preferences_toplevel", NULL);
+ prefs->gui = gui;
+ g_free (gladefile);
+
+ /** @HookPoint-EMConfig: Network Preferences
+ * @Id: org.gnome.evolution.mail.networkPrefs
+ * @Type: E_CONFIG_BOOK
+ * @Class: org.gnome.evolution.mail.config:1.0
+ * @Target: EMConfigTargetPrefs
+ *
+ * The network preferences settings page.
+ */
+ ec = em_config_new(E_CONFIG_BOOK, "org.gnome.evolution.mail.networkPrefs");
+ l = NULL;
+ for (i=0;i<sizeof(emnp_items)/sizeof(emnp_items[0]);i++)
+ l = g_slist_prepend(l, &emnp_items[i]);
+ e_config_add_items((EConfig *)ec, l, NULL, NULL, emnp_free, prefs);
+
+ /* Proxy tab */
+
+ /* Default Behavior */
+ locked = !gconf_client_key_is_writable (prefs->gconf, GCONF_E_PROXY_TYPE_KEY, NULL);
+
+ val = gconf_client_get_int (prefs->gconf, GCONF_E_PROXY_TYPE_KEY, NULL);
+ prefs->sys_proxy = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "rdoSysSettings"));
+ gtk_toggle_button_set_active (prefs->sys_proxy, val == NETWORK_PROXY_SYS_SETTINGS);
+ g_signal_connect (prefs->sys_proxy, "toggled", G_CALLBACK (notify_proxy_type_changed), prefs);
+ if (locked)
+ gtk_widget_set_sensitive ((GtkWidget *) prefs->sys_proxy, FALSE);
+
+ d(g_print ("Sys settings ----!!! \n"));
+
+ prefs->no_proxy = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "rdoNoProxy"));
+ gtk_toggle_button_set_active (prefs->no_proxy, val == NETWORK_PROXY_DIRECT_CONNECTION);
+ g_signal_connect (prefs->no_proxy, "toggled", G_CALLBACK (notify_proxy_type_changed), prefs);
+ if (locked)
+ gtk_widget_set_sensitive ((GtkWidget *) prefs->no_proxy, FALSE);
+
+ d(g_print ("No proxy settings ----!!! \n"));
+
+ prefs->auto_proxy = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "rdoAutoConfig"));
+ prefs->auto_proxy_url = GTK_ENTRY (glade_xml_get_widget (gui, "txtAutoConfigUrl"));
+ gtk_toggle_button_set_active (prefs->auto_proxy, val == NETWORK_PROXY_AUTOCONFIG);
+
+ g_signal_connect (prefs->auto_proxy, "toggled", G_CALLBACK (notify_proxy_type_changed), prefs);
+ g_signal_connect(prefs->auto_proxy_url, "changed", G_CALLBACK(widget_entry_changed_cb), GCONF_E_AUTOCONFIG_URL_KEY);
+
+ if (locked)
+ gtk_widget_set_sensitive ((GtkWidget *) prefs->auto_proxy, FALSE);
+
+ d(g_print ("Auto config settings ----!!! \n"));
+
+ prefs->manual_proxy = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "rdoManualProxy"));
+ prefs->http_host = GTK_ENTRY (glade_xml_get_widget (gui, "txtHttpHost"));
+ prefs->https_host = GTK_ENTRY (glade_xml_get_widget (gui, "txtHttpsHost"));
+ prefs->socks_host = GTK_ENTRY (glade_xml_get_widget (gui, "txtSocksHost"));
+ prefs->ignore_hosts = GTK_ENTRY (glade_xml_get_widget (gui, "txtIgnoreHosts"));
+ prefs->http_port = GTK_SPIN_BUTTON (glade_xml_get_widget (gui, "spnHttpPort"));
+ prefs->https_port = GTK_SPIN_BUTTON (glade_xml_get_widget (gui, "spnHttpsPort"));
+ prefs->socks_port = GTK_SPIN_BUTTON (glade_xml_get_widget (gui, "spnSocksPort"));
+ prefs->lbl_http_host = GTK_LABEL (glade_xml_get_widget (gui, "lblHttpHost"));
+ prefs->lbl_http_port = GTK_LABEL (glade_xml_get_widget (gui, "lblHttpPort"));
+ prefs->lbl_https_host = GTK_LABEL (glade_xml_get_widget (gui, "lblHttpsHost"));
+ prefs->lbl_https_port = GTK_LABEL (glade_xml_get_widget (gui, "lblHttpsPort"));
+ prefs->lbl_socks_host = GTK_LABEL (glade_xml_get_widget (gui, "lblSocksHost"));
+ prefs->lbl_socks_port = GTK_LABEL (glade_xml_get_widget (gui, "lblSocksPort"));
+ prefs->lbl_ignore_hosts = GTK_LABEL (glade_xml_get_widget (gui, "lblIgnoreHosts"));
+ prefs->use_auth = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkUseAuth"));
+ toggle_button_init (prefs, prefs->use_auth, GCONF_E_USE_AUTH_KEY);
+ prefs->lbl_auth_user = GTK_LABEL (glade_xml_get_widget (gui, "lblAuthUser"));
+ prefs->lbl_auth_pwd = GTK_LABEL (glade_xml_get_widget (gui, "lblAuthPwd"));
+ prefs->auth_user = GTK_ENTRY (glade_xml_get_widget (gui, "txtAuthUser"));
+ prefs->auth_pwd = GTK_ENTRY (glade_xml_get_widget (gui, "txtAuthPwd"));
+
+ /* Manual proxy options */
+ g_signal_connect (prefs->http_host, "changed",
+ G_CALLBACK(widget_entry_changed_cb), GCONF_E_HTTP_HOST_KEY);
+ g_signal_connect (prefs->https_host, "changed",
+ G_CALLBACK(widget_entry_changed_cb), GCONF_E_HTTPS_HOST_KEY);
+ g_signal_connect (prefs->socks_host, "changed",
+ G_CALLBACK(widget_entry_changed_cb), GCONF_E_SOCKS_HOST_KEY);
+ g_signal_connect (prefs->ignore_hosts, "changed",
+ G_CALLBACK(widget_entry_changed_cb), GCONF_E_IGNORE_HOSTS_KEY);
+ g_signal_connect (prefs->http_port, "value_changed",
+ G_CALLBACK(widget_entry_changed_cb), GCONF_E_HTTP_PORT_KEY);
+ g_signal_connect (prefs->https_port, "value_changed",
+ G_CALLBACK(widget_entry_changed_cb), GCONF_E_HTTPS_PORT_KEY);
+ g_signal_connect (prefs->socks_port, "value_changed",
+ G_CALLBACK(widget_entry_changed_cb), GCONF_E_SOCKS_PORT_KEY);
+ g_signal_connect (prefs->auth_user, "changed",
+ G_CALLBACK(widget_entry_changed_cb), GCONF_E_AUTH_USER_KEY);
+ g_signal_connect (prefs->auth_pwd, "changed",
+ G_CALLBACK(widget_entry_changed_cb), GCONF_E_AUTH_PWD_KEY);
+
+ gtk_toggle_button_set_active (prefs->manual_proxy, val == NETWORK_PROXY_MANUAL);
+ g_signal_connect (prefs->manual_proxy, "toggled", G_CALLBACK (notify_proxy_type_changed), prefs);
+
+ if (locked)
+ gtk_widget_set_sensitive ((GtkWidget *) prefs->manual_proxy, FALSE);
+ d(g_print ("Manual settings ----!!! \n"));
+
+ buf = gconf_client_get_string (prefs->gconf, GCONF_E_HTTP_HOST_KEY, NULL);
+ gtk_entry_set_text (prefs->http_host, buf ? buf : "");
+ g_free (buf);
+
+ buf = gconf_client_get_string (prefs->gconf, GCONF_E_HTTPS_HOST_KEY, NULL);
+ gtk_entry_set_text (prefs->https_host, buf ? buf : "");
+ g_free (buf);
+
+ buf = gconf_client_get_string (prefs->gconf, GCONF_E_SOCKS_HOST_KEY, NULL);
+ gtk_entry_set_text (prefs->socks_host, buf ? buf : "");
+ g_free (buf);
+
+ buf = gconf_client_get_string (prefs->gconf, GCONF_E_IGNORE_HOSTS_KEY, NULL);
+ gtk_entry_set_text (prefs->ignore_hosts, buf ? buf : "");
+ g_free (buf);
+
+ buf = gconf_client_get_string (prefs->gconf, GCONF_E_AUTH_USER_KEY, NULL);
+ gtk_entry_set_text (prefs->auth_user, buf ? buf : "");
+ g_free (buf);
+
+ buf = gconf_client_get_string (prefs->gconf, GCONF_E_AUTH_PWD_KEY, NULL);
+ gtk_entry_set_text (prefs->auth_pwd, buf ? buf : "");
+ g_free (buf);
+
+ port = gconf_client_get_int (prefs->gconf, GCONF_E_HTTP_PORT_KEY, NULL);
+ gtk_spin_button_set_value (prefs->http_port, (gdouble)port);
+
+ port = gconf_client_get_int (prefs->gconf, GCONF_E_HTTPS_PORT_KEY, NULL);
+ gtk_spin_button_set_value (prefs->https_port, (gdouble)port);
+
+ port = gconf_client_get_int (prefs->gconf, GCONF_E_SOCKS_PORT_KEY, NULL);
+ gtk_spin_button_set_value (prefs->socks_port, (gdouble)port);
+
+ emnp_set_markups (prefs);
+
+ if (val == NETWORK_PROXY_DIRECT_CONNECTION ||
+ val == NETWORK_PROXY_SYS_SETTINGS) {
+ emnp_set_sensitiveness (prefs, NETWORK_PROXY_MANUAL, FALSE);
+ emnp_set_sensitiveness (prefs, NETWORK_PROXY_AUTOCONFIG, FALSE);
+ if (val == NETWORK_PROXY_SYS_SETTINGS)
+ emnp_load_sys_settings (prefs->gconf);
+ } else if (val == NETWORK_PROXY_AUTOCONFIG) {
+ emnp_set_sensitiveness (prefs, NETWORK_PROXY_MANUAL, FALSE);
+ emnp_set_sensitiveness (prefs, NETWORK_PROXY_AUTOCONFIG, TRUE);
+ } else if (val == NETWORK_PROXY_MANUAL) {
+ emnp_set_sensitiveness (prefs, NETWORK_PROXY_AUTOCONFIG, FALSE);
+ emnp_set_sensitiveness (prefs, NETWORK_PROXY_MANUAL, TRUE);
+ }
+
+ /* get our toplevel widget */
+ target = em_config_target_new_prefs(ec, prefs->gconf);
+ e_config_set_target((EConfig *)ec, (EConfigTarget *)target);
+ toplevel = e_config_create_widget((EConfig *)ec);
+ gtk_container_add (GTK_CONTAINER (prefs), toplevel);
+}
+
+GtkWidget *
+em_network_prefs_new (void)
+{
+ EMNetworkPrefs *new;
+
+ new = (EMNetworkPrefs *) g_object_new (em_network_prefs_get_type (), NULL);
+ em_network_prefs_construct (new);
+
+ return (GtkWidget *) new;
+}
diff --git a/mail/em-network-prefs.h b/mail/em-network-prefs.h
new file mode 100644
index 0000000000..45627cdce0
--- /dev/null
+++ b/mail/em-network-prefs.h
@@ -0,0 +1,112 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ * Authors: Veerapuram Varadhan <vvaradhan@novell.com>
+ *
+ * Copyright 2007 Novell, Inc. (www.novell.com)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
+ *
+ */
+
+
+#ifndef __EM_NETWORK_PREFS_H__
+#define __EM_NETWORK_PREFS_H__
+
+#ifdef __cplusplus
+extern "C" {
+#pragma }
+#endif /* __cplusplus */
+
+#include <glib.h>
+#include <gtk/gtkvbox.h>
+
+#define EM_NETWORK_PREFS_TYPE (em_network_prefs_get_type ())
+#define EM_NETWORK_PREFS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EM_NETWORK_PREFS_TYPE, EMNetworkPrefs))
+#define EM_NETWORK_PREFS_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), EM_NETWORK_PREFS_TYPE, EMNetworkPrefsClass))
+#define EM_IS_NETWORK_PREFS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EM_NETWORK_PREFS_TYPE))
+#define EM_IS_NETWORK_PREFS_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EM_NETWORK_PREFS_TYPE))
+
+typedef struct _EMNetworkPrefs EMNetworkPrefs;
+typedef struct _EMNetworkPrefsClass EMNetworkPrefsClass;
+
+struct _GtkToggleButton;
+struct _GtkEntry;
+struct _GladeXML;
+struct _GConfClient;
+
+typedef enum {
+ NETWORK_PROXY_SYS_SETTINGS,
+ NETWORK_PROXY_DIRECT_CONNECTION,
+ NETWORK_PROXY_MANUAL,
+ NETWORK_PROXY_AUTOCONFIG
+} NetworkConfigProxyType;
+
+
+struct _EMNetworkPrefs {
+ GtkVBox parent_object;
+
+ struct _GConfClient *gconf;
+
+ struct _GladeXML *gui;
+
+ /* Default Behavior */
+ struct _GtkToggleButton *sys_proxy;
+ struct _GtkToggleButton *no_proxy;
+ struct _GtkToggleButton *manual_proxy;
+ struct _GtkToggleButton *auto_proxy;
+ struct _GtkToggleButton *use_auth;
+
+ struct _GtkEntry *http_host;
+ struct _GtkEntry *https_host;
+ struct _GtkEntry *socks_host;
+ struct _GtkEntry *ignore_hosts;
+ struct _GtkEntry *auto_proxy_url;
+ struct _GtkEntry *auth_user;
+ struct _GtkEntry *auth_pwd;
+
+ struct _GtkLabel *lbl_http_host;
+ struct _GtkLabel *lbl_http_port;
+ struct _GtkLabel *lbl_https_host;
+ struct _GtkLabel *lbl_https_port;
+ struct _GtkLabel *lbl_socks_host;
+ struct _GtkLabel *lbl_socks_port;
+ struct _GtkLabel *lbl_ignore_hosts;
+ struct _GtkLabel *lbl_auth_user;
+ struct _GtkLabel *lbl_auth_pwd;
+
+ struct _GtkSpinButton *http_port;
+ struct _GtkSpinButton *https_port;
+ struct _GtkSpinButton *socks_port;
+};
+
+struct _EMNetworkPrefsClass {
+ GtkVBoxClass parent_class;
+
+ /* signals */
+
+};
+
+GType em_network_prefs_get_type (void);
+
+struct _GtkWidget *em_network_prefs_new (void);
+
+/* needed by global config */
+#define EM_NETWORK_PREFS_CONTROL_ID "OAFIID:GNOME_Evolution_Mail_NetworkPrefs_ConfigControl:" BASE_VERSION
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __EM_NETWORK_PREFS_H__ */
diff --git a/mail/mail-component-factory.c b/mail/mail-component-factory.c
index 31373e56da..2abf71a323 100644
--- a/mail/mail-component-factory.c
+++ b/mail/mail-component-factory.c
@@ -30,6 +30,7 @@
#include "em-account-prefs.h"
#include "em-mailer-prefs.h"
#include "em-composer-prefs.h"
+#include "em-network-prefs.h"
#include "mail-config-factory.h"
#include "mail-config.h"
@@ -70,7 +71,8 @@ factory(BonoboGenericFactory *factory, const char *component_id, void *closure)
return BONOBO_OBJECT (component);
} else if (strcmp (component_id, EM_ACCOUNT_PREFS_CONTROL_ID) == 0
|| strcmp (component_id, EM_MAILER_PREFS_CONTROL_ID) == 0
- || strcmp (component_id, EM_COMPOSER_PREFS_CONTROL_ID) == 0) {
+ || strcmp (component_id, EM_COMPOSER_PREFS_CONTROL_ID) == 0
+ || strcmp (component_id, EM_NETWORK_PREFS_CONTROL_ID) == 0) {
return mail_config_control_factory_cb (factory, component_id, CORBA_OBJECT_NIL);
} else if (strcmp(component_id, COMPOSER_ID) == 0) {
/* FIXME: how to remove need for callbacks, probably make the composer more tightly integrated with mail */
diff --git a/mail/mail-config-factory.c b/mail/mail-config-factory.c
index 27ed15e0d9..29a27e3efb 100644
--- a/mail/mail-config-factory.c
+++ b/mail/mail-config-factory.c
@@ -30,6 +30,7 @@
#include "em-account-prefs.h"
#include "em-composer-prefs.h"
#include "em-mailer-prefs.h"
+#include "em-network-prefs.h"
#include "mail-config-factory.h"
@@ -48,6 +49,8 @@ mail_config_control_factory_cb (BonoboGenericFactory *factory, const char *compo
prefs = em_mailer_prefs_new ();
} else if (!strcmp (component_id, EM_COMPOSER_PREFS_CONTROL_ID)) {
prefs = em_composer_prefs_new ();
+ } else if (!strcmp (component_id, EM_NETWORK_PREFS_CONTROL_ID)) {
+ prefs = em_network_prefs_new ();
} else {
g_return_val_if_reached(NULL);
}
diff --git a/mail/mail-config.glade b/mail/mail-config.glade
index d13a4d0505..8c722ed581 100644
--- a/mail/mail-config.glade
+++ b/mail/mail-config.glade
@@ -550,8 +550,8 @@ For example: &quot;Work&quot; or &quot;Personal&quot;</property>
<property name="invisible_char">*</property>
<property name="activates_default">False</property>
<accessibility>
- <atkrelation target="identity_address_label" type="labelled-by"/>
<atkrelation target="label464" type="labelled-by"/>
+ <atkrelation target="identity_address_label" type="labelled-by"/>
</accessibility>
</widget>
<packing>
@@ -633,8 +633,8 @@ For example: &quot;Work&quot; or &quot;Personal&quot;</property>
<property name="invisible_char">*</property>
<property name="activates_default">False</property>
<accessibility>
- <atkrelation target="label464" type="labelled-by"/>
<atkrelation target="identity_full_name_label" type="labelled-by"/>
+ <atkrelation target="label464" type="labelled-by"/>
</accessibility>
</widget>
<packing>
@@ -836,8 +836,8 @@ For example: &quot;Work&quot; or &quot;Personal&quot;</property>
<property name="invisible_char">*</property>
<property name="activates_default">False</property>
<accessibility>
- <atkrelation target="identity_organization_label" type="labelled-by"/>
<atkrelation target="label466" type="labelled-by"/>
+ <atkrelation target="identity_organization_label" type="labelled-by"/>
</accessibility>
</widget>
<packing>
@@ -890,8 +890,8 @@ For example: &quot;Work&quot; or &quot;Personal&quot;</property>
<property name="invisible_char">*</property>
<property name="activates_default">False</property>
<accessibility>
- <atkrelation target="label466" type="labelled-by"/>
<atkrelation target="reply_to_label" type="labelled-by"/>
+ <atkrelation target="label466" type="labelled-by"/>
</accessibility>
</widget>
<packing>
@@ -9053,4 +9053,770 @@ for display purposes only. </property>
</child>
</widget>
+<widget class="GtkWindow" id="network_prefs_tab">
+ <property name="visible">True</property>
+ <property name="title" translatable="yes">window1</property>
+ <property name="type">GTK_WINDOW_TOPLEVEL</property>
+ <property name="window_position">GTK_WIN_POS_NONE</property>
+ <property name="modal">False</property>
+ <property name="resizable">True</property>
+ <property name="destroy_with_parent">False</property>
+ <property name="decorated">True</property>
+ <property name="skip_taskbar_hint">False</property>
+ <property name="skip_pager_hint">False</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+ <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+ <property name="focus_on_map">True</property>
+ <property name="urgency_hint">False</property>
+
+ <child>
+ <widget class="GtkNotebook" id="network_preferences_toplevel">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="show_tabs">True</property>
+ <property name="show_border">True</property>
+ <property name="tab_pos">GTK_POS_TOP</property>
+ <property name="scrollable">False</property>
+ <property name="enable_popup">False</property>
+
+ <child>
+ <widget class="GtkVBox" id="vboxGeneral">
+ <property name="border_width">12</property>
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">18</property>
+
+ <child>
+ <widget class="GtkVBox" id="frameProxy">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+
+ <child>
+ <widget class="GtkLabel" id="label76">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">&lt;span weight=&quot;bold&quot;&gt;Proxy Settings&lt;/span&gt;</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">True</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkVBox" id="vboxProxy">
+ <property name="border_width">12</property>
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">8</property>
+
+ <child>
+ <widget class="GtkRadioButton" id="rdoSysSettings">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">_Use system defaults</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkRadioButton" id="rdoNoProxy">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">_Direct connection to the Internet</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">rdoSysSettings</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkRadioButton" id="rdoManualProxy">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">_Manual proxy configuration:</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">rdoSysSettings</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkAlignment" id="alignment27">
+ <property name="visible">True</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xscale">1</property>
+ <property name="yscale">1</property>
+ <property name="top_padding">0</property>
+ <property name="bottom_padding">0</property>
+ <property name="left_padding">24</property>
+ <property name="right_padding">0</property>
+
+ <child>
+ <widget class="GtkVBox" id="vbox18">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+
+ <child>
+ <widget class="GtkTable" id="table8">
+ <property name="visible">True</property>
+ <property name="n_rows">4</property>
+ <property name="n_columns">4</property>
+ <property name="homogeneous">False</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">6</property>
+
+ <child>
+ <widget class="GtkLabel" id="lblHttpHost">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">H_TTP Proxy:</property>
+ <property name="use_underline">True</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="mnemonic_widget">txtHttpHost</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="lblHttpsHost">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">_Secure HTTP Proxy:</property>
+ <property name="use_underline">True</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="mnemonic_widget">txtHttpsHost</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="lblSocksHost">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">S_OCKS Host:</property>
+ <property name="use_underline">True</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="mnemonic_widget">txtSocksHost</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="lblIgnoreHosts">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">No _Proxy for:</property>
+ <property name="use_underline">True</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="mnemonic_widget">txtIgnoreHosts</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkEntry" id="txtHttpHost">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">True</property>
+ <property name="visibility">True</property>
+ <property name="max_length">0</property>
+ <property name="text" translatable="yes"></property>
+ <property name="has_frame">True</property>
+ <property name="invisible_char">*</property>
+ <property name="activates_default">False</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkEntry" id="txtHttpsHost">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">True</property>
+ <property name="visibility">True</property>
+ <property name="max_length">0</property>
+ <property name="text" translatable="yes"></property>
+ <property name="has_frame">True</property>
+ <property name="invisible_char">*</property>
+ <property name="activates_default">False</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkEntry" id="txtSocksHost">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">True</property>
+ <property name="visibility">True</property>
+ <property name="max_length">0</property>
+ <property name="text" translatable="yes"></property>
+ <property name="has_frame">True</property>
+ <property name="invisible_char">*</property>
+ <property name="activates_default">False</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="lblHttpPort">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Port:</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="lblHttpsPort">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Port:</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="lblSocksPort">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Port:</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkSpinButton" id="spnHttpPort">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="climb_rate">1</property>
+ <property name="digits">0</property>
+ <property name="numeric">False</property>
+ <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+ <property name="snap_to_ticks">False</property>
+ <property name="wrap">False</property>
+ <property name="adjustment">0 0 65535 1 10 10</property>
+ </widget>
+ <packing>
+ <property name="left_attach">3</property>
+ <property name="right_attach">4</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkSpinButton" id="spnHttpsPort">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="climb_rate">1</property>
+ <property name="digits">0</property>
+ <property name="numeric">False</property>
+ <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+ <property name="snap_to_ticks">False</property>
+ <property name="wrap">False</property>
+ <property name="adjustment">0 0 65535 1 10 10</property>
+ </widget>
+ <packing>
+ <property name="left_attach">3</property>
+ <property name="right_attach">4</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkSpinButton" id="spnSocksPort">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="climb_rate">1</property>
+ <property name="digits">0</property>
+ <property name="numeric">False</property>
+ <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+ <property name="snap_to_ticks">False</property>
+ <property name="wrap">False</property>
+ <property name="adjustment">0 0 65535 1 10 10</property>
+ </widget>
+ <packing>
+ <property name="left_attach">3</property>
+ <property name="right_attach">4</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkEntry" id="txtIgnoreHosts">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">True</property>
+ <property name="visibility">True</property>
+ <property name="max_length">0</property>
+ <property name="text" translatable="yes"></property>
+ <property name="has_frame">True</property>
+ <property name="invisible_char">*</property>
+ <property name="activates_default">False</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">4</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkCheckButton" id="chkUseAuth">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Use Authe_ntication</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkAlignment" id="alignment26">
+ <property name="visible">True</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xscale">1</property>
+ <property name="yscale">1</property>
+ <property name="top_padding">0</property>
+ <property name="bottom_padding">0</property>
+ <property name="left_padding">24</property>
+ <property name="right_padding">0</property>
+
+ <child>
+ <widget class="GtkTable" id="table11">
+ <property name="visible">True</property>
+ <property name="n_rows">2</property>
+ <property name="n_columns">2</property>
+ <property name="homogeneous">False</property>
+ <property name="row_spacing">3</property>
+ <property name="column_spacing">6</property>
+
+ <child>
+ <widget class="GtkLabel" id="lblAuthUser">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Us_ername:</property>
+ <property name="use_underline">True</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="mnemonic_widget">txtAuthUser</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="lblAuthPwd">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Pass_word:</property>
+ <property name="use_underline">True</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="mnemonic_widget">txtAuthPwd</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkEntry" id="txtAuthUser">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">True</property>
+ <property name="visibility">True</property>
+ <property name="max_length">0</property>
+ <property name="text" translatable="yes"></property>
+ <property name="has_frame">True</property>
+ <property name="invisible_char">*</property>
+ <property name="activates_default">False</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkEntry" id="txtAuthPwd">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">True</property>
+ <property name="visibility">False</property>
+ <property name="max_length">0</property>
+ <property name="text" translatable="yes"></property>
+ <property name="has_frame">True</property>
+ <property name="invisible_char">*</property>
+ <property name="activates_default">False</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkRadioButton" id="rdoAutoConfig">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">_Automatic proxy configuration URL:</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">rdoSysSettings</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkAlignment" id="alignment36">
+ <property name="visible">True</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xscale">1</property>
+ <property name="yscale">1</property>
+ <property name="top_padding">0</property>
+ <property name="bottom_padding">0</property>
+ <property name="left_padding">24</property>
+ <property name="right_padding">0</property>
+
+ <child>
+ <widget class="GtkEntry" id="txtAutoConfigUrl">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">True</property>
+ <property name="visibility">True</property>
+ <property name="max_length">0</property>
+ <property name="text" translatable="yes"></property>
+ <property name="has_frame">True</property>
+ <property name="invisible_char">*</property>
+ <property name="activates_default">False</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="tab_expand">False</property>
+ <property name="tab_fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="lblGeneral">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">General</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+</widget>
+
</glade-interface>