aboutsummaryrefslogtreecommitdiffstats
path: root/composer
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 /composer
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 'composer')
-rw-r--r--composer/e-composer-header-table.c24
-rw-r--r--composer/e-composer-private.c8
2 files changed, 14 insertions, 18 deletions
diff --git a/composer/e-composer-header-table.c b/composer/e-composer-header-table.c
index 30e3d5778f..e7972e2ef9 100644
--- a/composer/e-composer-header-table.c
+++ b/composer/e-composer-header-table.c
@@ -543,12 +543,12 @@ composer_header_table_constructor (GType type,
"right-attach", 2, NULL);
e_binding_new (
- G_OBJECT (priv->headers[ii]->input_widget), "visible",
- G_OBJECT (priv->signature_label), "visible");
+ priv->headers[ii]->input_widget, "visible",
+ priv->signature_label, "visible");
e_binding_new (
- G_OBJECT (priv->headers[ii]->input_widget), "visible",
- G_OBJECT (priv->signature_combo_box), "visible");
+ priv->headers[ii]->input_widget, "visible",
+ priv->signature_combo_box, "visible");
/* Now add the signature stuff. */
if (!composer_lite) {
@@ -998,17 +998,13 @@ composer_header_table_init (EComposerHeaderTable *table)
/* XXX EComposerHeader ought to do this itself, but I need to
* make the title_widget and input_widget members private. */
for (ii = 0; ii < E_COMPOSER_NUM_HEADERS; ii++) {
- GObject *src_object;
- GObject *dst_object;
-
header = table->priv->headers[ii];
- src_object = G_OBJECT (header);
-
- dst_object = G_OBJECT (header->title_widget);
- e_binding_new (src_object, "visible", dst_object, "visible");
-
- dst_object = G_OBJECT (header->input_widget);
- e_binding_new (src_object, "visible", dst_object, "visible");
+ e_binding_new (
+ header, "visible",
+ header->title_widget, "visible");
+ e_binding_new (
+ header, "visible",
+ header->input_widget, "visible");
}
}
diff --git a/composer/e-composer-private.c b/composer/e-composer-private.c
index bfb14b451a..dfff72a5a8 100644
--- a/composer/e-composer-private.c
+++ b/composer/e-composer-private.c
@@ -267,12 +267,12 @@ e_composer_private_init (EMsgComposer *composer)
}
e_mutual_binding_new (
- G_OBJECT (header), "sensitive",
- G_OBJECT (action), "sensitive");
+ header, "sensitive",
+ action, "sensitive");
e_mutual_binding_new (
- G_OBJECT (header), "visible",
- G_OBJECT (action), "active");
+ header, "visible",
+ action, "active");
}
}