[empathy] Display an error message if Salut is not installed
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [empathy] Display an error message if Salut is not installed
- Date: Mon, 25 Jan 2010 14:14:53 +0000 (UTC)
commit 1943ad3113ef82a02f4c30b6f6ad8b19a56c3ee8
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Thu Jan 21 15:28:58 2010 +0000
Display an error message if Salut is not installed
Please enter the commit message for your changes. Lines starting
src/empathy-account-assistant.c | 40 +++++++++++++++++++++++++++++++-------
1 files changed, 32 insertions(+), 8 deletions(-)
---
diff --git a/src/empathy-account-assistant.c b/src/empathy-account-assistant.c
index 9ae1616..0b23b36 100644
--- a/src/empathy-account-assistant.c
+++ b/src/empathy-account-assistant.c
@@ -1038,8 +1038,6 @@ account_assistant_build_salut_page (EmpathyAccountAssistant *self)
g_object_unref (pix);
- /* TODO: display a message if Salut is not installed */
-
w = gtk_check_button_new_with_label (
_("I don't want to enable this feature for now"));
gtk_box_pack_start (GTK_BOX (main_vbox), w, FALSE, FALSE, 0);
@@ -1070,6 +1068,17 @@ account_assistant_build_salut_page (EmpathyAccountAssistant *self)
return main_vbox;
}
+static GtkWidget *
+account_assistant_build_salut_error_page (EmpathyAccountAssistant *self)
+{
+ return build_error_page (
+ _("telepathy-salut not installed"),
+ _("Empathy won't be able to see the people connected on the same "
+ "network as you because telepathy-salut is not installed.\n"
+ "If you want to enable this feature, you should install "
+ "telepathy-salut and activate it in the Accounts dialog"));
+}
+
static void
account_mgr_prepare_cb (GObject *source_object,
GAsyncResult *result,
@@ -1157,13 +1166,28 @@ do_constructed (GObject *object)
priv->enter_or_create_page = page;
/* fourth page (salut details) */
- page = account_assistant_build_salut_page (self);
- gtk_assistant_append_page (assistant, page);
- gtk_assistant_set_page_title (assistant, page,
- _("Please enter personal details"));
- gtk_assistant_set_page_type (assistant, page, GTK_ASSISTANT_PAGE_CONFIRM);
+ if (empathy_connection_managers_get_cm (priv->connection_mgrs, "salut")
+ != NULL)
+ {
+ page = account_assistant_build_salut_page (self);
+ gtk_assistant_append_page (assistant, page);
+ gtk_assistant_set_page_title (assistant, page,
+ _("Please enter personal details"));
+ gtk_assistant_set_page_type (assistant, page, GTK_ASSISTANT_PAGE_CONFIRM);
+
+ priv->create_salut_account = TRUE;
+ }
+ else
+ {
+ page = account_assistant_build_salut_error_page (self);
+ gtk_assistant_append_page (assistant, page);
+ gtk_assistant_set_page_title (assistant, page, _("An error occurred"));
+ gtk_assistant_set_page_type (assistant, page, GTK_ASSISTANT_PAGE_SUMMARY);
+
+ priv->create_salut_account = FALSE;
+ }
+
priv->salut_page = page;
- priv->create_salut_account = TRUE;
priv->should_create_salut_account = TRUE;
tp_account_manager_prepare_async (priv->account_mgr, NULL,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]