diff options
author | Felix Kaser <f.kaser@gmx.net> | 2009-12-14 17:34:05 +0800 |
---|---|---|
committer | Felix Kaser <f.kaser@gmx.net> | 2009-12-15 17:27:43 +0800 |
commit | b2f25f9f70969bf3d872780becb4f73137c268d1 (patch) | |
tree | 54021fe0466a51fa192d0b05b84d4e69e6e93f99 | |
parent | 8a0d77c2ad1908136329d8ebe5348136e4e49387 (diff) | |
download | gsoc2013-empathy-b2f25f9f70969bf3d872780becb4f73137c268d1.tar gsoc2013-empathy-b2f25f9f70969bf3d872780becb4f73137c268d1.tar.gz gsoc2013-empathy-b2f25f9f70969bf3d872780becb4f73137c268d1.tar.bz2 gsoc2013-empathy-b2f25f9f70969bf3d872780becb4f73137c268d1.tar.lz gsoc2013-empathy-b2f25f9f70969bf3d872780becb4f73137c268d1.tar.xz gsoc2013-empathy-b2f25f9f70969bf3d872780becb4f73137c268d1.tar.zst gsoc2013-empathy-b2f25f9f70969bf3d872780becb4f73137c268d1.zip |
refactoring - use main_window_remove_error
use remove_error function everywhere the error is removed
-rw-r--r-- | src/empathy-main-window.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/src/empathy-main-window.c b/src/empathy-main-window.c index f1b9f5fa5..44eeff3ac 100644 --- a/src/empathy-main-window.c +++ b/src/empathy-main-window.c @@ -329,14 +329,11 @@ main_window_error_retry_clicked_cb (GtkButton *button, EmpathyMainWindow *window) { TpAccount *account; - GtkWidget *error_widget; account = g_object_get_data (G_OBJECT (button), "account"); tp_account_reconnect_async (account, NULL, NULL); - 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 @@ -344,14 +341,11 @@ main_window_error_edit_clicked_cb (GtkButton *button, EmpathyMainWindow *window) { TpAccount *account; - GtkWidget *error_widget; account = g_object_get_data (G_OBJECT (button), "account"); empathy_accounts_dialog_show (GTK_WINDOW (window->window), 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 @@ -579,17 +573,11 @@ main_window_connection_changed_cb (TpAccount *account, } if (current == TP_CONNECTION_STATUS_CONNECTED) { - GtkWidget *error_widget; - empathy_sound_play (GTK_WIDGET (window->window), EMPATHY_SOUND_ACCOUNT_CONNECTED); /* Account connected without error, remove error message if any */ - error_widget = g_hash_table_lookup (window->errors, account); - if (error_widget) { - gtk_widget_destroy (error_widget); - g_hash_table_remove (window->errors, account); - } + main_window_remove_error (window, account); } } |