diff options
author | Xavier Claessens <xclaesse@gmail.com> | 2009-04-16 20:29:33 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@src.gnome.org> | 2009-04-16 20:29:33 +0800 |
commit | 293340151049a04517bb3741172a1f6750ddeabb (patch) | |
tree | 01d57d7d9d310f7254ef7166ef5311d74de64650 /libempathy-gtk/empathy-account-widget.c | |
parent | 5d0a01756d410f44588870dabbed42145f2b765e (diff) | |
download | gsoc2013-empathy-293340151049a04517bb3741172a1f6750ddeabb.tar gsoc2013-empathy-293340151049a04517bb3741172a1f6750ddeabb.tar.gz gsoc2013-empathy-293340151049a04517bb3741172a1f6750ddeabb.tar.bz2 gsoc2013-empathy-293340151049a04517bb3741172a1f6750ddeabb.tar.lz gsoc2013-empathy-293340151049a04517bb3741172a1f6750ddeabb.tar.xz gsoc2013-empathy-293340151049a04517bb3741172a1f6750ddeabb.tar.zst gsoc2013-empathy-293340151049a04517bb3741172a1f6750ddeabb.zip |
Refactor the floating ref hack into a new function
From: Xavier Claessens <xclaesse@gmail.com>
svn path=/trunk/; revision=2871
Diffstat (limited to 'libempathy-gtk/empathy-account-widget.c')
-rw-r--r-- | libempathy-gtk/empathy-account-widget.c | 48 |
1 files changed, 8 insertions, 40 deletions
diff --git a/libempathy-gtk/empathy-account-widget.c b/libempathy-gtk/empathy-account-widget.c index e57fb2802..33cef69ae 100644 --- a/libempathy-gtk/empathy-account-widget.c +++ b/libempathy-gtk/empathy-account-widget.c @@ -481,11 +481,7 @@ empathy_account_widget_generic_new (McAccount *account) accounts_widget_generic_setup (account, table_common_settings, table_advanced_settings); - g_object_ref (widget); - g_object_force_floating (G_OBJECT (widget)); - g_object_unref (gui); - - return widget; + return empathy_builder_unref_and_keep_widget (gui, widget); } GtkWidget * @@ -513,11 +509,7 @@ empathy_account_widget_salut_new (McAccount *account) g_object_unref (gui); - g_object_ref (widget); - g_object_force_floating (G_OBJECT (widget)); - g_object_unref (gui); - - return widget; + return empathy_builder_unref_and_keep_widget (gui, widget); } GtkWidget * @@ -545,11 +537,7 @@ empathy_account_widget_msn_new (McAccount *account) "button_forget", "entry_password"); - g_object_ref (widget); - g_object_force_floating (G_OBJECT (widget)); - g_object_unref (gui); - - return widget; + return empathy_builder_unref_and_keep_widget (gui, widget); } GtkWidget * @@ -590,11 +578,7 @@ empathy_account_widget_jabber_new (McAccount *account) G_CALLBACK (account_widget_jabber_ssl_toggled_cb), spinbutton_port); - g_object_ref (widget); - g_object_force_floating (G_OBJECT (widget)); - g_object_unref (gui); - - return widget; + return empathy_builder_unref_and_keep_widget (gui, widget); } GtkWidget * @@ -625,11 +609,7 @@ empathy_account_widget_icq_new (McAccount *account) "button_forget", "entry_password"); - g_object_ref (widget); - g_object_force_floating (G_OBJECT (widget)); - g_object_unref (gui); - - return widget; + return empathy_builder_unref_and_keep_widget (gui, widget); } GtkWidget * @@ -659,11 +639,7 @@ empathy_account_widget_aim_new (McAccount *account) "button_forget", "entry_password"); - g_object_ref (widget); - g_object_force_floating (G_OBJECT (widget)); - g_object_unref (gui); - - return widget; + return empathy_builder_unref_and_keep_widget (gui, widget); } GtkWidget * @@ -695,11 +671,7 @@ empathy_account_widget_yahoo_new (McAccount *account) "button_forget", "entry_password"); - g_object_ref (widget); - g_object_force_floating (G_OBJECT (widget)); - g_object_unref (gui); - - return widget; + return empathy_builder_unref_and_keep_widget (gui, widget); } GtkWidget * @@ -727,10 +699,6 @@ empathy_account_widget_groupwise_new (McAccount *account) "button_forget", "entry_password"); - g_object_ref (widget); - g_object_force_floating (G_OBJECT (widget)); - g_object_unref (gui); - - return widget; + return empathy_builder_unref_and_keep_widget (gui, widget); } |