[empathy] Renamed empathy_account_chooser_get_account to empathy_account_chooser_dup_account and fixed leaks.
- From: Jonny Lamb <jonnylamb src gnome org>
- To: svn-commits-list gnome org
- Subject: [empathy] Renamed empathy_account_chooser_get_account to empathy_account_chooser_dup_account and fixed leaks.
- Date: Wed, 22 Apr 2009 07:45:27 -0400 (EDT)
commit 03899c3c61a0e9a975caaaf2e6f30ccfeaeaeff5
Author: Jonny Lamb <jonny lamb collabora co uk>
Date: Wed Apr 22 12:01:37 2009 +0100
Renamed empathy_account_chooser_get_account to empathy_account_chooser_dup_account and fixed leaks.
Signed-off-by: Jonny Lamb <jonny lamb collabora co uk>
---
libempathy-gtk/empathy-account-chooser.c | 4 ++--
libempathy-gtk/empathy-account-chooser.h | 2 +-
libempathy-gtk/empathy-log-window.c | 2 +-
src/empathy-chatrooms-window.c | 4 ++--
src/empathy-new-chatroom-dialog.c | 6 ++++--
5 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/libempathy-gtk/empathy-account-chooser.c b/libempathy-gtk/empathy-account-chooser.c
index ea3d6e5..859ba33 100644
--- a/libempathy-gtk/empathy-account-chooser.c
+++ b/libempathy-gtk/empathy-account-chooser.c
@@ -220,7 +220,7 @@ empathy_account_chooser_new (void)
}
McAccount *
-empathy_account_chooser_get_account (EmpathyAccountChooser *chooser)
+empathy_account_chooser_dup_account (EmpathyAccountChooser *chooser)
{
EmpathyAccountChooserPriv *priv;
McAccount *account;
@@ -252,7 +252,7 @@ empathy_account_chooser_get_connection (EmpathyAccountChooser *chooser)
priv = GET_PRIV (chooser);
- account = empathy_account_chooser_get_account (chooser);
+ account = empathy_account_chooser_dup_account (chooser);
connection = empathy_account_manager_get_connection (priv->manager, account);
g_object_unref (account);
diff --git a/libempathy-gtk/empathy-account-chooser.h b/libempathy-gtk/empathy-account-chooser.h
index 4dfdc63..580c216 100644
--- a/libempathy-gtk/empathy-account-chooser.h
+++ b/libempathy-gtk/empathy-account-chooser.h
@@ -56,7 +56,7 @@ struct _EmpathyAccountChooserClass {
GType empathy_account_chooser_get_type (void) G_GNUC_CONST;
GtkWidget * empathy_account_chooser_new (void);
-McAccount * empathy_account_chooser_get_account (EmpathyAccountChooser *chooser);
+McAccount * empathy_account_chooser_dup_account (EmpathyAccountChooser *chooser);
TpConnection * empathy_account_chooser_get_connection (EmpathyAccountChooser *chooser);
gboolean empathy_account_chooser_set_account (EmpathyAccountChooser *chooser,
McAccount *account);
diff --git a/libempathy-gtk/empathy-log-window.c b/libempathy-gtk/empathy-log-window.c
index 2cec177..13d9bcb 100644
--- a/libempathy-gtk/empathy-log-window.c
+++ b/libempathy-gtk/empathy-log-window.c
@@ -618,7 +618,7 @@ log_window_chats_populate (EmpathyLogWindow *window)
GtkTreeIter iter;
account_chooser = EMPATHY_ACCOUNT_CHOOSER (window->account_chooser_chats);
- account = empathy_account_chooser_get_account (account_chooser);
+ account = empathy_account_chooser_dup_account (account_chooser);
view = GTK_TREE_VIEW (window->treeview_chats);
model = gtk_tree_view_get_model (view);
diff --git a/src/empathy-chatrooms-window.c b/src/empathy-chatrooms-window.c
index acd559e..fa63d5a 100644
--- a/src/empathy-chatrooms-window.c
+++ b/src/empathy-chatrooms-window.c
@@ -318,7 +318,7 @@ chatrooms_window_model_refresh_data (EmpathyChatroomsWindow *window,
/* Look up chatrooms */
account_chooser = EMPATHY_ACCOUNT_CHOOSER (window->account_chooser);
- account = empathy_account_chooser_get_account (account_chooser);
+ account = empathy_account_chooser_dup_account (account_chooser);
chatrooms = empathy_chatroom_manager_get_chatrooms (window->manager, account);
@@ -509,7 +509,7 @@ chatrooms_window_chatroom_added_cb (EmpathyChatroomManager *manager,
McAccount *account;
account_chooser = EMPATHY_ACCOUNT_CHOOSER (window->account_chooser);
- account = empathy_account_chooser_get_account (account_chooser);
+ account = empathy_account_chooser_dup_account (account_chooser);
if (!account) {
chatrooms_window_model_add (window, chatroom, FALSE);
diff --git a/src/empathy-new-chatroom-dialog.c b/src/empathy-new-chatroom-dialog.c
index abfdcf0..837d9ac 100644
--- a/src/empathy-new-chatroom-dialog.c
+++ b/src/empathy-new-chatroom-dialog.c
@@ -342,7 +342,7 @@ new_chatroom_dialog_update_widgets (EmpathyNewChatroomDialog *dialog)
const gchar *room;
account_chooser = EMPATHY_ACCOUNT_CHOOSER (dialog->account_chooser);
- account = empathy_account_chooser_get_account (account_chooser);
+ account = empathy_account_chooser_dup_account (account_chooser);
profile = mc_account_get_profile (account);
protocol = mc_profile_get_protocol_name (profile);
@@ -388,7 +388,7 @@ new_chatroom_dialog_account_changed_cb (GtkComboBox *combobox,
new_chatroom_dialog_model_clear (dialog);
account_chooser = EMPATHY_ACCOUNT_CHOOSER (dialog->account_chooser);
- account = empathy_account_chooser_get_account (account_chooser);
+ account = empathy_account_chooser_dup_account (account_chooser);
dialog->room_list = empathy_tp_roomlist_new (account);
if (dialog->room_list) {
@@ -409,6 +409,8 @@ new_chatroom_dialog_account_changed_cb (GtkComboBox *combobox,
}
new_chatroom_dialog_update_widgets (dialog);
+
+ g_object_unref (account);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]