aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-01-21 23:28:58 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-01-25 22:13:40 +0800
commit1943ad3113ef82a02f4c30b6f6ad8b19a56c3ee8 (patch)
tree046a8d22df35279fdc38f6a5ea37ef4969177bd2
parent5321b5a3fca104ceeb265c053da7460a1809a53f (diff)
downloadgsoc2013-empathy-1943ad3113ef82a02f4c30b6f6ad8b19a56c3ee8.tar
gsoc2013-empathy-1943ad3113ef82a02f4c30b6f6ad8b19a56c3ee8.tar.gz
gsoc2013-empathy-1943ad3113ef82a02f4c30b6f6ad8b19a56c3ee8.tar.bz2
gsoc2013-empathy-1943ad3113ef82a02f4c30b6f6ad8b19a56c3ee8.tar.lz
gsoc2013-empathy-1943ad3113ef82a02f4c30b6f6ad8b19a56c3ee8.tar.xz
gsoc2013-empathy-1943ad3113ef82a02f4c30b6f6ad8b19a56c3ee8.tar.zst
gsoc2013-empathy-1943ad3113ef82a02f4c30b6f6ad8b19a56c3ee8.zip
Display an error message if Salut is not installed
Please enter the commit message for your changes. Lines starting
-rw-r--r--src/empathy-account-assistant.c40
1 files changed, 32 insertions, 8 deletions
diff --git a/src/empathy-account-assistant.c b/src/empathy-account-assistant.c
index 9ae16163a..0b23b368c 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,