aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGabriel Millaire <millaire.gabriel@gmail.com>2009-05-17 04:43:13 +0800
committerGabriel Millaire <millaire.gabriel@gmail.com>2009-05-22 23:15:43 +0800
commit96d040d7ce116f22e27cbf8acbdf10a7d3277df6 (patch)
tree35dc2b48b0a82b8ab2d7f9607796fdf35058fb9f
parent6405eb55ea31ac039c39a780fbeb6848d05934bf (diff)
downloadgsoc2013-empathy-96d040d7ce116f22e27cbf8acbdf10a7d3277df6.tar
gsoc2013-empathy-96d040d7ce116f22e27cbf8acbdf10a7d3277df6.tar.gz
gsoc2013-empathy-96d040d7ce116f22e27cbf8acbdf10a7d3277df6.tar.bz2
gsoc2013-empathy-96d040d7ce116f22e27cbf8acbdf10a7d3277df6.tar.lz
gsoc2013-empathy-96d040d7ce116f22e27cbf8acbdf10a7d3277df6.tar.xz
gsoc2013-empathy-96d040d7ce116f22e27cbf8acbdf10a7d3277df6.tar.zst
gsoc2013-empathy-96d040d7ce116f22e27cbf8acbdf10a7d3277df6.zip
Display error message in UI
-rw-r--r--src/empathy-new-chatroom-dialog.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/src/empathy-new-chatroom-dialog.c b/src/empathy-new-chatroom-dialog.c
index 4b2e62b88..f593a4997 100644
--- a/src/empathy-new-chatroom-dialog.c
+++ b/src/empathy-new-chatroom-dialog.c
@@ -67,7 +67,8 @@ typedef struct {
GtkWidget *treeview;
GtkTreeModel *model;
GtkWidget *button_join;
- GtkWidget *button_close;
+ GtkWidget *label_error_message;
+ GtkWidget *viewport_error;
} EmpathyNewChatroomDialog;
enum {
@@ -124,6 +125,8 @@ static void new_chatroom_dialog_expander_browse_activate_cb (GtkWidget
static gboolean new_chatroom_dialog_entry_server_focus_out_cb (GtkWidget *widget,
GdkEventFocus *event,
EmpathyNewChatroomDialog *dialog);
+static void new_chatroom_dialog_button_close_error_clicked_cb (GtkButton *button,
+ EmpathyNewChatroomDialog *dialog);
static EmpathyNewChatroomDialog *dialog_p = NULL;
@@ -154,6 +157,8 @@ empathy_new_chatroom_dialog_show (GtkWindow *parent)
"treeview", &dialog->treeview,
"button_join", &dialog->button_join,
"expander_browse", &dialog->expander_browse,
+ "label_error_message", &dialog->label_error_message,
+ "viewport_error", &dialog->viewport_error,
NULL);
g_free (filename);
@@ -165,6 +170,7 @@ empathy_new_chatroom_dialog_show (GtkWindow *parent)
"entry_server", "focus-out-event", new_chatroom_dialog_entry_server_focus_out_cb,
"entry_room", "changed", new_chatroom_dialog_entry_changed_cb,
"expander_browse", "activate", new_chatroom_dialog_expander_browse_activate_cb,
+ "button_close_error", "clicked", new_chatroom_dialog_button_close_error_clicked_cb,
NULL);
g_object_unref (gui);
@@ -442,6 +448,13 @@ new_chatroom_dialog_account_changed_cb (GtkComboBox *combobox,
}
static void
+new_chatroom_dialog_button_close_error_clicked_cb (GtkButton *button,
+ EmpathyNewChatroomDialog *dialog)
+{
+ gtk_widget_hide (dialog->viewport_error);
+}
+
+static void
new_chatroom_dialog_roomlist_destroy_cb (EmpathyTpRoomlist *room_list,
EmpathyNewChatroomDialog *dialog)
{
@@ -504,7 +517,8 @@ start_listing_error_cb (EmpathyTpRoomlist *room_list,
GError *error,
EmpathyNewChatroomDialog *dialog)
{
- g_printf("Error when starting listing of chatrooms.");
+ gtk_label_set_text (GTK_LABEL (dialog->label_error_message), "Could not start room listing");
+ gtk_widget_show_all (dialog->viewport_error);
}
static void
@@ -512,7 +526,8 @@ stop_listing_error_cb (EmpathyTpRoomlist *room_list,
GError *error,
EmpathyNewChatroomDialog *dialog)
{
- g_printf("Error when stopping listing of chatrooms.");
+ gtk_label_set_text (GTK_LABEL (dialog->label_error_message), "Could not stop room listing");
+ gtk_widget_show_all (dialog->viewport_error);
}
static void