diff options
author | Jonny Lamb <jonny.lamb@collabora.co.uk> | 2009-04-22 19:09:38 +0800 |
---|---|---|
committer | Jonny Lamb <jonny.lamb@collabora.co.uk> | 2009-04-22 19:09:38 +0800 |
commit | 5303246bdec46980c2a447e77759f4c107967bca (patch) | |
tree | 0fce603338171ad33507d45fa52be0f1dbdd8955 | |
parent | 10a93b8c864c38dacc49a9f33b7ebf0cff549cfb (diff) | |
download | gsoc2013-empathy-5303246bdec46980c2a447e77759f4c107967bca.tar gsoc2013-empathy-5303246bdec46980c2a447e77759f4c107967bca.tar.gz gsoc2013-empathy-5303246bdec46980c2a447e77759f4c107967bca.tar.bz2 gsoc2013-empathy-5303246bdec46980c2a447e77759f4c107967bca.tar.lz gsoc2013-empathy-5303246bdec46980c2a447e77759f4c107967bca.tar.xz gsoc2013-empathy-5303246bdec46980c2a447e77759f4c107967bca.tar.zst gsoc2013-empathy-5303246bdec46980c2a447e77759f4c107967bca.zip |
Renamed empathy_profile_chooser_get_selected to empathy_profile_chooser_dup_selected and fixed leaks.
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
-rw-r--r-- | libempathy-gtk/empathy-profile-chooser.c | 2 | ||||
-rw-r--r-- | libempathy-gtk/empathy-profile-chooser.h | 2 | ||||
-rw-r--r-- | src/empathy-accounts-dialog.c | 5 |
3 files changed, 5 insertions, 4 deletions
diff --git a/libempathy-gtk/empathy-profile-chooser.c b/libempathy-gtk/empathy-profile-chooser.c index fd68dd8b0..897e38344 100644 --- a/libempathy-gtk/empathy-profile-chooser.c +++ b/libempathy-gtk/empathy-profile-chooser.c @@ -38,7 +38,7 @@ enum { }; McProfile* -empathy_profile_chooser_get_selected (GtkWidget *widget) +empathy_profile_chooser_dup_selected (GtkWidget *widget) { GtkTreeModel *model; GtkTreeIter iter; diff --git a/libempathy-gtk/empathy-profile-chooser.h b/libempathy-gtk/empathy-profile-chooser.h index 8cdc33d67..74c761cc4 100644 --- a/libempathy-gtk/empathy-profile-chooser.h +++ b/libempathy-gtk/empathy-profile-chooser.h @@ -27,7 +27,7 @@ G_BEGIN_DECLS GtkWidget * empathy_profile_chooser_new (void); -McProfile * empathy_profile_chooser_get_selected (GtkWidget *widget); +McProfile * empathy_profile_chooser_dup_selected (GtkWidget *widget); gint empathy_profile_chooser_n_profiles (GtkWidget *widget); G_END_DECLS diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c index 036c7f86b..e15c0eab1 100644 --- a/src/empathy-accounts-dialog.c +++ b/src/empathy-accounts-dialog.c @@ -819,13 +819,14 @@ accounts_dialog_button_create_clicked_cb (GtkWidget *button, gchar *str; McProfileCapabilityFlags cap; - profile = empathy_profile_chooser_get_selected (dialog->combobox_profile); + profile = empathy_profile_chooser_dup_selected (dialog->combobox_profile); /* Create account */ account = mc_account_create (profile); if (account == NULL) { /* We can't display an error to the user as MC doesn't give us * any clue about the reason of the failure... */ + g_object_unref (profile); return; } @@ -869,7 +870,7 @@ accounts_dialog_profile_changed_cb (GtkWidget *widget, McProfile *profile; McProfileCapabilityFlags cap; - profile = empathy_profile_chooser_get_selected (dialog->combobox_profile); + profile = empathy_profile_chooser_dup_selected (dialog->combobox_profile); cap = mc_profile_get_capabilities (profile); if (cap & MC_PROFILE_CAPABILITY_REGISTRATION_UI) { |