aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
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 /widgets
parent6b2a55be48922c9fe5c94d654a4d463f23a428f2 (diff)
downloadgsoc2013-evolution-8962868ff902e58456c545478e62796029d1fe5c.tar
gsoc2013-evolution-8962868ff902e58456c545478e62796029d1fe5c.tar.gz
gsoc2013-evolution-8962868ff902e58456c545478e62796029d1fe5c.tar.bz2
gsoc2013-evolution-8962868ff902e58456c545478e62796029d1fe5c.tar.lz
gsoc2013-evolution-8962868ff902e58456c545478e62796029d1fe5c.tar.xz
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 'widgets')
-rw-r--r--widgets/misc/e-account-manager.c4
-rw-r--r--widgets/misc/e-attachment-button.c16
-rw-r--r--widgets/misc/e-attachment-paned.c28
-rw-r--r--widgets/misc/e-attachment-view.c4
-rw-r--r--widgets/misc/e-signature-manager.c8
5 files changed, 30 insertions, 30 deletions
diff --git a/widgets/misc/e-account-manager.c b/widgets/misc/e-account-manager.c
index 8d3d2d211b..2e71400f53 100644
--- a/widgets/misc/e-account-manager.c
+++ b/widgets/misc/e-account-manager.c
@@ -285,8 +285,8 @@ account_manager_init (EAccountManager *manager)
gtk_widget_show (widget);
e_mutual_binding_new (
- G_OBJECT (manager), "account-list",
- G_OBJECT (widget), "account-list");
+ manager, "account-list",
+ widget, "account-list");
g_signal_connect_swapped (
widget, "key-press-event",
diff --git a/widgets/misc/e-attachment-button.c b/widgets/misc/e-attachment-button.c
index 1cd517d3e2..a6af71e216 100644
--- a/widgets/misc/e-attachment-button.c
+++ b/widgets/misc/e-attachment-button.c
@@ -497,8 +497,8 @@ attachment_button_init (EAttachmentButton *button)
gtk_widget_show (widget);
e_mutual_binding_new (
- G_OBJECT (button), "expandable",
- G_OBJECT (widget), "sensitive");
+ button, "expandable",
+ widget, "sensitive");
widget = gtk_toggle_button_new ();
gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 0);
@@ -527,8 +527,8 @@ attachment_button_init (EAttachmentButton *button)
gtk_cell_layout_pack_start (cell_layout, renderer, FALSE);
e_mutual_binding_new (
- G_OBJECT (button), "expanded",
- G_OBJECT (renderer), "is-expanded");
+ button, "expanded",
+ renderer, "is-expanded");
renderer = gtk_cell_renderer_pixbuf_new ();
g_object_set (renderer, "stock-size", GTK_ICON_SIZE_BUTTON, NULL);
@@ -661,13 +661,13 @@ e_attachment_button_set_attachment (EAttachmentButton *button,
gulong handler_id;
binding = e_mutual_binding_new (
- G_OBJECT (attachment), "can-show",
- G_OBJECT (button), "expandable");
+ attachment, "can-show",
+ button, "expandable");
button->priv->can_show_binding = binding;
binding = e_mutual_binding_new (
- G_OBJECT (attachment), "shown",
- G_OBJECT (button), "expanded");
+ attachment, "shown",
+ button, "expanded");
button->priv->shown_binding = binding;
handler_id = g_signal_connect_swapped (
diff --git a/widgets/misc/e-attachment-paned.c b/widgets/misc/e-attachment-paned.c
index 8e25098767..0e6395b0f8 100644
--- a/widgets/misc/e-attachment-paned.c
+++ b/widgets/misc/e-attachment-paned.c
@@ -295,32 +295,32 @@ attachment_paned_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), "active-view",
- G_OBJECT (priv->notebook), "page");
+ object, "active-view",
+ priv->notebook, "page");
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), "sensitive");
+ object, "expanded",
+ priv->combo_box, "sensitive");
e_mutual_binding_new (
- G_OBJECT (object), "expanded",
- G_OBJECT (priv->notebook), "visible");
+ object, "expanded",
+ priv->notebook, "visible");
/* Set up property-to-GConf bindings. */
diff --git a/widgets/misc/e-attachment-view.c b/widgets/misc/e-attachment-view.c
index 345510230b..17a2b6c9b4 100644
--- a/widgets/misc/e-attachment-view.c
+++ b/widgets/misc/e-attachment-view.c
@@ -801,8 +801,8 @@ e_attachment_view_init (EAttachmentView *view)
action_group = e_attachment_view_add_action_group (view, "editable");
e_mutual_binding_new (
- G_OBJECT (view), "editable",
- G_OBJECT (action_group), "visible");
+ view, "editable",
+ action_group, "visible");
gtk_action_group_add_actions (
action_group, editable_entries,
G_N_ELEMENTS (editable_entries), view);
diff --git a/widgets/misc/e-signature-manager.c b/widgets/misc/e-signature-manager.c
index 7e29f75cef..dff74a0b23 100644
--- a/widgets/misc/e-signature-manager.c
+++ b/widgets/misc/e-signature-manager.c
@@ -530,8 +530,8 @@ signature_manager_init (ESignatureManager *manager)
gtk_widget_show (widget);
e_mutual_binding_new (
- G_OBJECT (manager), "signature-list",
- G_OBJECT (widget), "signature-list");
+ manager, "signature-list",
+ widget, "signature-list");
g_signal_connect_swapped (
widget, "key-press-event",
@@ -582,8 +582,8 @@ signature_manager_init (ESignatureManager *manager)
gtk_widget_show (widget);
e_binding_new (
- G_OBJECT (manager), "allow-scripts",
- G_OBJECT (widget), "sensitive");
+ manager, "allow-scripts",
+ widget, "sensitive");
g_signal_connect_swapped (
widget, "clicked",