diff options
author | Xavier Claessens <xclaesse@src.gnome.org> | 2009-01-07 00:48:36 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@src.gnome.org> | 2009-01-07 00:48:36 +0800 |
commit | d374b59bc0a0baf9fdfcb3528162cbf389b7f26c (patch) | |
tree | aec6df9cb672e573b8fa544ba65eeed709a9b7e7 /src/empathy-main-window.c | |
parent | dcc292dc2b1fb67d63403618803a5e82e8ebfc9d (diff) | |
download | gsoc2013-empathy-d374b59bc0a0baf9fdfcb3528162cbf389b7f26c.tar gsoc2013-empathy-d374b59bc0a0baf9fdfcb3528162cbf389b7f26c.tar.gz gsoc2013-empathy-d374b59bc0a0baf9fdfcb3528162cbf389b7f26c.tar.bz2 gsoc2013-empathy-d374b59bc0a0baf9fdfcb3528162cbf389b7f26c.tar.lz gsoc2013-empathy-d374b59bc0a0baf9fdfcb3528162cbf389b7f26c.tar.xz gsoc2013-empathy-d374b59bc0a0baf9fdfcb3528162cbf389b7f26c.tar.zst gsoc2013-empathy-d374b59bc0a0baf9fdfcb3528162cbf389b7f26c.zip |
Use new singleton policy for EmpathyAccountManager.
svn path=/trunk/; revision=2074
Diffstat (limited to 'src/empathy-main-window.c')
-rw-r--r-- | src/empathy-main-window.c | 12 |
1 files changed, 4 insertions, 8 deletions
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", |