]> git.0d.be Git - empathy.git/commitdiff
Renamed empathy_contact_list_view_get_selected to empathy_contact_list_view_dup_selec...
authorJonny Lamb <jonny.lamb@collabora.co.uk>
Wed, 22 Apr 2009 11:07:29 +0000 (12:07 +0100)
committerJonny Lamb <jonny.lamb@collabora.co.uk>
Wed, 22 Apr 2009 11:07:29 +0000 (12:07 +0100)
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
libempathy-gtk/empathy-contact-list-view.c
libempathy-gtk/empathy-contact-list-view.h
megaphone/src/megaphone-applet.c

index df7149b506ece74da8dfb2999a296475c29462b8..ca224f52631be53cffa9043d08c45d62d78a4265 100644 (file)
@@ -474,7 +474,7 @@ contact_list_view_drag_data_get (GtkWidget        *widget,
 
        gtk_tree_path_free (src_path);
 
-       contact = empathy_contact_list_view_get_selected (EMPATHY_CONTACT_LIST_VIEW (widget));
+       contact = empathy_contact_list_view_dup_selected (EMPATHY_CONTACT_LIST_VIEW (widget));
        if (!contact) {
                return;
        }
@@ -1218,7 +1218,7 @@ empathy_contact_list_view_new (EmpathyContactListStore        *store,
 }
 
 EmpathyContact *
-empathy_contact_list_view_get_selected (EmpathyContactListView *view)
+empathy_contact_list_view_dup_selected (EmpathyContactListView *view)
 {
        EmpathyContactListViewPriv *priv;
        GtkTreeSelection          *selection;
@@ -1384,7 +1384,7 @@ contact_list_view_remove_activate_cb (GtkMenuItem            *menuitem,
        EmpathyContactListViewPriv *priv = GET_PRIV (view);
        EmpathyContact             *contact;
                
-       contact = empathy_contact_list_view_get_selected (view);
+       contact = empathy_contact_list_view_dup_selected (view);
 
        if (contact) {
                gchar     *text; 
@@ -1417,7 +1417,7 @@ empathy_contact_list_view_get_contact_menu (EmpathyContactListView *view)
 
        g_return_val_if_fail (EMPATHY_IS_CONTACT_LIST_VIEW (view), NULL);
 
-       contact = empathy_contact_list_view_get_selected (view);
+       contact = empathy_contact_list_view_dup_selected (view);
        if (!contact) {
                return NULL;
        }
index 82990d64f5e9b19c050b3acef7154c6d17c4acd6..bb6766c4a9848e48790010ffd3f5e59a925006e3 100644 (file)
@@ -70,7 +70,7 @@ GType                      empathy_contact_list_view_get_type           (void) G
 EmpathyContactListView *   empathy_contact_list_view_new                (EmpathyContactListStore        *store,
                                                                         EmpathyContactListFeatureFlags  list_features,
                                                                         EmpathyContactFeatureFlags      contact_features);
-EmpathyContact *           empathy_contact_list_view_get_selected       (EmpathyContactListView         *view);
+EmpathyContact *           empathy_contact_list_view_dup_selected       (EmpathyContactListView         *view);
 gchar *                    empathy_contact_list_view_get_selected_group (EmpathyContactListView         *view);
 GtkWidget *                empathy_contact_list_view_get_contact_menu   (EmpathyContactListView         *view);
 GtkWidget *                empathy_contact_list_view_get_group_menu     (EmpathyContactListView         *view);
index b58255fc2c3dc786886c4a578c2ab9ccd9b08cc7..0879e75a5dbad218c1822887d7a5a63382988284 100644 (file)
@@ -221,7 +221,7 @@ megaphone_applet_preferences_response_cb (GtkWidget       *dialog,
                /* Retrieve the selected contact, if any and set it up in gconf.
                 * GConf will notify us from the change and we will adjust ourselves */
                contact_list = g_object_get_data (G_OBJECT (dialog), "contact-list");
-               contact = empathy_contact_list_view_get_selected (contact_list);
+               contact = empathy_contact_list_view_dup_selected (contact_list);
                if (contact) {
                        McAccount   *account;
                        const gchar *account_id;
@@ -240,6 +240,7 @@ megaphone_applet_preferences_response_cb (GtkWidget       *dialog,
                                                       "contact_id", str,
                                                       NULL);
                        g_free (str);
+                       g_object_unref (contact);
                }
        }
        gtk_widget_destroy (dialog);