aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-09-02 09:12:44 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-09-02 09:12:44 +0800
commit8962868ff902e58456c545478e62796029d1fe5c (patch)
treed43efa77beba51f716a259a3538dd55a38711923 /mail
parent6b2a55be48922c9fe5c94d654a4d463f23a428f2 (diff)
downloadgsoc2013-evolution-8962868ff902e58456c545478e62796029d1fe5c.tar.gz
gsoc2013-evolution-8962868ff902e58456c545478e62796029d1fe5c.tar.zst
gsoc2013-evolution-8962868ff902e58456c545478e62796029d1fe5c.zip
Relax the EBinding API to reduce GObject casting.
Also make it more fault-tolerant by warning about non-existent property names instead of just crashing.
Diffstat (limited to 'mail')
-rw-r--r--mail/e-mail-attachment-bar.c24
-rw-r--r--mail/e-mail-reader.c24
-rw-r--r--mail/e-mail-search-bar.c4
3 files changed, 26 insertions, 26 deletions
diff --git a/mail/e-mail-attachment-bar.c b/mail/e-mail-attachment-bar.c
index fd53292610..ae98aad926 100644
--- a/mail/e-mail-attachment-bar.c
+++ b/mail/e-mail-attachment-bar.c
@@ -280,28 +280,28 @@ mail_attachment_bar_constructed (GObject *object)
/* Set up property-to-property bindings. */
e_mutual_binding_new (
- G_OBJECT (object), "active-view",
- G_OBJECT (priv->combo_box), "active");
+ object, "active-view",
+ priv->combo_box, "active");
e_mutual_binding_new (
- G_OBJECT (object), "editable",
- G_OBJECT (priv->icon_view), "editable");
+ object, "editable",
+ priv->icon_view, "editable");
e_mutual_binding_new (
- G_OBJECT (object), "editable",
- G_OBJECT (priv->tree_view), "editable");
+ object, "editable",
+ priv->tree_view, "editable");
e_mutual_binding_new (
- G_OBJECT (object), "expanded",
- G_OBJECT (priv->expander), "expanded");
+ object, "expanded",
+ priv->expander, "expanded");
e_mutual_binding_new (
- G_OBJECT (object), "expanded",
- G_OBJECT (priv->combo_box), "visible");
+ object, "expanded",
+ priv->combo_box, "visible");
e_mutual_binding_new (
- G_OBJECT (object), "expanded",
- G_OBJECT (priv->vbox), "visible");
+ object, "expanded",
+ priv->vbox, "visible");
/* Set up property-to-GConf bindings. */
diff --git a/mail/e-mail-reader.c b/mail/e-mail-reader.c
index 793763162d..96ed8cf379 100644
--- a/mail/e-mail-reader.c
+++ b/mail/e-mail-reader.c
@@ -2061,33 +2061,33 @@ e_mail_reader_init (EMailReader *reader)
/* Bind properties. */
e_binding_new_full (
- G_OBJECT (shell_settings), "mail-citation-color",
- G_OBJECT (html_display), "citation-color",
+ shell_settings, "mail-citation-color",
+ html_display, "citation-color",
e_binding_transform_string_to_color,
NULL, NULL);
e_binding_new (
- G_OBJECT (shell_settings), "mail-image-loading-policy",
- G_OBJECT (html_display), "image-loading-policy");
+ shell_settings, "mail-image-loading-policy",
+ html_display, "image-loading-policy");
e_binding_new (
- G_OBJECT (shell_settings), "mail-only-local-photos",
- G_OBJECT (html_display), "only-local-photos");
+ shell_settings, "mail-only-local-photos",
+ html_display, "only-local-photos");
e_binding_new (
- G_OBJECT (shell_settings), "mail-show-animated-images",
- G_OBJECT (display), "animate");
+ shell_settings, "mail-show-animated-images",
+ display, "animate");
e_binding_new (
- G_OBJECT (shell_settings), "mail-show-sender-photo",
- G_OBJECT (html_display), "show-sender-photo");
+ shell_settings, "mail-show-sender-photo",
+ html_display, "show-sender-photo");
action_name = "mail-caret-mode";
action = e_mail_reader_get_action (reader, action_name);
e_mutual_binding_new (
- G_OBJECT (action), "active",
- G_OBJECT (display), "caret-mode");
+ action, "active",
+ display, "caret-mode");
/* Connect signals. */
diff --git a/mail/e-mail-search-bar.c b/mail/e-mail-search-bar.c
index 6dcddaf83b..d068eb1123 100644
--- a/mail/e-mail-search-bar.c
+++ b/mail/e-mail-search-bar.c
@@ -356,8 +356,8 @@ mail_search_bar_constructed (GObject *object)
priv = E_MAIL_SEARCH_BAR_GET_PRIVATE (object);
e_mutual_binding_new (
- G_OBJECT (object), "case-sensitive",
- G_OBJECT (priv->case_sensitive_button), "active");
+ object, "case-sensitive",
+ priv->case_sensitive_button, "active");
}
static void