diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-11-30 18:24:20 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-11-30 18:24:20 +0800 |
commit | 81068bbf3ebd6c251f308d6d45e4dadf07432ea7 (patch) | |
tree | d17b2afe895a95156d753b6ccbb4b66196cb01b9 /src/empathy-main-window.c | |
parent | 8172bca03c6f85d7dcc0ff39f1a81ccfd719b08b (diff) | |
download | gsoc2013-empathy-81068bbf3ebd6c251f308d6d45e4dadf07432ea7.tar gsoc2013-empathy-81068bbf3ebd6c251f308d6d45e4dadf07432ea7.tar.gz gsoc2013-empathy-81068bbf3ebd6c251f308d6d45e4dadf07432ea7.tar.bz2 gsoc2013-empathy-81068bbf3ebd6c251f308d6d45e4dadf07432ea7.tar.lz gsoc2013-empathy-81068bbf3ebd6c251f308d6d45e4dadf07432ea7.tar.xz gsoc2013-empathy-81068bbf3ebd6c251f308d6d45e4dadf07432ea7.tar.zst gsoc2013-empathy-81068bbf3ebd6c251f308d6d45e4dadf07432ea7.zip |
move sound functions to EmpathySoundManager methods
Diffstat (limited to 'src/empathy-main-window.c')
-rw-r--r-- | src/empathy-main-window.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/empathy-main-window.c b/src/empathy-main-window.c index 8b9661838..db5818c0c 100644 --- a/src/empathy-main-window.c +++ b/src/empathy-main-window.c @@ -107,6 +107,7 @@ struct _EmpathyMainWindowPriv { TpAccountManager *account_manager; EmpathyChatroomManager *chatroom_manager; EmpathyEventManager *event_manager; + EmpathySoundManager *sound_mgr;; guint flash_timeout_id; gboolean flash_on; gboolean empty; @@ -639,6 +640,8 @@ main_window_connection_changed_cb (TpAccount *account, GHashTable *details, EmpathyMainWindow *window) { + EmpathyMainWindowPriv *priv = GET_PRIV (window); + main_window_update_status (window); if (current == TP_CONNECTION_STATUS_DISCONNECTED && @@ -647,12 +650,12 @@ main_window_connection_changed_cb (TpAccount *account, } if (current == TP_CONNECTION_STATUS_DISCONNECTED) { - empathy_sound_play (GTK_WIDGET (window), + empathy_sound_manager_play (priv->sound_mgr, GTK_WIDGET (window), EMPATHY_SOUND_ACCOUNT_DISCONNECTED); } if (current == TP_CONNECTION_STATUS_CONNECTED) { - empathy_sound_play (GTK_WIDGET (window), + empathy_sound_manager_play (priv->sound_mgr, GTK_WIDGET (window), EMPATHY_SOUND_ACCOUNT_CONNECTED); /* Account connected without error, remove error message if any */ @@ -706,6 +709,7 @@ empathy_main_window_finalize (GObject *window) g_object_unref (priv->account_manager); g_object_unref (priv->individual_store); g_object_unref (priv->contact_manager); + g_object_unref (priv->sound_mgr); g_hash_table_destroy (priv->errors); /* disconnect all handlers of status-changed signal */ @@ -1576,6 +1580,8 @@ empathy_main_window_init (EmpathyMainWindow *window) priv->gsettings_ui = g_settings_new (EMPATHY_PREFS_UI_SCHEMA); priv->gsettings_contacts = g_settings_new (EMPATHY_PREFS_CONTACTS_SCHEMA); + priv->sound_mgr = empathy_sound_manager_dup_singleton (); + gtk_window_set_title (GTK_WINDOW (window), _("Contact List")); gtk_window_set_role (GTK_WINDOW (window), "contact_list"); gtk_window_set_default_size (GTK_WINDOW (window), 225, 325); |