aboutsummaryrefslogtreecommitdiffstats
path: root/modules/mail
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-10-14 11:40:16 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-10-14 19:12:52 +0800
commit1e663aa13266cad55e5019c03e768a38955166eb (patch)
tree6d7a3e20d3a24f004d0db4ab1c06d8a768b2f112 /modules/mail
parent3f58ba3d833953c29bb6aa5e1834e2f367f15202 (diff)
downloadgsoc2013-evolution-1e663aa13266cad55e5019c03e768a38955166eb.tar.gz
gsoc2013-evolution-1e663aa13266cad55e5019c03e768a38955166eb.tar.zst
gsoc2013-evolution-1e663aa13266cad55e5019c03e768a38955166eb.zip
Replace EBinding with GBinding.
GObject now does property bindings itself. Requires GLib >= 2.26.
Diffstat (limited to 'modules/mail')
-rw-r--r--modules/mail/e-mail-config-format-html.c27
-rw-r--r--modules/mail/e-mail-config-web-view.c21
-rw-r--r--modules/mail/e-mail-shell-backend.c1
-rw-r--r--modules/mail/e-mail-shell-content.c1
-rw-r--r--modules/mail/e-mail-shell-sidebar.c12
-rw-r--r--modules/mail/e-mail-shell-view-actions.c63
-rw-r--r--modules/mail/e-mail-shell-view-private.c12
-rw-r--r--modules/mail/e-mail-shell-view-private.h1
-rw-r--r--modules/mail/em-composer-prefs.c199
-rw-r--r--modules/mail/em-mailer-prefs.c146
10 files changed, 282 insertions, 201 deletions
diff --git a/modules/mail/e-mail-config-format-html.c b/modules/mail/e-mail-config-format-html.c
index a92a943976..26071c0614 100644
--- a/modules/mail/e-mail-config-format-html.c
+++ b/modules/mail/e-mail-config-format-html.c
@@ -19,7 +19,7 @@
#include "e-mail-config-format-html.h"
#include <shell/e-shell.h>
-#include <e-util/e-binding.h>
+#include <e-util/e-util.h>
#include <e-util/e-extension.h>
#include <mail/em-format-html.h>
@@ -37,27 +37,32 @@ mail_config_format_html_constructed (GObject *object)
shell = e_shell_get_default ();
shell_settings = e_shell_get_shell_settings (shell);
- e_binding_new_full (
+ g_object_bind_property_full (
shell_settings, "mail-citation-color",
extensible, "citation-color",
+ G_BINDING_SYNC_CREATE,
e_binding_transform_string_to_color,
- NULL, NULL);
+ NULL, NULL, (GDestroyNotify) NULL);
- e_binding_new (
+ g_object_bind_property (
shell_settings, "mail-image-loading-policy",
- extensible, "image-loading-policy");
+ extensible, "image-loading-policy",
+ G_BINDING_SYNC_CREATE);
- e_binding_new (
+ g_object_bind_property (
shell_settings, "mail-only-local-photos",
- extensible, "only-local-photos");
+ extensible, "only-local-photos",
+ G_BINDING_SYNC_CREATE);
- e_binding_new (
+ g_object_bind_property (
shell_settings, "mail-show-sender-photo",
- extensible, "show-sender-photo");
+ extensible, "show-sender-photo",
+ G_BINDING_SYNC_CREATE);
- e_binding_new (
+ g_object_bind_property (
shell_settings, "mail-show-real-date",
- extensible, "show-real-date");
+ extensible, "show-real-date",
+ G_BINDING_SYNC_CREATE);
}
static void
diff --git a/modules/mail/e-mail-config-web-view.c b/modules/mail/e-mail-config-web-view.c
index 5cfb648154..3157ff07f9 100644
--- a/modules/mail/e-mail-config-web-view.c
+++ b/modules/mail/e-mail-config-web-view.c
@@ -19,7 +19,6 @@
#include "e-mail-config-web-view.h"
#include <shell/e-shell.h>
-#include <e-util/e-binding.h>
#include <e-util/e-extension.h>
#include <misc/e-web-view.h>
@@ -32,21 +31,25 @@ mail_config_web_view_realize (GtkWidget *widget)
shell = e_shell_get_default ();
shell_settings = e_shell_get_shell_settings (shell);
- e_binding_new (
+ g_object_bind_property (
shell_settings, "mail-show-animated-images",
- widget, "animate");
+ widget, "animate",
+ G_BINDING_SYNC_CREATE);
- e_binding_new (
+ g_object_bind_property (
shell_settings, "composer-inline-spelling",
- widget, "inline-spelling");
+ widget, "inline-spelling",
+ G_BINDING_SYNC_CREATE);
- e_binding_new (
+ g_object_bind_property (
shell_settings, "composer-magic-links",
- widget, "magic-links");
+ widget, "magic-links",
+ G_BINDING_SYNC_CREATE);
- e_binding_new (
+ g_object_bind_property (
shell_settings, "composer-magic-smileys",
- widget, "magic-smileys");
+ widget, "magic-smileys",
+ G_BINDING_SYNC_CREATE);
}
static void
diff --git a/modules/mail/e-mail-shell-backend.c b/modules/mail/e-mail-shell-backend.c
index 02b073a82b..36e4cbdfb3 100644
--- a/modules/mail/e-mail-shell-backend.c
+++ b/modules/mail/e-mail-shell-backend.c
@@ -23,7 +23,6 @@
#include <glib/gi18n.h>
-#include "e-util/e-binding.h"
#include "e-util/e-import.h"
#include "e-util/e-util.h"
#include "shell/e-shell.h"
diff --git a/modules/mail/e-mail-shell-content.c b/modules/mail/e-mail-shell-content.c
index fd1db02fa8..31f60834e5 100644
--- a/modules/mail/e-mail-shell-content.c
+++ b/modules/mail/e-mail-shell-content.c
@@ -25,7 +25,6 @@
#include <libedataserver/e-data-server-util.h>
#include "e-util/e-util-private.h"
-#include "e-util/e-binding.h"
#include "e-util/gconf-bridge.h"
#include "widgets/menus/gal-view-etable.h"
#include "widgets/menus/gal-view-instance.h"
diff --git a/modules/mail/e-mail-shell-sidebar.c b/modules/mail/e-mail-shell-sidebar.c
index bc1cbcdda2..f938b3fae1 100644
--- a/modules/mail/e-mail-shell-sidebar.c
+++ b/modules/mail/e-mail-shell-sidebar.c
@@ -21,8 +21,6 @@
#include "e-mail-shell-sidebar.h"
-#include "e-util/e-binding.h"
-
#include "mail/e-mail-backend.h"
#include "mail/e-mail-sidebar.h"
#include "mail/em-folder-utils.h"
@@ -165,13 +163,15 @@ mail_shell_sidebar_constructed (GObject *object)
mail_shell_sidebar->priv->folder_tree = g_object_ref (widget);
gtk_widget_show (widget);
- e_binding_new (
+ g_object_bind_property (
shell_view, "state-key-file",
- widget, "key-file");
+ widget, "key-file",
+ G_BINDING_SYNC_CREATE);
- e_binding_new (
+ g_object_bind_property (
shell_settings, "mail-side-bar-search",
- widget, "enable-search");
+ widget, "enable-search",
+ G_BINDING_SYNC_CREATE);
g_signal_connect_swapped (
widget, "key-file-changed",
diff --git a/modules/mail/e-mail-shell-view-actions.c b/modules/mail/e-mail-shell-view-actions.c
index 920aa0680e..b62e7c1a00 100644
--- a/modules/mail/e-mail-shell-view-actions.c
+++ b/modules/mail/e-mail-shell-view-actions.c
@@ -1536,56 +1536,71 @@ e_mail_shell_view_actions_init (EMailShellView *mail_shell_view)
/* Fine tuning. */
- e_binding_new (
+ g_object_bind_property (
ACTION (MAIL_THREADS_GROUP_BY), "active",
- ACTION (MAIL_FOLDER_SELECT_THREAD), "sensitive");
+ ACTION (MAIL_FOLDER_SELECT_THREAD), "sensitive",
+ G_BINDING_SYNC_CREATE);
- e_binding_new (
+ g_object_bind_property (
ACTION (MAIL_THREADS_GROUP_BY), "active",
- ACTION (MAIL_FOLDER_SELECT_SUBTHREAD), "sensitive");
+ ACTION (MAIL_FOLDER_SELECT_SUBTHREAD), "sensitive",
+ G_BINDING_SYNC_CREATE);
- e_binding_new (
+ g_object_bind_property (
ACTION (MAIL_THREADS_GROUP_BY), "active",
- ACTION (MAIL_THREADS_COLLAPSE_ALL), "sensitive");
+ ACTION (MAIL_THREADS_COLLAPSE_ALL), "sensitive",
+ G_BINDING_SYNC_CREATE);
- e_binding_new (
+ g_object_bind_property (
ACTION (MAIL_THREADS_GROUP_BY), "active",
- ACTION (MAIL_THREADS_EXPAND_ALL), "sensitive");
+ ACTION (MAIL_THREADS_EXPAND_ALL), "sensitive",
+ G_BINDING_SYNC_CREATE);
- e_mutual_binding_new (
+ g_object_bind_property (
ACTION (MAIL_PREVIEW), "active",
- mail_view, "preview-visible");
+ mail_view, "preview-visible",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE);
- e_mutual_binding_new (
+ g_object_bind_property (
ACTION (MAIL_THREADS_GROUP_BY), "active",
- mail_shell_content, "group-by-threads");
+ mail_shell_content, "group-by-threads",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE);
- e_binding_new (
+ g_object_bind_property (
ACTION (MAIL_PREVIEW), "active",
- ACTION (MAIL_VIEW_CLASSIC), "sensitive");
+ ACTION (MAIL_VIEW_CLASSIC), "sensitive",
+ G_BINDING_SYNC_CREATE);
- e_binding_new (
+ g_object_bind_property (
ACTION (MAIL_PREVIEW), "active",
- ACTION (MAIL_VIEW_VERTICAL), "sensitive");
+ ACTION (MAIL_VIEW_VERTICAL), "sensitive",
+ G_BINDING_SYNC_CREATE);
- e_mutual_binding_new (
+ g_object_bind_property (
ACTION (MAIL_SHOW_DELETED), "active",
- mail_view, "show-deleted");
+ mail_view, "show-deleted",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE);
- e_binding_new (
+ g_object_bind_property (
shell_backend, "busy",
- ACTION (MAIL_STOP), "sensitive");
+ ACTION (MAIL_STOP), "sensitive",
+ G_BINDING_SYNC_CREATE);
/* Keep the sensitivity of "Create Search Folder from Search"
* in sync with "Save Search" so that its only selectable when
* showing search results. */
- e_binding_new (
+ g_object_bind_property (
ACTION (SEARCH_SAVE), "sensitive",
- ACTION (MAIL_CREATE_SEARCH_FOLDER), "sensitive");
+ ACTION (MAIL_CREATE_SEARCH_FOLDER), "sensitive",
+ G_BINDING_SYNC_CREATE);
- e_binding_new (
+ g_object_bind_property (
shell, "online",
- ACTION (MAIL_DOWNLOAD), "sensitive");
+ ACTION (MAIL_DOWNLOAD), "sensitive",
+ G_BINDING_SYNC_CREATE);
g_signal_connect (
ACTION (GAL_SAVE_CUSTOM_VIEW), "activate",
diff --git a/modules/mail/e-mail-shell-view-private.c b/modules/mail/e-mail-shell-view-private.c
index e8febf59ca..12ff06567d 100644
--- a/modules/mail/e-mail-shell-view-private.c
+++ b/modules/mail/e-mail-shell-view-private.c
@@ -563,9 +563,11 @@ e_mail_shell_view_private_constructed (EMailShellView *mail_shell_view)
/* The folder tree and scope combo box are both insensitive
* when searching beyond the currently selected folder. */
- e_mutual_binding_new (
+ g_object_bind_property (
folder_tree, "sensitive",
- combo_box, "sensitive");
+ combo_box, "sensitive",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE);
web_view = em_format_html_get_web_view (formatter);
@@ -670,9 +672,11 @@ e_mail_shell_view_private_constructed (EMailShellView *mail_shell_view)
e_mail_shell_view_update_search_filter (mail_shell_view);
/* This binding must come after e_mail_reader_init(). */
- e_mutual_binding_new (
+ g_object_bind_property (
shell_content, "group-by-threads",
- mail_view, "group-by-threads");
+ mail_view, "group-by-threads",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE);
/* Populate built-in rules for search entry popup menu.
* Keep the assertions, please. If the conditions aren't
diff --git a/modules/mail/e-mail-shell-view-private.h b/modules/mail/e-mail-shell-view-private.h
index dbd2d217d5..bb56a9e27e 100644
--- a/modules/mail/e-mail-shell-view-private.h
+++ b/modules/mail/e-mail-shell-view-private.h
@@ -29,7 +29,6 @@
#include <camel/camel-search-private.h> /* for camel_search_word */
#include "e-util/e-util.h"
-#include "e-util/e-binding.h"
#include "e-util/gconf-bridge.h"
#include "e-util/e-account-utils.h"
#include "e-util/e-ui-manager.h"
diff --git a/modules/mail/em-composer-prefs.c b/modules/mail/em-composer-prefs.c
index 21db864103..196e215643 100644
--- a/modules/mail/em-composer-prefs.c
+++ b/modules/mail/em-composer-prefs.c
@@ -30,7 +30,6 @@
#include <unistd.h>
#include <fcntl.h>
-#include "e-util/e-binding.h"
#include "e-util/e-signature-utils.h"
#include "e-util/gconf-bridge.h"
@@ -61,42 +60,9 @@ G_DEFINE_TYPE (
GTK_TYPE_VBOX)
static gboolean
-transform_color_to_string (const GValue *src_value,
- GValue *dst_value,
- gpointer user_data)
-{
- const GdkColor *color;
- gchar *string;
-
- color = g_value_get_boxed (src_value);
- string = gdk_color_to_string (color);
- g_value_set_string (dst_value, string);
- g_free (string);
-
- return TRUE;
-}
-
-static gboolean
-transform_string_to_color (const GValue *src_value,
- GValue *dst_value,
- gpointer user_data)
-{
- GdkColor color;
- const gchar *string;
- gboolean success = FALSE;
-
- string = g_value_get_string (src_value);
- if (gdk_color_parse (string, &color)) {
- g_value_set_boxed (dst_value, &color);
- success = TRUE;
- }
-
- return success;
-}
-
-static gboolean
-transform_old_to_new_reply_style (const GValue *src_value,
- GValue *dst_value,
+transform_old_to_new_reply_style (GBinding *binding,
+ const GValue *source_value,
+ GValue *target_value,
gpointer user_data)
{
gboolean success = TRUE;
@@ -104,21 +70,21 @@ transform_old_to_new_reply_style (const GValue *src_value,
/* XXX This is the kind of legacy crap we wind up
* with when we don't migrate things properly. */
- switch (g_value_get_int (src_value)) {
+ switch (g_value_get_int (source_value)) {
case 0: /* Quoted: 0 -> 2 */
- g_value_set_int (dst_value, 2);
+ g_value_set_int (target_value, 2);
break;
case 1: /* Do Not Quote: 1 -> 3 */
- g_value_set_int (dst_value, 3);
+ g_value_set_int (target_value, 3);
break;
case 2: /* Attach: 2 -> 0 */
- g_value_set_int (dst_value, 0);
+ g_value_set_int (target_value, 0);
break;
case 3: /* Outlook: 3 -> 1 */
- g_value_set_int (dst_value, 1);
+ g_value_set_int (target_value, 1);
break;
default:
@@ -130,8 +96,9 @@ transform_old_to_new_reply_style (const GValue *src_value,
}
static gboolean
-transform_new_to_old_reply_style (const GValue *src_value,
- GValue *dst_value,
+transform_new_to_old_reply_style (GBinding *binding,
+ const GValue *source_value,
+ GValue *target_value,
gpointer user_data)
{
gboolean success = TRUE;
@@ -139,21 +106,21 @@ transform_new_to_old_reply_style (const GValue *src_value,
/* XXX This is the kind of legacy crap we wind up
* with when we don't migrate things properly. */
- switch (g_value_get_int (src_value)) {
+ switch (g_value_get_int (source_value)) {
case 0: /* Attach: 0 -> 2 */
- g_value_set_int (dst_value, 2);
+ g_value_set_int (target_value, 2);
break;
case 1: /* Outlook: 1 -> 3 */
- g_value_set_int (dst_value, 3);
+ g_value_set_int (target_value, 3);
break;
case 2: /* Quoted: 2 -> 0 */
- g_value_set_int (dst_value, 0);
+ g_value_set_int (target_value, 0);
break;
case 3: /* Do Not Quote: 3 -> 1 */
- g_value_set_int (dst_value, 1);
+ g_value_set_int (target_value, 1);
break;
default:
@@ -405,82 +372,112 @@ em_composer_prefs_construct (EMComposerPrefs *prefs,
if (e_shell_get_express_mode (shell))
gtk_widget_hide (widget);
else
- e_mutual_binding_new (
+ g_object_bind_property (
shell_settings, "composer-format-html",
- widget, "active");
+ widget, "active",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE);
widget = e_builder_get_widget (prefs->builder, "chkPromptEmptySubject");
- e_mutual_binding_new (
+ g_object_bind_property (
shell_settings, "composer-prompt-empty-subject",
- widget, "active");
+ widget, "active",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE);
widget = e_builder_get_widget (prefs->builder, "chkPromptBccOnly");
- e_mutual_binding_new (
+ g_object_bind_property (
shell_settings, "composer-prompt-only-bcc",
- widget, "active");
+ widget, "active",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE);
widget = e_builder_get_widget (prefs->builder, "chkPromptPrivateListReply");
- e_mutual_binding_new (
+ g_object_bind_property (
shell_settings, "composer-prompt-private-list-reply",
- widget, "active");
+ widget, "active",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE);
widget = e_builder_get_widget (prefs->builder, "chkPromptReplyManyRecips");
- e_mutual_binding_new (
+ g_object_bind_property (
shell_settings, "composer-prompt-reply-many-recips",
- widget, "active");
+ widget, "active",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE);
widget = e_builder_get_widget (prefs->builder, "chkPromptListReplyTo");
- e_mutual_binding_new (
+ g_object_bind_property (
shell_settings, "composer-prompt-list-reply-to",
- widget, "active");
+ widget, "active",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE);
widget = e_builder_get_widget (prefs->builder, "chkAutoSmileys");
- e_mutual_binding_new (
+ g_object_bind_property (
shell_settings, "composer-magic-smileys",
- widget, "active");
+ widget, "active",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE);
widget = e_builder_get_widget (prefs->builder, "chkRequestReceipt");
- e_mutual_binding_new (
+ g_object_bind_property (
shell_settings, "composer-request-receipt",
- widget, "active");
+ widget, "active",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE);
widget = e_builder_get_widget (prefs->builder, "chkReplyStartBottom");
- e_mutual_binding_new (
+ g_object_bind_property (
shell_settings, "composer-reply-start-bottom",
- widget, "active");
+ widget, "active",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE);
widget = e_builder_get_widget (prefs->builder, "chkOutlookFilenames");
- e_mutual_binding_new (
+ g_object_bind_property (
shell_settings, "composer-outlook-filenames",
- widget, "active");
+ widget, "active",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE);
widget = e_builder_get_widget (prefs->builder, "chkIgnoreListReplyTo");
- e_mutual_binding_new (
+ g_object_bind_property (
shell_settings, "composer-ignore-list-reply-to",
- widget, "active");
+ widget, "active",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE);
widget = e_builder_get_widget (prefs->builder, "chkGroupReplyToList");
- e_mutual_binding_new (
+ g_object_bind_property (
shell_settings, "composer-group-reply-to-list",
- widget, "active");
+ widget, "active",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE);
widget = e_builder_get_widget (prefs->builder, "chkTopSignature");
- e_mutual_binding_new (
+ g_object_bind_property (
shell_settings, "composer-top-signature",
- widget, "active");
+ widget, "active",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE);
widget = e_builder_get_widget (prefs->builder, "chkEnableSpellChecking");
- e_mutual_binding_new (
+ g_object_bind_property (
shell_settings, "composer-inline-spelling",
- widget, "active");
+ widget, "active",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE);
widget = e_charset_combo_box_new ();
container = e_builder_get_widget (prefs->builder, "hboxComposerCharset");
gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 0);
gtk_widget_show (widget);
- e_mutual_binding_new (
+ g_object_bind_property (
shell_settings, "composer-charset",
- widget, "charset");
+ widget, "charset",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE);
/* Spell Checking */
widget = e_builder_get_widget (prefs->builder, "listSpellCheckLanguage");
@@ -512,28 +509,34 @@ em_composer_prefs_construct (EMComposerPrefs *prefs,
GTK_STOCK_DIALOG_INFO, GTK_ICON_SIZE_BUTTON);
widget = e_builder_get_widget (prefs->builder, "colorButtonSpellCheckColor");
- e_mutual_binding_new_full (
+ g_object_bind_property_full (
shell_settings, "composer-spell-color",
widget, "color",
- transform_string_to_color,
- transform_color_to_string,
- NULL, NULL);
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE,
+ e_binding_transform_string_to_color,
+ e_binding_transform_color_to_string,
+ NULL, (GDestroyNotify) NULL);
spell_setup (prefs);
/* Forwards and Replies */
widget = e_builder_get_widget (prefs->builder, "comboboxForwardStyle");
- e_mutual_binding_new (
+ g_object_bind_property (
shell_settings, "mail-forward-style",
- widget, "active");
+ widget, "active",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE);
widget = e_builder_get_widget (prefs->builder, "comboboxReplyStyle");
- e_mutual_binding_new_full (
+ g_object_bind_property_full (
shell_settings, "mail-reply-style",
widget, "active",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE,
transform_old_to_new_reply_style,
transform_new_to_old_reply_style,
- NULL, NULL);
+ NULL, (GDestroyNotify) NULL);
/* Signatures */
signature_list = e_get_signature_list ();
@@ -550,14 +553,17 @@ em_composer_prefs_construct (EMComposerPrefs *prefs,
/* Express mode does not honor this setting. */
if (!e_shell_get_express_mode (shell))
- e_binding_new (
+ g_object_bind_property (
shell_settings, "composer-format-html",
- widget, "prefer-html");
+ widget, "prefer-html",
+ G_BINDING_SYNC_CREATE);
#ifndef G_OS_WIN32
- e_binding_new_with_negation (
+ g_object_bind_property (
shell_settings, "disable-command-line",
- widget, "allow-scripts");
+ widget, "allow-scripts",
+ G_BINDING_SYNC_CREATE |
+ G_BINDING_INVERT_BOOLEAN);
#endif
signature_tree_view = e_signature_manager_get_tree_view (
@@ -570,14 +576,17 @@ em_composer_prefs_construct (EMComposerPrefs *prefs,
gtk_widget_show (widget);
#ifndef G_OS_WIN32
- e_binding_new_with_negation (
+ g_object_bind_property (
shell_settings, "disable-command-line",
- widget, "allow-scripts");
+ widget, "allow-scripts",
+ G_BINDING_SYNC_CREATE |
+ G_BINDING_INVERT_BOOLEAN);
#endif
- e_binding_new (
+ g_object_bind_property (
signature_tree_view, "selected",
- widget, "signature");
+ widget, "signature",
+ G_BINDING_SYNC_CREATE);
/* Sanitize the dialog for Express mode */
e_shell_hide_widgets_for_express_mode (shell, prefs->builder,
diff --git a/modules/mail/em-mailer-prefs.c b/modules/mail/em-mailer-prefs.c
index 60a8795a63..a1aed25c03 100644
--- a/modules/mail/em-mailer-prefs.c
+++ b/modules/mail/em-mailer-prefs.c
@@ -38,7 +38,6 @@
#include "libedataserverui/e-cell-renderer-color.h"
#include "e-util/e-util.h"
-#include "e-util/e-binding.h"
#include "e-util/e-datetime-format.h"
#include "e-util/e-util-private.h"
#include "widgets/misc/e-charset-combo-box.h"
@@ -821,77 +820,106 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs,
/* Message Display */
widget = e_builder_get_widget (prefs->builder, "view-check");
- e_mutual_binding_new (
+ g_object_bind_property (
shell_settings, "mail-global-view-setting",
- widget, "active");
+ widget, "active",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE);
widget = e_charset_combo_box_new ();
container = e_builder_get_widget (prefs->builder, "hboxDefaultCharset");
gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 0);
gtk_widget_show (widget);
- e_mutual_binding_new (
+ g_object_bind_property (
shell_settings, "mail-charset",
- widget, "charset");
+ widget, "charset",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE);
widget = e_builder_get_widget (prefs->builder, "chkHighlightCitations");
- e_mutual_binding_new (
+ g_object_bind_property (
shell_settings, "mail-mark-citations",
- widget, "active");
+ widget, "active",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE);
widget = e_builder_get_widget (prefs->builder, "colorButtonHighlightCitations");
- e_mutual_binding_new (
+ g_object_bind_property (
shell_settings, "mail-mark-citations",
- widget, "sensitive");
- e_mutual_binding_new_full (
+ widget, "sensitive",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE);
+ g_object_bind_property_full (
shell_settings, "mail-citation-color",
widget, "color",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE,
e_binding_transform_string_to_color,
e_binding_transform_color_to_string,
- NULL, NULL);
+ NULL, (GDestroyNotify) NULL);
widget = e_builder_get_widget (prefs->builder, "thread-by-subject");
- e_mutual_binding_new (
+ g_object_bind_property (
shell_settings, "mail-thread-by-subject",
- widget, "active");
+ widget, "active",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE);
/* Deleting Mail */
widget = e_builder_get_widget (prefs->builder, "chkEmptyTrashOnExit");
- e_mutual_binding_new (
+ g_object_bind_property (
shell_settings, "mail-empty-trash-on-exit",
- widget, "active");
+ widget, "active",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE);
widget = e_builder_get_widget (prefs->builder, "comboboxEmptyTrashDays");
- e_mutual_binding_new (
+ g_object_bind_property (
shell_settings, "mail-empty-trash-on-exit",
- widget, "sensitive");
+ widget, "sensitive",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE);
emmp_empty_trash_init (prefs, GTK_COMBO_BOX (widget));
widget = e_builder_get_widget (prefs->builder, "chkConfirmExpunge");
- e_mutual_binding_new (
+ g_object_bind_property (
shell_settings, "mail-confirm-expunge",
- widget, "active");
+ widget, "active",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE);
/* Mail Fonts */
widget = e_builder_get_widget (prefs->builder, "radFontUseSame");
- e_mutual_binding_new_with_negation (
+ g_object_bind_property (
shell_settings, "mail-use-custom-fonts",
- widget, "active");
+ widget, "active",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE |
+ G_BINDING_INVERT_BOOLEAN);
widget = e_builder_get_widget (prefs->builder, "FontFixed");
- e_mutual_binding_new (
+ g_object_bind_property (
shell_settings, "mail-font-monospace",
- widget, "font-name");
- e_mutual_binding_new (
+ widget, "font-name",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE);
+ g_object_bind_property (
shell_settings, "mail-use-custom-fonts",
- widget, "sensitive");
+ widget, "sensitive",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE);
widget = e_builder_get_widget (prefs->builder, "FontVariable");
- e_mutual_binding_new (
+ g_object_bind_property (
shell_settings, "mail-font-variable",
- widget, "font-name");
- e_mutual_binding_new (
+ widget, "font-name",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE);
+ g_object_bind_property (
shell_settings, "mail-use-custom-fonts",
- widget, "sensitive");
+ widget, "sensitive",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE);
/* HTML Mail tab */
@@ -919,39 +947,51 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs,
g_signal_connect (prefs->images_always, "toggled", G_CALLBACK (http_images_changed), prefs);
widget = e_builder_get_widget (prefs->builder, "chkShowAnimatedImages");
- e_mutual_binding_new (
+ g_object_bind_property (
shell_settings, "mail-show-animated-images",
- widget, "active");
+ widget, "active",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE);
widget = e_builder_get_widget (prefs->builder, "chkPromptWantHTML");
- e_mutual_binding_new (
+ g_object_bind_property (
shell_settings, "mail-confirm-unwanted-html",
- widget, "active");
+ widget, "active",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE);
container = e_builder_get_widget (prefs->builder, "labels-alignment");
widget = e_mail_label_manager_new ();
gtk_container_add (GTK_CONTAINER (container), widget);
gtk_widget_show (widget);
- e_binding_new (
+ g_object_bind_property (
shell_settings, "mail-label-list-store",
- widget, "list-store");
+ widget, "list-store",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE);
/* headers */
locked = !gconf_client_key_is_writable (prefs->gconf, "/apps/evolution/mail/display/headers", NULL);
widget = e_builder_get_widget (prefs->builder, "photo_show");
- e_mutual_binding_new (
+ g_object_bind_property (
shell_settings, "mail-show-sender-photo",
- widget, "active");
+ widget, "active",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE);
widget = e_builder_get_widget (prefs->builder, "photo_local");
- e_mutual_binding_new (
+ g_object_bind_property (
shell_settings, "mail-show-sender-photo",
- widget, "sensitive");
- e_mutual_binding_new (
+ widget, "sensitive",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE);
+ g_object_bind_property (
shell_settings, "mail-only-local-photos",
- widget, "active");
+ widget, "active",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE);
/* always de-sensitised until the user types something in the entry */
prefs->add_header = GTK_BUTTON (e_builder_get_widget (prefs->builder, "cmdHeadersAdd"));
@@ -1066,25 +1106,33 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs,
widget = gtk_check_button_new_with_mnemonic (_("Show _original header value"));
gtk_widget_show (widget);
gtk_table_attach ((GtkTable *) table, widget, 0, 3, 2, 3, GTK_EXPAND | GTK_FILL, 0, 12, 0);
- e_mutual_binding_new (
+ g_object_bind_property (
shell_settings, "mail-show-real-date",
- widget, "active");
+ widget, "active",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE);
/* Junk prefs */
widget = e_builder_get_widget (prefs->builder, "chkCheckIncomingMail");
- e_mutual_binding_new (
+ g_object_bind_property (
shell_settings, "mail-check-for-junk",
- widget, "active");
+ widget, "active",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE);
widget = e_builder_get_widget (prefs->builder, "junk_empty_check");
- e_mutual_binding_new (
+ g_object_bind_property (
shell_settings, "mail-empty-junk-on-exit",
- widget, "active");
+ widget, "active",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE);
widget = e_builder_get_widget (prefs->builder, "junk_empty_combobox");
- e_mutual_binding_new (
+ g_object_bind_property (
shell_settings, "mail-empty-junk-on-exit",
- widget, "sensitive");
+ widget, "sensitive",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE);
emmp_empty_junk_init (prefs, GTK_COMBO_BOX (widget));
prefs->default_junk_plugin = GTK_COMBO_BOX (e_builder_get_widget (prefs->builder, "default_junk_plugin"));