[gnome-control-center] user-accounts: Focus domain entry when selecting enterprise login
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] user-accounts: Focus domain entry when selecting enterprise login
- Date: Fri, 9 Nov 2018 20:46:32 +0000 (UTC)
commit ad76438817691f4a057430f6e1195c7888d8e80b
Author: Robert Ancell <robert ancell canonical com>
Date: Thu Nov 8 12:29:17 2018 +1300
user-accounts: Focus domain entry when selecting enterprise login
And return focus correctly when switching back to local login
panels/user-accounts/cc-add-user-dialog.c | 5 +++++
panels/user-accounts/cc-add-user-dialog.ui | 1 +
2 files changed, 6 insertions(+)
---
diff --git a/panels/user-accounts/cc-add-user-dialog.c b/panels/user-accounts/cc-add-user-dialog.c
index 24c828c00..6d7b7c961 100644
--- a/panels/user-accounts/cc-add-user-dialog.c
+++ b/panels/user-accounts/cc-add-user-dialog.c
@@ -1287,6 +1287,11 @@ mode_change (CcAddUserDialog *self,
gtk_stack_set_visible_child_name (self->stack, mode_pages[mode]);
+ if (mode == MODE_ENTERPRISE)
+ gtk_widget_grab_focus (GTK_WIDGET (self->enterprise_domain_entry));
+ else
+ gtk_widget_grab_focus (GTK_WIDGET (self->local_name_entry));
+
/* The enterprise toggle state */
active = (mode != MODE_LOCAL);
if (gtk_toggle_button_get_active (self->enterprise_button) != active)
diff --git a/panels/user-accounts/cc-add-user-dialog.ui b/panels/user-accounts/cc-add-user-dialog.ui
index 671b3ad57..ef77787b4 100644
--- a/panels/user-accounts/cc-add-user-dialog.ui
+++ b/panels/user-accounts/cc-add-user-dialog.ui
@@ -640,6 +640,7 @@
<object class="GtkEntry" id="enterprise_login_entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="has_focus">True</property>
<property name="hexpand">True</property>
<property name="invisible_char">●</property>
<property name="activates_default">True</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]