[empathy] A modal dialog to warn the user if account manager could not be contacted



commit c07cc33d2453bc8bcb5597439f620a7534680d31
Author: Chandni Verma <chandniverma2112 gmail com>
Date:   Fri Oct 15 08:03:48 2010 +0530

    A modal dialog to warn the user if account manager could not be contacted
    
    Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=594576
    
    Reviewed-by: Danielle Madeley <danielle madeley collabora co uk>

 src/empathy.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/src/empathy.c b/src/empathy.c
index f22d69b..2a8761c 100644
--- a/src/empathy.c
+++ b/src/empathy.c
@@ -259,7 +259,21 @@ account_manager_ready_cb (GObject *source_object,
 
   if (!tp_account_manager_prepare_finish (manager, result, &error))
     {
+      GtkWidget *dialog;
+
       DEBUG ("Failed to prepare account manager: %s", error->message);
+
+      dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL,
+          GTK_MESSAGE_ERROR, GTK_BUTTONS_OK,
+          _("Error contacting the Account Manager"));
+      gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
+          _("There was an error while trying to connect to the Telepathy "
+            "Account Manager. The error was:\n\n%s"),
+          error->message);
+
+      gtk_dialog_run (GTK_DIALOG (dialog));
+      gtk_widget_destroy (dialog);
+
       g_error_free (error);
       return;
     }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]