aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-09-11 18:35:26 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-09-11 21:10:43 +0800
commit6a5b51b273fc447c7611675b97268fc99216d430 (patch)
tree1c3b87bd9aea1d122dbb829c6c3bcec831fed9c6 /libempathy-gtk
parent57b261b8329e12d1ffcc46e7ecfbeca2caa8fb4b (diff)
downloadgsoc2013-empathy-6a5b51b273fc447c7611675b97268fc99216d430.tar
gsoc2013-empathy-6a5b51b273fc447c7611675b97268fc99216d430.tar.gz
gsoc2013-empathy-6a5b51b273fc447c7611675b97268fc99216d430.tar.bz2
gsoc2013-empathy-6a5b51b273fc447c7611675b97268fc99216d430.tar.lz
gsoc2013-empathy-6a5b51b273fc447c7611675b97268fc99216d430.tar.xz
gsoc2013-empathy-6a5b51b273fc447c7611675b97268fc99216d430.tar.zst
gsoc2013-empathy-6a5b51b273fc447c7611675b97268fc99216d430.zip
use tp_account_manager_dup_valid_accounts()
tp_account_manager_get_valid_accounts() has been deprecated. Fix an accounts list leak in empathy-sanity-cleaning.
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-account-chooser.c4
-rw-r--r--libempathy-gtk/empathy-chat.c4
-rw-r--r--libempathy-gtk/empathy-contact-blocking-dialog.c4
-rw-r--r--libempathy-gtk/empathy-contact-chooser.c4
-rw-r--r--libempathy-gtk/empathy-individual-menu.c4
-rw-r--r--libempathy-gtk/empathy-local-xmpp-assistant-widget.c4
-rw-r--r--libempathy-gtk/empathy-location-manager.c8
-rw-r--r--libempathy-gtk/empathy-log-window.c4
-rw-r--r--libempathy-gtk/empathy-presence-chooser.c4
9 files changed, 20 insertions, 20 deletions
diff --git a/libempathy-gtk/empathy-account-chooser.c b/libempathy-gtk/empathy-account-chooser.c
index ae3f1dd15..6e7ec2940 100644
--- a/libempathy-gtk/empathy-account-chooser.c
+++ b/libempathy-gtk/empathy-account-chooser.c
@@ -280,7 +280,7 @@ account_manager_prepared_cb (GObject *source_object,
return;
}
- accounts = tp_account_manager_get_valid_accounts (manager);
+ accounts = tp_account_manager_dup_valid_accounts (manager);
for (l = accounts; l != NULL; l = l->next)
{
@@ -301,7 +301,7 @@ account_manager_prepared_cb (GObject *source_object,
self, 0);
}
- g_list_free (accounts);
+ g_list_free_full (accounts, g_object_unref);
if (self->priv->select_when_ready != NULL)
{
diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c
index 6eb1443d7..308587b52 100644
--- a/libempathy-gtk/empathy-chat.c
+++ b/libempathy-gtk/empathy-chat.c
@@ -3518,7 +3518,7 @@ account_manager_prepared_cb (GObject *source_object,
return;
}
- accounts = tp_account_manager_get_valid_accounts (account_manager);
+ accounts = tp_account_manager_dup_valid_accounts (account_manager);
for (l = accounts; l != NULL; l = l->next) {
TpAccount *account = l->data;
@@ -3527,7 +3527,7 @@ account_manager_prepared_cb (GObject *source_object,
chat, 0);
}
- g_list_free (accounts);
+ g_list_free_full (accounts, g_object_unref);
}
static void
diff --git a/libempathy-gtk/empathy-contact-blocking-dialog.c b/libempathy-gtk/empathy-contact-blocking-dialog.c
index 58d574925..9a0498c5a 100644
--- a/libempathy-gtk/empathy-contact-blocking-dialog.c
+++ b/libempathy-gtk/empathy-contact-blocking-dialog.c
@@ -234,7 +234,7 @@ contact_blocking_dialog_am_prepared (GObject *am,
return;
}
- accounts = tp_account_manager_get_valid_accounts (TP_ACCOUNT_MANAGER (am));
+ accounts = tp_account_manager_dup_valid_accounts (TP_ACCOUNT_MANAGER (am));
for (ptr = accounts; ptr != NULL; ptr = ptr->next)
{
@@ -247,7 +247,7 @@ contact_blocking_dialog_am_prepared (GObject *am,
contact_blocking_dialog_refilter_account_chooser (self);
}
- g_list_free (accounts);
+ g_list_free_full (accounts, g_object_unref);
}
static void
diff --git a/libempathy-gtk/empathy-contact-chooser.c b/libempathy-gtk/empathy-contact-chooser.c
index 880646711..69cfdef69 100644
--- a/libempathy-gtk/empathy-contact-chooser.c
+++ b/libempathy-gtk/empathy-contact-chooser.c
@@ -283,7 +283,7 @@ add_temporary_individuals (EmpathyContactChooser *self,
self->priv->add_temp_ctx = add_temporary_individual_ctx_new (self);
/* Try to add an individual for each connected account */
- accounts = tp_account_manager_get_valid_accounts (self->priv->account_mgr);
+ accounts = tp_account_manager_dup_valid_accounts (self->priv->account_mgr);
for (l = accounts; l != NULL; l = g_list_next (l))
{
TpAccount *account = l->data;
@@ -303,7 +303,7 @@ add_temporary_individuals (EmpathyContactChooser *self,
g_object_unref (factory);
}
- g_list_free (accounts);
+ g_list_free_full (accounts, g_object_unref);
}
static void
diff --git a/libempathy-gtk/empathy-individual-menu.c b/libempathy-gtk/empathy-individual-menu.c
index c485b9b5f..6058c4938 100644
--- a/libempathy-gtk/empathy-individual-menu.c
+++ b/libempathy-gtk/empathy-individual-menu.c
@@ -288,7 +288,7 @@ find_phone_accounts (void)
am = tp_account_manager_dup ();
g_return_val_if_fail (am != NULL, NULL);
- accounts = tp_account_manager_get_valid_accounts (am);
+ accounts = tp_account_manager_dup_valid_accounts (am);
for (l = accounts; l != NULL; l = g_list_next (l))
{
TpAccount *account = l->data;
@@ -303,7 +303,7 @@ find_phone_accounts (void)
found = g_list_prepend (found, g_object_ref (account));
}
- g_list_free (accounts);
+ g_list_free_full (accounts, g_object_unref);
g_object_unref (am);
return found;
diff --git a/libempathy-gtk/empathy-local-xmpp-assistant-widget.c b/libempathy-gtk/empathy-local-xmpp-assistant-widget.c
index c55e3ab30..b714fa499 100644
--- a/libempathy-gtk/empathy-local-xmpp-assistant-widget.c
+++ b/libempathy-gtk/empathy-local-xmpp-assistant-widget.c
@@ -223,7 +223,7 @@ empathy_local_xmpp_assistant_widget_should_create_account (
gboolean salut_created = FALSE;
GList *accounts, *l;
- accounts = tp_account_manager_get_valid_accounts (manager);
+ accounts = tp_account_manager_dup_valid_accounts (manager);
for (l = accounts; l != NULL; l = g_list_next (l))
{
@@ -236,7 +236,7 @@ empathy_local_xmpp_assistant_widget_should_create_account (
}
}
- g_list_free (accounts);
+ g_list_free_full (accounts, g_object_unref);
return !salut_created;
}
diff --git a/libempathy-gtk/empathy-location-manager.c b/libempathy-gtk/empathy-location-manager.c
index 233afb788..576ced529 100644
--- a/libempathy-gtk/empathy-location-manager.c
+++ b/libempathy-gtk/empathy-location-manager.c
@@ -189,7 +189,7 @@ publish_to_all_am_prepared_cb (GObject *source_object,
goto out;
}
- accounts = tp_account_manager_get_valid_accounts (manager);
+ accounts = tp_account_manager_dup_valid_accounts (manager);
for (l = accounts; l; l = l->next)
{
TpConnection *conn = tp_account_get_connection (TP_ACCOUNT (l->data));
@@ -197,7 +197,7 @@ publish_to_all_am_prepared_cb (GObject *source_object,
if (conn != NULL)
publish_location (data->self, conn, data->force_publication);
}
- g_list_free (accounts);
+ g_list_free_full (accounts, g_object_unref);
out:
g_object_unref (data->self);
@@ -675,7 +675,7 @@ account_manager_prepared_cb (GObject *source_object,
return;
}
- accounts = tp_account_manager_get_valid_accounts (account_manager);
+ accounts = tp_account_manager_dup_valid_accounts (account_manager);
for (l = accounts; l != NULL; l = l->next)
{
TpAccount *account = TP_ACCOUNT (l->data);
@@ -683,7 +683,7 @@ account_manager_prepared_cb (GObject *source_object,
tp_g_signal_connect_object (account, "status-changed",
G_CALLBACK (new_connection_cb), self, 0);
}
- g_list_free (accounts);
+ g_list_free_full (accounts, g_object_unref);
}
static void
diff --git a/libempathy-gtk/empathy-log-window.c b/libempathy-gtk/empathy-log-window.c
index ff274a6aa..6a244f503 100644
--- a/libempathy-gtk/empathy-log-window.c
+++ b/libempathy-gtk/empathy-log-window.c
@@ -2499,7 +2499,7 @@ log_window_who_populate (EmpathyLogWindow *self)
GList *accounts, *l;
manager = empathy_account_chooser_get_account_manager (account_chooser);
- accounts = tp_account_manager_get_valid_accounts (manager);
+ accounts = tp_account_manager_dup_valid_accounts (manager);
for (l = accounts; l != NULL; l = l->next)
{
@@ -2510,7 +2510,7 @@ log_window_who_populate (EmpathyLogWindow *self)
get_entities_for_account, ctx);
}
- g_list_free (accounts);
+ g_list_free_full (accounts, g_object_unref);
}
_tpl_action_chain_append (self->priv->chain, select_first_entity, self);
_tpl_action_chain_start (self->priv->chain);
diff --git a/libempathy-gtk/empathy-presence-chooser.c b/libempathy-gtk/empathy-presence-chooser.c
index 08325d402..1eb4a48a5 100644
--- a/libempathy-gtk/empathy-presence-chooser.c
+++ b/libempathy-gtk/empathy-presence-chooser.c
@@ -759,7 +759,7 @@ update_sensitivity_am_prepared_cb (GObject *source_object,
return;
}
- accounts = tp_account_manager_get_valid_accounts (manager);
+ accounts = tp_account_manager_dup_valid_accounts (manager);
for (l = accounts ; l != NULL ; l = g_list_next (l)) {
TpAccount *a = TP_ACCOUNT (l->data);
@@ -770,7 +770,7 @@ update_sensitivity_am_prepared_cb (GObject *source_object,
}
}
- g_list_free (accounts);
+ g_list_free_full (accounts, g_object_unref);
if (!g_network_monitor_get_network_available (priv->connectivity))
sensitive = FALSE;