From 76a6ff433280ed7bee6346ab05caa00ceb2aba49 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Tue, 3 Aug 2010 17:47:23 +0200 Subject: main-window: pass the TpConnectionStatusReason to main_window_error_display --- src/empathy-main-window.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/empathy-main-window.c') diff --git a/src/empathy-main-window.c b/src/empathy-main-window.c index f0dac6392..54496414c 100644 --- a/src/empathy-main-window.c +++ b/src/empathy-main-window.c @@ -418,7 +418,7 @@ main_window_error_close_clicked_cb (GtkButton *button, static void main_window_error_display (EmpathyMainWindow *window, TpAccount *account, - const gchar *message) + TpConnectionStatusReason reason) { EmpathyMainWindowPriv *priv = GET_PRIV (window); GtkWidget *info_bar; @@ -432,6 +432,9 @@ main_window_error_display (EmpathyMainWindow *window, GtkWidget *action_table; gchar *str; const gchar *icon_name; + const gchar *message; + + message = empathy_status_reason_get_default_message (reason); str = g_markup_printf_escaped ("%s\n%s", tp_account_get_display_name (account), @@ -571,11 +574,7 @@ main_window_connection_changed_cb (TpAccount *account, if (current == TP_CONNECTION_STATUS_DISCONNECTED && reason != TP_CONNECTION_STATUS_REASON_REQUESTED) { - const gchar *message; - - message = empathy_status_reason_get_default_message (reason); - - main_window_error_display (window, account, message); + main_window_error_display (window, account, reason); } if (current == TP_CONNECTION_STATUS_DISCONNECTED) { -- cgit v1.2.3