aboutsummaryrefslogtreecommitdiffstats
path: root/src/empathy-main-window.c
diff options
context:
space:
mode:
authorFelix Kaser <f.kaser@gmx.net>2009-12-09 05:43:39 +0800
committerFelix Kaser <f.kaser@gmx.net>2009-12-15 17:27:43 +0800
commit8a0d77c2ad1908136329d8ebe5348136e4e49387 (patch)
tree07f430c343b3ea01d33a63148aa8d4fca485338d /src/empathy-main-window.c
parent3291e323833f781ba858801a0ebeeb22bc7f712d (diff)
downloadgsoc2013-empathy-8a0d77c2ad1908136329d8ebe5348136e4e49387.tar
gsoc2013-empathy-8a0d77c2ad1908136329d8ebe5348136e4e49387.tar.gz
gsoc2013-empathy-8a0d77c2ad1908136329d8ebe5348136e4e49387.tar.bz2
gsoc2013-empathy-8a0d77c2ad1908136329d8ebe5348136e4e49387.tar.lz
gsoc2013-empathy-8a0d77c2ad1908136329d8ebe5348136e4e49387.tar.xz
gsoc2013-empathy-8a0d77c2ad1908136329d8ebe5348136e4e49387.tar.zst
gsoc2013-empathy-8a0d77c2ad1908136329d8ebe5348136e4e49387.zip
remove error infobars if account disabled/removed
fixes bug #601379
Diffstat (limited to 'src/empathy-main-window.c')
-rw-r--r--src/empathy-main-window.c34
1 files changed, 29 insertions, 5 deletions
diff --git a/src/empathy-main-window.c b/src/empathy-main-window.c
index 2a316b99e..f1b9f5fa5 100644
--- a/src/empathy-main-window.c
+++ b/src/empathy-main-window.c
@@ -304,8 +304,29 @@ main_window_row_activated_cb (EmpathyContactListView *view,
}
static void
+main_window_remove_error (EmpathyMainWindow *window,
+ TpAccount *account)
+{
+ GtkWidget *error_widget;
+
+ error_widget = g_hash_table_lookup (window->errors, account);
+ if (error_widget != NULL) {
+ gtk_widget_destroy (error_widget);
+ g_hash_table_remove (window->errors, account);
+ }
+}
+
+static void
+main_window_account_disabled_cb (TpAccountManager *manager,
+ TpAccount *account,
+ EmpathyMainWindow *window)
+{
+ main_window_remove_error (window, account);
+}
+
+static void
main_window_error_retry_clicked_cb (GtkButton *button,
- EmpathyMainWindow *window)
+ EmpathyMainWindow *window)
{
TpAccount *account;
GtkWidget *error_widget;
@@ -338,12 +359,9 @@ main_window_error_close_clicked_cb (GtkButton *button,
EmpathyMainWindow *window)
{
TpAccount *account;
- GtkWidget *error_widget;
account = g_object_get_data (G_OBJECT (button), "account");
- error_widget = g_hash_table_lookup (window->errors, account);
- gtk_widget_destroy (error_widget);
- g_hash_table_remove (window->errors, account);
+ main_window_remove_error (window, account);
}
static void
@@ -1109,6 +1127,9 @@ main_window_account_removed_cb (TpAccountManager *manager,
g_list_length (a) > 0);
g_list_free (a);
+
+ /* remove errors if any */
+ main_window_remove_error (window, account);
}
static void
@@ -1364,6 +1385,9 @@ empathy_main_window_show (void)
g_signal_connect (window->account_manager, "account-removed",
G_CALLBACK (main_window_account_removed_cb),
window);
+ g_signal_connect (window->account_manager, "account-disabled",
+ G_CALLBACK (main_window_account_disabled_cb),
+ window);
l = empathy_event_manager_get_events (window->event_manager);
while (l) {