From 3962f6f8d1680b6a304577dbc1ed366c33f6b206 Mon Sep 17 00:00:00 2001 From: Cosimo Cecchi Date: Wed, 5 Aug 2009 12:02:39 +0200 Subject: Change labels when creating an account --- libempathy-gtk/empathy-account-widget-jabber.ui | 28 +++++++++++++++++++++---- libempathy-gtk/empathy-account-widget.c | 14 +++++++++++++ src/empathy-account-assistant.c | 4 ++++ 3 files changed, 42 insertions(+), 4 deletions(-) diff --git a/libempathy-gtk/empathy-account-widget-jabber.ui b/libempathy-gtk/empathy-account-widget-jabber.ui index a2165393c..164bbcdf9 100644 --- a/libempathy-gtk/empathy-account-widget-jabber.ui +++ b/libempathy-gtk/empathy-account-widget-jabber.ui @@ -351,7 +351,6 @@ True vertical - 6 True @@ -362,6 +361,15 @@ 0 + + + 0 + What is your desired Jabber ID? + + + 1 + + True @@ -369,6 +377,7 @@ 0 0.34999999403953552 0.34999999403953552 + 6 12 @@ -379,17 +388,28 @@ - 1 + 2 True 0 + 6 What is your Jabber password? - 2 + 3 + + + + + 0 + 6 + What is your desired Jabber password? + + + 4 @@ -410,7 +430,7 @@ - 3 + 5 diff --git a/libempathy-gtk/empathy-account-widget.c b/libempathy-gtk/empathy-account-widget.c index 27120c51a..713f50048 100644 --- a/libempathy-gtk/empathy-account-widget.c +++ b/libempathy-gtk/empathy-account-widget.c @@ -666,12 +666,26 @@ account_widget_build_jabber (EmpathyAccountWidget *self, EmpathyAccountWidgetPriv *priv = GET_PRIV (self); GtkWidget *spinbutton_port; GtkWidget *checkbutton_ssl; + GtkWidget *label_id, *label_password; + GtkWidget *label_id_create, *label_password_create; if (priv->simple) { self->ui_details->gui = empathy_builder_get_file (filename, "vbox_jabber_simple", &self->ui_details->widget, + "label_id_simple", &label_id, + "label_id_create", &label_id_create, + "label_password_simple", &label_password, + "label_password_create", &label_password_create, NULL); + + if (empathy_account_settings_get_boolean (priv->settings, "register")) + { + gtk_widget_hide (label_id); + gtk_widget_hide (label_password); + gtk_widget_show (label_id_create); + gtk_widget_show (label_password_create); + } empathy_account_widget_handle_params (self, "entry_id_simple", "account", diff --git a/src/empathy-account-assistant.c b/src/empathy-account-assistant.c index 5fd125816..91ba26b68 100644 --- a/src/empathy-account-assistant.c +++ b/src/empathy-account-assistant.c @@ -125,6 +125,10 @@ account_assistant_protocol_changed_cb (GtkComboBox *chooser, str = g_strdup_printf (_("New %s account"), proto->name); settings = empathy_account_settings_new (cm->name, proto->name, str); + + if (priv->first_resp == RESPONSE_CREATE_ACCOUNT) + empathy_account_settings_set_boolean (settings, "register", TRUE); + account_widget = empathy_account_widget_simple_new_for_protocol (proto->name, settings, &widget_object); -- cgit v1.2.3