aboutsummaryrefslogtreecommitdiffstats
path: root/modules/mail
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@gnome-db.org>2011-10-05 19:57:30 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-10-05 19:57:30 +0800
commit4ec46cc05fcb94d181fb9c2412984a1446647c85 (patch)
treed16ce30e77dd539c03509237dd4c723d46aea97a /modules/mail
parent5ea7e23aef0c239af2600c95419ba0bda0f08b3c (diff)
parent19163c2b71e6128fc9b32287b99b1f4422324c2d (diff)
downloadgsoc2013-evolution-4ec46cc05fcb94d181fb9c2412984a1446647c85.tar.gz
gsoc2013-evolution-4ec46cc05fcb94d181fb9c2412984a1446647c85.tar.zst
gsoc2013-evolution-4ec46cc05fcb94d181fb9c2412984a1446647c85.zip
Merge from master
Diffstat (limited to 'modules/mail')
-rw-r--r--modules/mail/Makefile.am16
-rw-r--r--modules/mail/e-mail-config-format-html.c3
-rw-r--r--modules/mail/e-mail-config-reader.c3
-rw-r--r--modules/mail/e-mail-config-web-view.c3
-rw-r--r--modules/mail/e-mail-shell-backend.c6
-rw-r--r--modules/mail/e-mail-shell-view-actions.c18
-rw-r--r--modules/mail/e-mail-shell-view-private.c16
-rw-r--r--modules/mail/e-mail-shell-view.c2
-rw-r--r--modules/mail/em-account-prefs.c19
-rw-r--r--modules/mail/em-composer-prefs.c33
-rw-r--r--modules/mail/em-composer-prefs.h4
-rw-r--r--modules/mail/em-network-prefs.c35
-rw-r--r--modules/mail/em-network-prefs.h3
13 files changed, 79 insertions, 82 deletions
diff --git a/modules/mail/Makefile.am b/modules/mail/Makefile.am
index 0bea9ac1a2..90cf1aa54f 100644
--- a/modules/mail/Makefile.am
+++ b/modules/mail/Makefile.am
@@ -5,13 +5,13 @@ libevolution_module_mail_la_CPPFLAGS = \
-I$(top_srcdir) \
-I$(top_srcdir)/mail \
-I$(top_srcdir)/widgets \
- $(GNOME_PLATFORM_CFLAGS) \
- $(EVOLUTION_MAIL_CFLAGS) \
- $(CAMEL_CFLAGS) \
-DEVOLUTION_ETSPECDIR=\""$(etspecdir)"\" \
-DEVOLUTION_UIDIR=\""$(uidir)"\" \
-DEVOLUTION_PRIVDATADIR=\""$(privdatadir)"\" \
- -DG_LOG_DOMAIN=\"evolution-module-mail\"
+ -DG_LOG_DOMAIN=\"evolution-module-mail\" \
+ $(EVOLUTION_DATA_SERVER_CFLAGS) \
+ $(GNOME_PLATFORM_CFLAGS) \
+ $(GTKHTML_CFLAGS)
libevolution_module_mail_la_SOURCES = \
evolution-module-mail.c \
@@ -66,11 +66,9 @@ libevolution_module_mail_la_LIBADD = \
$(top_builddir)/widgets/menus/libmenus.la \
$(top_builddir)/filter/libfilter.la \
$(top_builddir)/capplet/settings/libevolution-mail-settings.la \
- $(EVOLUTION_MAIL_LIBS) \
- $(CAMEL_LIBS) \
- $(GTKHTML_LIBS) \
- $(E_WIDGETS_LIBS) \
- $(GNOME_PLATFORM_LIBS)
+ $(EVOLUTION_DATA_SERVER_LIBS) \
+ $(GNOME_PLATFORM_LIBS) \
+ $(GTKHTML_LIBS)
libevolution_module_mail_la_LDFLAGS = \
-avoid-version -module $(NO_UNDEFINED)
diff --git a/modules/mail/e-mail-config-format-html.c b/modules/mail/e-mail-config-format-html.c
index 23d448f7f0..83bc78f0b2 100644
--- a/modules/mail/e-mail-config-format-html.c
+++ b/modules/mail/e-mail-config-format-html.c
@@ -22,9 +22,10 @@
#include "e-mail-config-format-html.h"
+#include <libebackend/e-extension.h>
+
#include <shell/e-shell.h>
#include <e-util/e-util.h>
-#include <e-util/e-extension.h>
#include <mail/em-format-html.h>
static gpointer parent_class;
diff --git a/modules/mail/e-mail-config-reader.c b/modules/mail/e-mail-config-reader.c
index 3837581562..b284fbdd8d 100644
--- a/modules/mail/e-mail-config-reader.c
+++ b/modules/mail/e-mail-config-reader.c
@@ -22,8 +22,9 @@
#include "e-mail-config-reader.h"
+#include <libebackend/e-extension.h>
+
#include <shell/e-shell.h>
-#include <e-util/e-extension.h>
#include <mail/e-mail-reader.h>
static gpointer parent_class;
diff --git a/modules/mail/e-mail-config-web-view.c b/modules/mail/e-mail-config-web-view.c
index b8a755b46f..ebab286a2d 100644
--- a/modules/mail/e-mail-config-web-view.c
+++ b/modules/mail/e-mail-config-web-view.c
@@ -22,8 +22,9 @@
#include "e-mail-config-web-view.h"
+#include <libebackend/e-extension.h>
+
#include <shell/e-shell.h>
-#include <e-util/e-extension.h>
#include <misc/e-web-view.h>
typedef struct _EMailConfigWebView EMailConfigWebView;
diff --git a/modules/mail/e-mail-shell-backend.c b/modules/mail/e-mail-shell-backend.c
index 5eb5ce9f53..ad572f1421 100644
--- a/modules/mail/e-mail-shell-backend.c
+++ b/modules/mail/e-mail-shell-backend.c
@@ -252,7 +252,8 @@ mail_shell_backend_mail_sync (EMailShellBackend *mail_shell_backend)
session = e_mail_backend_get_session (backend);
e_mail_store_foreach (
- session, (GFunc) mail_shell_backend_sync_store_cb,
+ E_MAIL_BACKEND (mail_shell_backend),
+ (GFunc) mail_shell_backend_sync_store_cb,
mail_shell_backend);
exit:
@@ -455,10 +456,9 @@ mail_shell_backend_start (EShellBackend *shell_backend)
shell_settings = e_shell_get_shell_settings (shell);
backend = E_MAIL_BACKEND (shell_backend);
- session = e_mail_backend_get_session (backend);
data_dir = e_shell_backend_get_data_dir (shell_backend);
- e_mail_store_init (session, data_dir);
+ e_mail_store_init (backend, data_dir);
enable_search_folders = e_shell_settings_get_boolean (
shell_settings, "mail-enable-search-folders");
diff --git a/modules/mail/e-mail-shell-view-actions.c b/modules/mail/e-mail-shell-view-actions.c
index f4f5ea26f6..6d9b3a4252 100644
--- a/modules/mail/e-mail-shell-view-actions.c
+++ b/modules/mail/e-mail-shell-view-actions.c
@@ -85,7 +85,6 @@ action_mail_account_disable_cb (GtkAction *action,
EShellBackend *shell_backend;
EShellView *shell_view;
EMailBackend *backend;
- EMailSession *session;
EMFolderTree *folder_tree;
CamelService *service;
CamelStore *store;
@@ -99,7 +98,6 @@ action_mail_account_disable_cb (GtkAction *action,
shell_backend = e_shell_view_get_shell_backend (shell_view);
backend = E_MAIL_BACKEND (shell_backend);
- session = e_mail_backend_get_session (backend);
folder_tree = e_mail_shell_sidebar_get_folder_tree (mail_shell_sidebar);
store = em_folder_tree_get_selected_store (folder_tree);
@@ -117,7 +115,7 @@ action_mail_account_disable_cb (GtkAction *action,
account->enabled = !account->enabled;
e_account_list_change (account_list, account);
- e_mail_store_remove_by_account (session, account);
+ e_mail_store_remove_by_account (backend, account);
if (account->parent_uid != NULL)
e_account_list_remove (account_list, account);
@@ -227,17 +225,15 @@ action_mail_download_cb (GtkAction *action,
EMailView *mail_view;
EMailReader *reader;
EMailBackend *backend;
- EMailSession *session;
mail_shell_content = mail_shell_view->priv->mail_shell_content;
mail_view = e_mail_shell_content_get_mail_view (mail_shell_content);
reader = E_MAIL_READER (mail_view);
backend = e_mail_reader_get_backend (reader);
- session = e_mail_backend_get_session (backend);
e_mail_store_foreach (
- session, (GFunc) action_mail_download_foreach_cb, reader);
+ backend, (GFunc) action_mail_download_foreach_cb, reader);
}
static void
@@ -247,15 +243,12 @@ action_mail_flush_outbox_cb (GtkAction *action,
EShellBackend *shell_backend;
EShellView *shell_view;
EMailBackend *backend;
- EMailSession *session;
shell_view = E_SHELL_VIEW (mail_shell_view);
shell_backend = e_shell_view_get_shell_backend (shell_view);
-
backend = E_MAIL_BACKEND (shell_backend);
- session = e_mail_backend_get_session (backend);
- mail_send (session);
+ mail_send (backend);
}
static void
@@ -1059,7 +1052,6 @@ action_mail_tools_subscriptions_cb (GtkAction *action,
EShellWindow *shell_window;
EShellView *shell_view;
EMailBackend *backend;
- EMailSession *session;
EMFolderTree *folder_tree;
GtkWidget *dialog;
CamelStore *store;
@@ -1073,11 +1065,9 @@ action_mail_tools_subscriptions_cb (GtkAction *action,
store = em_folder_tree_get_selected_store (folder_tree);
backend = E_MAIL_BACKEND (shell_backend);
- session = e_mail_backend_get_session (backend);
dialog = em_subscription_editor_new (
- GTK_WINDOW (shell_window),
- CAMEL_SESSION (session), store);
+ GTK_WINDOW (shell_window), backend, store);
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);
}
diff --git a/modules/mail/e-mail-shell-view-private.c b/modules/mail/e-mail-shell-view-private.c
index a7309904bd..30a6756ddf 100644
--- a/modules/mail/e-mail-shell-view-private.c
+++ b/modules/mail/e-mail-shell-view-private.c
@@ -1089,7 +1089,6 @@ e_mail_shell_view_send_receive (EMailShellView *mail_shell_view,
EMailSendReceiveMode mode,
const gchar *account_uid)
{
- EMailSession *session;
EShellView *shell_view;
EShellWindow *shell_window;
EShellBackend *shell_backend;
@@ -1100,20 +1099,22 @@ e_mail_shell_view_send_receive (EMailShellView *mail_shell_view,
shell_window = e_shell_view_get_shell_window (shell_view);
shell_backend = e_shell_view_get_shell_backend (shell_view);
- session = e_mail_backend_get_session (E_MAIL_BACKEND (shell_backend));
-
em_utils_clear_get_password_canceled_accounts_flag ();
if (!account_uid) {
switch (mode) {
case E_MAIL_SEND_RECEIVE_BOTH:
- mail_send_receive (GTK_WINDOW (shell_window), session);
+ mail_send_receive (
+ GTK_WINDOW (shell_window),
+ E_MAIL_BACKEND (shell_backend));
break;
case E_MAIL_SEND_RECEIVE_RECEIVE:
- mail_receive (GTK_WINDOW (shell_window), session);
+ mail_receive (
+ GTK_WINDOW (shell_window),
+ E_MAIL_BACKEND (shell_backend));
break;
case E_MAIL_SEND_RECEIVE_SEND:
- mail_send (session);
+ mail_send (E_MAIL_BACKEND (shell_backend));
break;
}
} else {
@@ -1124,7 +1125,8 @@ e_mail_shell_view_send_receive (EMailShellView *mail_shell_view,
g_return_if_fail (account != NULL);
if (account->enabled && account->source != NULL)
- mail_receive_account (session, account);
+ mail_receive_account (
+ E_MAIL_BACKEND (shell_backend), account);
}
}
diff --git a/modules/mail/e-mail-shell-view.c b/modules/mail/e-mail-shell-view.c
index 3a92ce284b..5759b5830f 100644
--- a/modules/mail/e-mail-shell-view.c
+++ b/modules/mail/e-mail-shell-view.c
@@ -868,7 +868,7 @@ mail_shell_view_update_actions (EShellView *shell_view)
shell_sidebar = e_shell_view_get_shell_sidebar (shell_view);
state = e_shell_sidebar_check_state (shell_sidebar);
- model = em_folder_tree_model_get_default (e_mail_reader_get_backend (reader));
+ model = em_folder_tree_model_get_default ();
folder_allows_children =
(state & E_MAIL_SIDEBAR_FOLDER_ALLOWS_CHILDREN);
diff --git a/modules/mail/em-account-prefs.c b/modules/mail/em-account-prefs.c
index 1b11b41b68..f4a0a740d5 100644
--- a/modules/mail/em-account-prefs.c
+++ b/modules/mail/em-account-prefs.c
@@ -62,7 +62,9 @@ G_DEFINE_TYPE (
E_TYPE_ACCOUNT_MANAGER)
static gboolean
-account_prefs_toggle_enable_special (EMAccountPrefs *prefs, EAccountTreeViewSelectedType type, gboolean enabled)
+account_prefs_toggle_enable_special (EMAccountPrefs *prefs,
+ EAccountTreeViewSelectedType type,
+ gboolean enabled)
{
const gchar *prop = NULL;
EShell *shell;
@@ -106,8 +108,7 @@ account_prefs_enable_account_cb (EAccountTreeView *tree_view,
g_return_if_fail (account != NULL);
- session = e_mail_backend_get_session (prefs->priv->backend);
- e_mail_store_add_by_account (session, account);
+ e_mail_store_add_by_account (prefs->priv->backend, account);
}
static void
@@ -131,10 +132,8 @@ account_prefs_disable_account_cb (EAccountTreeView *tree_view,
account_list = e_account_tree_view_get_account_list (tree_view);
g_return_if_fail (account_list != NULL);
- session = e_mail_backend_get_session (prefs->priv->backend);
-
if (!e_account_list_account_has_proxies (account_list, account)) {
- e_mail_store_remove_by_account (session, account);
+ e_mail_store_remove_by_account (prefs->priv->backend, account);
return;
}
@@ -151,7 +150,7 @@ account_prefs_disable_account_cb (EAccountTreeView *tree_view,
e_account_list_remove_account_proxies (account_list, account);
- e_mail_store_remove_by_account (session, account);
+ e_mail_store_remove_by_account (prefs->priv->backend, account);
}
static void
@@ -330,7 +329,6 @@ account_prefs_delete_account (EAccountManager *manager)
gint response;
priv = EM_ACCOUNT_PREFS (manager)->priv;
- session = e_mail_backend_get_session (priv->backend);
account_list = e_account_manager_get_account_list (manager);
tree_view = e_account_manager_get_tree_view (manager);
@@ -359,7 +357,7 @@ account_prefs_delete_account (EAccountManager *manager)
/* Remove the account from the folder tree. */
if (account->enabled)
- e_mail_store_remove_by_account (session, account);
+ e_mail_store_remove_by_account (priv->backend, account);
/* Remove all the proxies the account has created. */
if (has_proxies)
@@ -423,7 +421,8 @@ em_account_prefs_init (EMAccountPrefs *prefs)
}
static void
-account_tree_view_sort_order_changed_cb (EAccountTreeView *tree_view, EMailBackend *backend)
+account_tree_view_sort_order_changed_cb (EAccountTreeView *tree_view,
+ EMailBackend *backend)
{
GSList *account_uids;
diff --git a/modules/mail/em-composer-prefs.c b/modules/mail/em-composer-prefs.c
index fb49352357..12a521b454 100644
--- a/modules/mail/em-composer-prefs.c
+++ b/modules/mail/em-composer-prefs.c
@@ -43,16 +43,16 @@
#include <gtkhtml/gtkhtml.h>
#include <editor/gtkhtml-spell-language.h>
-#include "e-util/e-util.h"
-#include "e-util/e-util-private.h"
-#include "mail/e-mail-junk-options.h"
-#include "widgets/misc/e-charset-combo-box.h"
-#include "widgets/misc/e-signature-editor.h"
-#include "widgets/misc/e-signature-manager.h"
-#include "widgets/misc/e-signature-preview.h"
+#include <e-util/e-util.h>
+#include <e-util/e-util-private.h>
+#include <misc/e-charset-combo-box.h>
+#include <misc/e-signature-editor.h>
+#include <misc/e-signature-manager.h>
+#include <misc/e-signature-preview.h>
#include "em-config.h"
#include "em-folder-selection-button.h"
+#include "e-mail-junk-options.h"
G_DEFINE_TYPE (
EMComposerPrefs,
@@ -132,14 +132,17 @@ transform_new_to_old_reply_style (GBinding *binding,
}
static void
-composer_prefs_finalize (GObject *object)
+composer_prefs_dispose (GObject *object)
{
EMComposerPrefs *prefs = (EMComposerPrefs *) object;
- g_object_unref (prefs->builder);
+ if (prefs->builder != NULL) {
+ g_object_unref (prefs->builder);
+ prefs->builder = NULL;
+ }
- /* Chain up to parent's finalize() method. */
- G_OBJECT_CLASS (em_composer_prefs_parent_class)->finalize (object);
+ /* Chain up to parent's dispose() method. */
+ G_OBJECT_CLASS (em_composer_prefs_parent_class)->dispose (object);
}
static void
@@ -148,7 +151,7 @@ em_composer_prefs_class_init (EMComposerPrefsClass *class)
GObjectClass *object_class;
object_class = G_OBJECT_CLASS (class);
- object_class->finalize = composer_prefs_finalize;
+ object_class->dispose = composer_prefs_dispose;
}
static void
@@ -538,7 +541,8 @@ em_composer_prefs_construct (EMComposerPrefs *prefs,
/* Signatures */
signature_list = e_get_signature_list ();
- container = e_builder_get_widget (prefs->builder, "signature-alignment");
+ container = e_builder_get_widget (
+ prefs->builder, "signature-alignment");
widget = e_signature_manager_new (signature_list);
gtk_container_add (GTK_CONTAINER (container), widget);
gtk_widget_show (widget);
@@ -589,9 +593,10 @@ em_composer_prefs_construct (EMComposerPrefs *prefs,
GtkWidget *
em_composer_prefs_new (EPreferencesWindow *window)
{
+ EShell *shell;
EMComposerPrefs *prefs;
- EShell *shell = e_preferences_window_get_shell (window);
+ shell = e_preferences_window_get_shell (window);
g_return_val_if_fail (E_IS_SHELL (shell), NULL);
prefs = g_object_new (EM_TYPE_COMPOSER_PREFS, NULL);
diff --git a/modules/mail/em-composer-prefs.h b/modules/mail/em-composer-prefs.h
index f39af57c4e..79a53bb775 100644
--- a/modules/mail/em-composer-prefs.h
+++ b/modules/mail/em-composer-prefs.h
@@ -76,8 +76,8 @@ struct _EMComposerPrefsClass {
GtkVBoxClass parent_class;
};
-GType em_composer_prefs_get_type (void);
-GtkWidget *em_composer_prefs_new (EPreferencesWindow *window);
+GType em_composer_prefs_get_type (void);
+GtkWidget * em_composer_prefs_new (EPreferencesWindow *window);
G_END_DECLS
diff --git a/modules/mail/em-network-prefs.c b/modules/mail/em-network-prefs.c
index 242c84993e..64fe23e7f9 100644
--- a/modules/mail/em-network-prefs.c
+++ b/modules/mail/em-network-prefs.c
@@ -148,12 +148,11 @@ emnp_set_sensitiveness (EMNetworkPrefs *prefs,
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);
-#if 0
gtk_widget_set_sensitive ((GtkWidget *) prefs->socks_host, sensitivity);
gtk_widget_set_sensitive ((GtkWidget *) prefs->socks_port, sensitivity);
gtk_widget_set_sensitive ((GtkWidget *) prefs->lbl_socks_host, sensitivity);
gtk_widget_set_sensitive ((GtkWidget *) prefs->lbl_socks_port, sensitivity);
-#endif
+
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);
@@ -389,13 +388,17 @@ em_network_prefs_construct (EMNetworkPrefs *prefs)
prefs->manual_proxy = GTK_TOGGLE_BUTTON (e_builder_get_widget (prefs->builder, "rdoManualProxy"));
prefs->http_host = GTK_ENTRY (e_builder_get_widget (prefs->builder, "txtHttpHost"));
prefs->https_host = GTK_ENTRY (e_builder_get_widget (prefs->builder, "txtHttpsHost"));
+ prefs->socks_host = GTK_ENTRY (e_builder_get_widget (prefs->builder, "txtSocksHost"));
prefs->ignore_hosts = GTK_ENTRY (e_builder_get_widget (prefs->builder, "txtIgnoreHosts"));
prefs->http_port = GTK_SPIN_BUTTON (e_builder_get_widget (prefs->builder, "spnHttpPort"));
prefs->https_port = GTK_SPIN_BUTTON (e_builder_get_widget (prefs->builder, "spnHttpsPort"));
+ prefs->socks_port = GTK_SPIN_BUTTON (e_builder_get_widget (prefs->builder, "spnSocksPort"));
prefs->lbl_http_host = GTK_LABEL (e_builder_get_widget (prefs->builder, "lblHttpHost"));
prefs->lbl_http_port = GTK_LABEL (e_builder_get_widget (prefs->builder, "lblHttpPort"));
prefs->lbl_https_host = GTK_LABEL (e_builder_get_widget (prefs->builder, "lblHttpsHost"));
prefs->lbl_https_port = GTK_LABEL (e_builder_get_widget (prefs->builder, "lblHttpsPort"));
+ prefs->lbl_socks_host = GTK_LABEL (e_builder_get_widget (prefs->builder, "lblSocksHost"));
+ prefs->lbl_socks_port = GTK_LABEL (e_builder_get_widget (prefs->builder, "lblSocksPort"));
prefs->lbl_ignore_hosts = GTK_LABEL (e_builder_get_widget (prefs->builder, "lblIgnoreHosts"));
prefs->use_auth = GTK_TOGGLE_BUTTON (e_builder_get_widget (prefs->builder, "chkUseAuth"));
toggle_button_init (prefs, prefs->use_auth, GCONF_E_USE_AUTH_KEY);
@@ -404,17 +407,6 @@ em_network_prefs_construct (EMNetworkPrefs *prefs)
prefs->auth_user = GTK_ENTRY (e_builder_get_widget (prefs->builder, "txtAuthUser"));
prefs->auth_pwd = GTK_ENTRY (e_builder_get_widget (prefs->builder, "txtAuthPwd"));
-#if 0
- prefs->socks_host = GTK_ENTRY (e_builder_get_widget (prefs->builder, "txtSocksHost"));
- prefs->socks_port = GTK_SPIN_BUTTON (e_builder_get_widget (prefs->builder, "spnSocksPort"));
- prefs->lbl_socks_host = GTK_LABEL (e_builder_get_widget (prefs->builder, "lblSocksHost"));
- prefs->lbl_socks_port = GTK_LABEL (e_builder_get_widget (prefs->builder, "lblSocksPort"));
- g_signal_connect (prefs->socks_host, "changed",
- G_CALLBACK (widget_entry_changed_cb), GCONF_E_SOCKS_HOST_KEY);
- g_signal_connect (prefs->socks_port, "value_changed",
- G_CALLBACK (widget_entry_changed_cb), GCONF_E_SOCKS_PORT_KEY);
-#endif
-
/* Manual proxy options */
g_signal_connect (prefs->http_host, "changed",
G_CALLBACK (widget_entry_changed_cb),
@@ -431,6 +423,12 @@ em_network_prefs_construct (EMNetworkPrefs *prefs)
g_signal_connect (prefs->https_port, "value_changed",
G_CALLBACK (widget_entry_changed_cb),
(gpointer) GCONF_E_HTTPS_PORT_KEY);
+ g_signal_connect (prefs->socks_host, "changed",
+ G_CALLBACK (widget_entry_changed_cb),
+ (gpointer) GCONF_E_SOCKS_HOST_KEY);
+ g_signal_connect (prefs->socks_port, "value_changed",
+ G_CALLBACK (widget_entry_changed_cb),
+ (gpointer) GCONF_E_SOCKS_PORT_KEY);
g_signal_connect (prefs->auth_user, "changed",
G_CALLBACK (widget_entry_changed_cb),
(gpointer) GCONF_E_AUTH_USER_KEY);
@@ -458,6 +456,10 @@ em_network_prefs_construct (EMNetworkPrefs *prefs)
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 = NULL;
ignore = gconf_client_get_list (prefs->gconf, GCONF_E_IGNORE_HOSTS_KEY, GCONF_VALUE_STRING, NULL);
if (ignore) {
@@ -502,14 +504,9 @@ em_network_prefs_construct (EMNetworkPrefs *prefs)
port = gconf_client_get_int (prefs->gconf, GCONF_E_HTTPS_PORT_KEY, NULL);
gtk_spin_button_set_value (prefs->https_port, (gdouble) port);
-#if 0
- 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);
-
port = gconf_client_get_int (prefs->gconf, GCONF_E_SOCKS_PORT_KEY, NULL);
gtk_spin_button_set_value (prefs->socks_port, (gdouble) port);
-#endif
+
emnp_set_markups (prefs);
if (val == NETWORK_PROXY_DIRECT_CONNECTION ||
diff --git a/modules/mail/em-network-prefs.h b/modules/mail/em-network-prefs.h
index 4196686ffe..f13a239490 100644
--- a/modules/mail/em-network-prefs.h
+++ b/modules/mail/em-network-prefs.h
@@ -82,12 +82,15 @@ struct _EMNetworkPrefs {
GtkLabel *lbl_http_port;
GtkLabel *lbl_https_host;
GtkLabel *lbl_https_port;
+ GtkLabel *lbl_socks_host;
+ GtkLabel *lbl_socks_port;
GtkLabel *lbl_ignore_hosts;
GtkLabel *lbl_auth_user;
GtkLabel *lbl_auth_pwd;
GtkSpinButton *http_port;
GtkSpinButton *https_port;
+ GtkSpinButton *socks_port;
};
struct _EMNetworkPrefsClass {