From b7bbdc37baa74f46c99ea4299a34b7ea4b4053e5 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Tue, 6 Jan 2009 16:45:51 +0000 Subject: Adapt Patryk's patch to trunk. svn path=/trunk/; revision=2022 --- src/empathy-main-window.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'src/empathy-main-window.c') diff --git a/src/empathy-main-window.c b/src/empathy-main-window.c index 49bfe3d0a..5c82fe599 100644 --- a/src/empathy-main-window.c +++ b/src/empathy-main-window.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include @@ -212,7 +213,7 @@ main_window_flash_foreach (GtkTreeModel *model, /* To be used with gtk_tree_model_foreach, update the status icon * of the contact to show the event icon (on=TRUE) or the presence * (on=FALSE) */ - gtk_tree_model_get (model, iter, + gtk_tree_model_get (model, iter, EMPATHY_CONTACT_LIST_STORE_COL_CONTACT, &contact, -1); @@ -285,6 +286,11 @@ main_window_flash_cb (EmpathyMainWindow *window) static void main_window_flash_start (EmpathyMainWindow *window) { + ca_gtk_play_for_widget (GTK_WIDGET (window->window), 0, + CA_PROP_EVENT_ID, "message-new-instant", + CA_PROP_EVENT_DESCRIPTION, _("Incoming chat request"), + CA_PROP_APPLICATION_NAME, g_get_application_name (), + NULL); if (window->flash_timeout_id != 0) { return; @@ -1166,9 +1172,22 @@ main_window_status_changed_cb (MissionControl *mc, main_window_error_display (window, account, message); } + if (status == TP_CONNECTION_STATUS_DISCONNECTED) { + ca_gtk_play_for_widget (GTK_WIDGET (window->window), 0, + CA_PROP_EVENT_ID, "service-logout", + CA_PROP_EVENT_DESCRIPTION, _("Disconnected from server"), + CA_PROP_APPLICATION_NAME, g_get_application_name (), + NULL); + } + if (status == TP_CONNECTION_STATUS_CONNECTED) { GtkWidget *error_widget; + ca_gtk_play_for_widget (GTK_WIDGET (window->window), 0, + CA_PROP_EVENT_ID, "service-login", + CA_PROP_EVENT_DESCRIPTION, _("Connected to server"), + CA_PROP_APPLICATION_NAME, g_get_application_name (), + NULL); /* Account connected without error, remove error message if any */ error_widget = g_hash_table_lookup (window->errors, account); if (error_widget) { -- cgit v1.2.3