[gnome-online-accounts] owncloud: Add an is_template parameter to create_account_details_ui
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-online-accounts] owncloud: Add an is_template parameter to create_account_details_ui
- Date: Wed, 14 Sep 2016 18:23:39 +0000 (UTC)
commit 433fc3557185071d7cd763e9def6d081cbaeca0a
Author: Debarshi Ray <debarshir gnome org>
Date: Wed Sep 14 18:16:05 2016 +0200
owncloud: Add an is_template parameter to create_account_details_ui
This will let us tweak the UI when converting a template to
full-fledged account.
https://bugzilla.gnome.org/show_bug.cgi?id=771366
src/goabackend/goaowncloudprovider.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/src/goabackend/goaowncloudprovider.c b/src/goabackend/goaowncloudprovider.c
index 5159fc3..a94ae81 100644
--- a/src/goabackend/goaowncloudprovider.c
+++ b/src/goabackend/goaowncloudprovider.c
@@ -520,6 +520,7 @@ create_account_details_ui (GoaProvider *provider,
GtkDialog *dialog,
GtkBox *vbox,
gboolean new_account,
+ gboolean is_template,
AddAccountData *data)
{
GtkWidget *grid0;
@@ -560,7 +561,12 @@ create_account_details_ui (GoaProvider *provider,
add_entry (grid1, row++, _("_Password"), &data->password);
gtk_entry_set_visibility (GTK_ENTRY (data->password), FALSE);
- gtk_widget_grab_focus ((new_account) ? data->uri : data->password);
+ if (new_account)
+ gtk_widget_grab_focus (data->uri);
+ else if (is_template)
+ gtk_widget_grab_focus (data->username);
+ else
+ gtk_widget_grab_focus (data->password);
g_signal_connect (data->uri, "changed", G_CALLBACK (on_uri_username_or_password_changed), data);
g_signal_connect (data->username, "changed", G_CALLBACK (on_uri_username_or_password_changed), data);
@@ -680,7 +686,7 @@ add_account (GoaProvider *provider,
data.dialog = dialog;
data.error = NULL;
- create_account_details_ui (provider, dialog, vbox, TRUE, &data);
+ create_account_details_ui (provider, dialog, vbox, TRUE, FALSE, &data);
gtk_widget_show_all (GTK_WIDGET (vbox));
g_signal_connect (dialog, "response", G_CALLBACK (dialog_response_cb), &data);
@@ -882,7 +888,7 @@ refresh_account (GoaProvider *provider,
data.dialog = GTK_DIALOG (dialog);
data.error = NULL;
- create_account_details_ui (provider, GTK_DIALOG (dialog), GTK_BOX (vbox), FALSE, &data);
+ create_account_details_ui (provider, GTK_DIALOG (dialog), GTK_BOX (vbox), FALSE, FALSE, &data);
accept_ssl_errors = goa_util_lookup_keyfile_boolean (object, "AcceptSslErrors");
uri = goa_util_lookup_keyfile_string (object, "Uri");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]