user-accounts: Focus domain entry when selecting enterprise login

And return focus correctly when switching back to local login
This commit is contained in:
Robert Ancell 2018-11-08 12:29:17 +13:00
parent e41506798a
commit ad76438817
2 changed files with 6 additions and 0 deletions

View file

@ -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)

View file

@ -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>