aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/empathy-accounts-dialog.c2
-rw-r--r--src/empathy-main-window.c12
-rw-r--r--src/empathy-status-icon.c2
3 files changed, 6 insertions, 10 deletions
diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c
index 0816128ea..a9af44827 100644
--- a/src/empathy-accounts-dialog.c
+++ b/src/empathy-accounts-dialog.c
@@ -1099,7 +1099,7 @@ empathy_accounts_dialog_show (GtkWindow *parent,
dialog);
/* Set up signalling */
- dialog->account_manager = empathy_account_manager_new ();
+ dialog->account_manager = empathy_account_manager_dup_singleton ();
dialog->mc = empathy_mission_control_new ();
g_signal_connect (dialog->account_manager, "account-created",
diff --git a/src/empathy-main-window.c b/src/empathy-main-window.c
index bc795dbe0..8a377d794 100644
--- a/src/empathy-main-window.c
+++ b/src/empathy-main-window.c
@@ -467,16 +467,14 @@ main_window_contact_presence_changed_cb (EmpathyContactMonitor *monitor,
McPresence previous,
EmpathyMainWindow *window)
{
- EmpathyAccountManager *acc_manager;
McAccount *account;
gboolean should_play;
- acc_manager = empathy_account_manager_new ();
account = empathy_contact_get_account (contact);
- should_play = !empathy_account_manager_is_account_just_connected (acc_manager, account);
+ should_play = !empathy_account_manager_is_account_just_connected (window->account_manager, account);
if (!should_play) {
- goto out;
+ return;
}
if (previous < MC_PRESENCE_AVAILABLE && current > MC_PRESENCE_OFFLINE) {
@@ -487,7 +485,7 @@ main_window_contact_presence_changed_cb (EmpathyContactMonitor *monitor,
CA_PROP_EVENT_DESCRIPTION, _("Contact logged in"),
NULL);
}
- goto out;
+ return;
}
if (previous > MC_PRESENCE_OFFLINE && current < MC_PRESENCE_AVAILABLE) {
@@ -499,8 +497,6 @@ main_window_contact_presence_changed_cb (EmpathyContactMonitor *monitor,
NULL);
}
}
-out:
- g_object_unref (acc_manager);
}
GtkWidget *
@@ -573,7 +569,7 @@ empathy_main_window_show (void)
g_object_unref (glade);
window->mc = empathy_mission_control_new ();
- window->account_manager = empathy_account_manager_new ();
+ window->account_manager = empathy_account_manager_dup_singleton ();
g_signal_connect (window->account_manager,
"account-connection-changed",
diff --git a/src/empathy-status-icon.c b/src/empathy-status-icon.c
index 3a517db91..07fc3aa02 100644
--- a/src/empathy-status-icon.c
+++ b/src/empathy-status-icon.c
@@ -395,7 +395,7 @@ empathy_status_icon_init (EmpathyStatusIcon *icon)
icon->priv = priv;
priv->icon = gtk_status_icon_new ();
- priv->account_manager = empathy_account_manager_new ();
+ priv->account_manager = empathy_account_manager_dup_singleton ();
priv->idle = empathy_idle_new ();
priv->event_manager = empathy_event_manager_new ();