From b3a804afbff0bda318d31dea243ffef18491c2d8 Mon Sep 17 00:00:00 2001 From: Gabriel Millaire Date: Sat, 16 May 2009 15:57:22 -0400 Subject: Connect to error signals --- src/empathy-new-chatroom-dialog.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'src') diff --git a/src/empathy-new-chatroom-dialog.c b/src/empathy-new-chatroom-dialog.c index 5f8d19b3c..4b2e62b88 100644 --- a/src/empathy-new-chatroom-dialog.c +++ b/src/empathy-new-chatroom-dialog.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -98,6 +99,12 @@ static void new_chatroom_dialog_new_room_cb (EmpathyTpRo static void new_chatroom_dialog_listing_cb (EmpathyTpRoomlist *room_list, gpointer unused, EmpathyNewChatroomDialog *dialog); +static void start_listing_error_cb (EmpathyTpRoomlist *room_list, + GError *error, + EmpathyNewChatroomDialog *dialog); +static void stop_listing_error_cb (EmpathyTpRoomlist *room_list, + GError *error, + EmpathyNewChatroomDialog *dialog); static void new_chatroom_dialog_model_clear (EmpathyNewChatroomDialog *dialog); static void new_chatroom_dialog_model_row_activated_cb (GtkTreeView *tree_view, GtkTreePath *path, @@ -411,6 +418,12 @@ new_chatroom_dialog_account_changed_cb (GtkComboBox *combobox, g_signal_connect (dialog->room_list, "notify::is-listing", G_CALLBACK (new_chatroom_dialog_listing_cb), dialog); + g_signal_connect (dialog->room_list, "error::start", + G_CALLBACK (start_listing_error_cb), + dialog); + g_signal_connect (dialog->room_list, "error::stop", + G_CALLBACK (stop_listing_error_cb), + dialog); expanded = gtk_expander_get_expanded (GTK_EXPANDER (dialog->expander_browse)); if (expanded) { @@ -486,6 +499,22 @@ new_chatroom_dialog_new_room_cb (EmpathyTpRoomlist *room_list, g_free (tooltip); } +static void +start_listing_error_cb (EmpathyTpRoomlist *room_list, + GError *error, + EmpathyNewChatroomDialog *dialog) +{ + g_printf("Error when starting listing of chatrooms."); +} + +static void +stop_listing_error_cb (EmpathyTpRoomlist *room_list, + GError *error, + EmpathyNewChatroomDialog *dialog) +{ + g_printf("Error when stopping listing of chatrooms."); +} + static void new_chatroom_dialog_listing_cb (EmpathyTpRoomlist *room_list, gpointer unused, -- cgit v1.2.3