]> git.0d.be Git - empathy.git/commitdiff
A modal dialog to warn the user if account manager could not be contacted
authorChandni Verma <chandniverma2112@gmail.com>
Fri, 15 Oct 2010 02:33:48 +0000 (08:03 +0530)
committerDanielle Madeley <danielle.madeley@collabora.co.uk>
Fri, 15 Oct 2010 03:01:48 +0000 (14:01 +1100)
Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=594576
Reviewed-by: Danielle Madeley <danielle.madeley@collabora.co.uk>
src/empathy.c

index f22d69b25a38e08e5e7a54b10a66fbe0572a73f3..2a8761c6f7db5955be387739cfe571acc4cbb3cd 100644 (file)
@@ -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;
     }