Renamed empathy_profile_chooser_get_selected to empathy_profile_chooser_dup_selected...
authorJonny Lamb <jonny.lamb@collabora.co.uk>
Wed, 22 Apr 2009 11:09:38 +0000 (12:09 +0100)
committerJonny Lamb <jonny.lamb@collabora.co.uk>
Wed, 22 Apr 2009 11:09:38 +0000 (12:09 +0100)
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
libempathy-gtk/empathy-profile-chooser.c
libempathy-gtk/empathy-profile-chooser.h
src/empathy-accounts-dialog.c

index fd68dd8b01bd50663d819cf7ef1e272de3d46ff3..897e38344fbdd358f1ee3705cfbac6c4a19b1e90 100644 (file)
@@ -38,7 +38,7 @@ enum {
 };
 
 McProfile*
-empathy_profile_chooser_get_selected (GtkWidget *widget)
+empathy_profile_chooser_dup_selected (GtkWidget *widget)
 {
        GtkTreeModel *model;
        GtkTreeIter   iter;
index 8cdc33d678e0e301f166f455b3be0e1960e4ee0a..74c761cc4e6026245e956f6e908b9b6ad923e405 100644 (file)
@@ -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
index 036c7f86b16e495d5a7fabdf5dd89619d2e4dcbc..e15c0eab1f070809d9d7372f84514fe0a7803d3f 100644 (file)
@@ -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) {