From: David Shea dshea@redhat.com
Ugh. --- pyanaconda/ui/gui/spokes/advanced_user.glade | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/advanced_user.glade b/pyanaconda/ui/gui/spokes/advanced_user.glade index 4bed411..f4d62cc 100644 --- a/pyanaconda/ui/gui/spokes/advanced_user.glade +++ b/pyanaconda/ui/gui/spokes/advanced_user.glade @@ -77,8 +77,8 @@ <object class="GtkLabel" id="label1"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="xalign">0</property> <property name="label" translatable="yes">ADVANCED USER CONFIGURATION</property> + <property name="xalign">0</property> <attributes> <attribute name="weight" value="bold"/> <attribute name="scale" value="100"/> @@ -134,8 +134,8 @@ <property name="visible">True</property> <property name="can_focus">False</property> <property name="margin_top">8</property> - <property name="xalign">0</property> <property name="label" translatable="yes">User and Group IDs</property> + <property name="xalign">0</property> <attributes> <attribute name="weight" value="bold"/> </attributes> @@ -227,8 +227,8 @@ <property name="visible">True</property> <property name="can_focus">False</property> <property name="margin_top">8</property> - <property name="xalign">0</property> <property name="label" translatable="yes">Group Membership</property> + <property name="xalign">0</property> <attributes> <attribute name="weight" value="bold"/> </attributes> @@ -255,9 +255,9 @@ <object class="GtkLabel" id="label6"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="xalign">0</property> <property name="label" translatable="yes" context="GUI|Advanced User">_Add user to the following groups:</property> <property name="use_underline">True</property> + <property name="xalign">0</property> </object> <packing> <property name="expand">False</property> @@ -286,8 +286,8 @@ <object class="GtkLabel" id="label9"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="xalign">1</property> <property name="label" translatable="yes">Example:</property> + <property name="xalign">1</property> <attributes> <attribute name="weight" value="bold"/> </attributes> @@ -303,8 +303,8 @@ <property name="visible">True</property> <property name="can_focus">False</property> <property name="margin_left">5</property> - <property name="xalign">0</property> <property name="label" translatable="yes">wheel, my-team (1245), project-x (29935)</property> + <property name="xalign">0</property> </object> <packing> <property name="expand">False</property> @@ -336,9 +336,9 @@ <property name="visible">True</property> <property name="can_focus">False</property> <property name="margin_top">3</property> + <property name="label" translatable="yes">Tip:</property> <property name="xalign">0</property> <property name="yalign">0</property> - <property name="label" translatable="yes">Tip:</property> <attributes> <attribute name="style" value="italic"/> <attribute name="weight" value="bold"/> @@ -355,12 +355,12 @@ <object class="GtkLabel" id="label8"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="xalign">0</property> - <property name="yalign">0</property> <property name="label" translatable="yes">You may input a comma-separated list of group names and group IDs here. Groups that do not already exist will be created; specify their GID in parentheses. </property> <property name="wrap">True</property> <property name="width_chars">35</property> <property name="max_width_chars">35</property> + <property name="xalign">0</property> + <property name="yalign">0</property> <attributes> <attribute name="scale" value="0.90000000000000002"/> </attributes>
From: David Shea dshea@redhat.com
When the UID or GID checkboxes are toggled via a keyboard accellerator, automatically focus the UID or GID input. --- pyanaconda/ui/gui/spokes/advanced_user.glade | 2 ++ pyanaconda/ui/gui/spokes/user.py | 22 +++++++++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/ui/gui/spokes/advanced_user.glade b/pyanaconda/ui/gui/spokes/advanced_user.glade index f4d62cc..93470aa 100644 --- a/pyanaconda/ui/gui/spokes/advanced_user.glade +++ b/pyanaconda/ui/gui/spokes/advanced_user.glade @@ -161,6 +161,7 @@ <property name="use_underline">True</property> <property name="xalign">0</property> <property name="draw_indicator">True</property> + <signal name="mnemonic-activate" handler="on_uid_mnemonic_activate" swapped="no"/> <signal name="toggled" handler="_apply_checkboxes" swapped="no"/> </object> <packing> @@ -177,6 +178,7 @@ <property name="use_underline">True</property> <property name="xalign">0</property> <property name="draw_indicator">True</property> + <signal name="mnemonic-activate" handler="on_gid_mnemonic_activate" swapped="no"/> <signal name="toggled" handler="_apply_checkboxes" swapped="no"/> </object> <packing> diff --git a/pyanaconda/ui/gui/spokes/user.py b/pyanaconda/ui/gui/spokes/user.py index 7a41966..bd88b78 100644 --- a/pyanaconda/ui/gui/spokes/user.py +++ b/pyanaconda/ui/gui/spokes/user.py @@ -200,6 +200,27 @@ def run(self): self.window.hide() return rc
+ def on_uid_mnemonic_activate(self, widget, group_cycling, user_data=None): + # If this is the only widget with the mnemonic (group_cycling is False), + # and the checkbox is not currently toggled, toggle the checkbox and + # then set the focus to the UID spinner + if not group_cycling and not widget.get_active(): + widget.set_active(True) + self._spinUid.grab_focus() + return True + + # Otherwise just use the default signal handler + return False + + def on_gid_mnemonic_activate(self, widget, group_cycling, user_data=None): + # Same as above, but for GID + if not group_cycling and not widget.get_active(): + widget.set_active(True) + self._spinGid.grab_focus() + return True + + return False + class UserSpoke(FirstbootSpokeMixIn, NormalSpoke, GUISpokeInputCheckHandler): builderObjects = ["userCreationWindow"]
@@ -642,4 +663,3 @@ def on_back_clicked(self, button):
if GUISpokeInputCheckHandler.on_back_clicked(self, button): NormalSpoke.on_back_clicked(self, button) -
Looks good to me.
Added label: ACK.
Pushed.
Closed.
anaconda-patches@lists.fedorahosted.org