#1-3 are all against RHEL7, but of those only #2 needs to go to rhel7-branch right now. I suppose the others could in the future. #4 fixes a pylint caught problem.
- Chris
Right align them, shorten a little bit, and break them into two lines for two sentences. --- pyanaconda/ui/gui/hubs/progress.glade | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/ui/gui/hubs/progress.glade b/pyanaconda/ui/gui/hubs/progress.glade index 46bad85..cd39e4c 100644 --- a/pyanaconda/ui/gui/hubs/progress.glade +++ b/pyanaconda/ui/gui/hubs/progress.glade @@ -129,7 +129,9 @@ <property name="visible">True</property> <property name="can_focus">False</property> <property name="halign">end</property> - <property name="label" translatable="yes">%s is now successfully installed on your system, but some configuration still needs to be done. Finish it and then click the Finish configuration button please.</property> + <property name="label" translatable="yes">%s is now successfully installed, but some configuration still needs to be done. +Finish it and then click the Finish configuration button please.</property> + <property name="justify">right</property> <property name="wrap">True</property> </object> <packing> @@ -181,7 +183,9 @@ <property name="visible">True</property> <property name="can_focus">False</property> <property name="halign">end</property> - <property name="label" translatable="yes">%s is now successfully installed on your system and ready for you to use! Go ahead and reboot to start using it!</property> + <property name="label" translatable="yes">%s is now successfully installed and ready for you to use! +Go ahead and reboot to start using it!</property> + <property name="justify">right</property> <property name="wrap">True</property> </object> <packing>
You're not going to set a passphrase later; it happens as the next thing every time.
Related: rhbz#1014671 --- pyanaconda/ui/gui/spokes/storage.glade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyanaconda/ui/gui/spokes/storage.glade b/pyanaconda/ui/gui/spokes/storage.glade index a916d62..cc73d2a 100644 --- a/pyanaconda/ui/gui/spokes/storage.glade +++ b/pyanaconda/ui/gui/spokes/storage.glade @@ -874,7 +874,7 @@ <object class="GtkLabel" id="label3"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="label" translatable="yes">You'll set a passphrase later.</property> + <property name="label" translatable="yes">You'll set a passphrase next.</property> <attributes> <attribute name="style" value="italic"/> <attribute name="foreground" value="#88888a8a8585"/>
This is the same idea as the root password spoke. --- pyanaconda/ui/gui/spokes/user.py | 8 +++++++- pyanaconda/ui/tui/spokes/user.py | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/user.py b/pyanaconda/ui/gui/spokes/user.py index 07d9012..aa9a04a 100644 --- a/pyanaconda/ui/gui/spokes/user.py +++ b/pyanaconda/ui/gui/spokes/user.py @@ -1,6 +1,6 @@ # User creation spoke # -# Copyright (C) 2013 Red Hat, Inc. +# Copyright (C) 2013-2014 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of @@ -17,10 +17,12 @@ # Red Hat, Inc. # # Red Hat Author(s): Martin Sivak msivak@redhat.com +# Chris Lumens clumens@redhat.com #
import re
+from pyanaconda.flags import flags from pyanaconda.i18n import _, CN_ from pyanaconda.users import cryptPassword, validatePassword, guess_username
@@ -392,6 +394,10 @@ class UserSpoke(FirstbootSpokeMixIn, NormalSpoke, GUISpokeInputCheckHandler): self.data.user.userList.remove(self._user)
@property + def showable(self): + return not (self.completed and flags.automatedInstall) + + @property def completed(self): return len(self.data.user.userList) > 0
diff --git a/pyanaconda/ui/tui/spokes/user.py b/pyanaconda/ui/tui/spokes/user.py index 8cc96ac..f069eec 100644 --- a/pyanaconda/ui/tui/spokes/user.py +++ b/pyanaconda/ui/tui/spokes/user.py @@ -1,6 +1,6 @@ # User creation text spoke # -# Copyright (C) 2013 Red Hat, Inc. +# Copyright (C) 2013-2014 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of @@ -17,12 +17,14 @@ # Red Hat, Inc. # # Red Hat Author(s): Martin Sivak msivak@redhat.com +# Chris Lumens clumens@redhat.com #
from pyanaconda.ui.tui.spokes import EditTUISpoke from pyanaconda.ui.tui.spokes import EditTUISpokeEntry as Entry from pyanaconda.ui.common import FirstbootSpokeMixIn from pyanaconda.users import guess_username +from pyanaconda.flags import flags from pyanaconda.i18n import N_, _ from pykickstart.constants import FIRSTBOOT_RECONFIG from pyanaconda.constants import ANACONDA_ENVIRON, FIRSTBOOT_ENVIRON @@ -95,6 +97,10 @@ class UserSpoke(FirstbootSpokeMixIn, EditTUISpoke): return False
@property + def showable(self): + return not (self.completed and flags.automatedInstall) + + @property def mandatory(self): """ Only mandatory if root account is disabled. """ return not bool(self.data.rootpw.password) or self.data.rootpw.lock
I'm a bit worried about the Progress hub looking really weird if there are no spokes. Maybe we could make the Users spoke more versatile to allow creation of multiple users and leave it there? The very basic idea would be having a "Add another user" button that would create a new tab in the GtkNotebook where the current content of the spoke would be put into. Does that make sense? (I could do it if we want to do it)
I'm a bit worried about the Progress hub looking really weird if there are no spokes.
Yeah, this had crossed my mind too.
Maybe we could make the Users spoke more versatile to allow creation of multiple users and leave it there? The very basic idea would be having a "Add another user" button that would create a new tab in the GtkNotebook where the current content of the spoke would be put into. Does that make sense? (I could do it if we want to do it)
We certainly could do it, but it doesn't solve this bug. In the bug report, basically they do not want whoever's doing the install to be able to override the user settings in the kickstart file. So I think whether we want to allow creation of multiple users is a separate issue.
Now that I think about it, perhaps the solution for both this bug and the similar root password one from earlier is to make them visible but insensitive. That way there's stuff displayed on the screen so it won't look weird, but the person installing can't do anything about it.
I can't believe it took me that long to come up with that.
- Chris
However, we still show the spoke in an insensitive state since removing all spokes from the progress hub might look pretty weird. This also redoes the root password spoke fix from #1041405 to make it insensitive instead of hidden too.
Note: Nothing should be required for the text UI here. The password and user spokes get sorted to the end of the list always. This will require changing on rhel7-branch. --- pyanaconda/ui/common.py | 15 ++++++++++++++- pyanaconda/ui/gui/hubs/__init__.py | 2 +- pyanaconda/ui/gui/spokes/password.py | 2 +- pyanaconda/ui/gui/spokes/user.py | 8 +++++++- pyanaconda/ui/tui/spokes/user.py | 8 +++++++- 5 files changed, 30 insertions(+), 5 deletions(-)
diff --git a/pyanaconda/ui/common.py b/pyanaconda/ui/common.py index 63a7afc..96ac3c8 100644 --- a/pyanaconda/ui/common.py +++ b/pyanaconda/ui/common.py @@ -1,6 +1,6 @@ # Common classes for user interface # -# Copyright (C) 2012 Red Hat, Inc. +# Copyright (C) 2012-2014 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of @@ -282,6 +282,19 @@ class Spoke(UIObject): return False
@property + def sensitive(self): + """May the user click on this spoke's selector and be taken to the spoke? + This is different from the showable property. A spoke that is not + sensitive will still be shown on the hub, but the user may not enter it. + This is also different from the ready property. A spoke that is not + ready may not be entered, but the spoke may become ready in the future. + A spoke that is not sensitive will likely not become so. + + Most spokes will not want to override this method. + """ + return True + + @property def mandatory(self): """Mark this spoke as mandatory. Installation will not be allowed to proceed until all mandatory spokes are complete. diff --git a/pyanaconda/ui/gui/hubs/__init__.py b/pyanaconda/ui/gui/hubs/__init__.py index ecccffc..e0f4d13 100644 --- a/pyanaconda/ui/gui/hubs/__init__.py +++ b/pyanaconda/ui/gui/hubs/__init__.py @@ -259,7 +259,7 @@ class Hub(GUIObject, common.Hub): setViewportBackground(viewport)
def _updateCompleteness(self, spoke, update_continue=True): - spoke.selector.set_sensitive(spoke.ready) + spoke.selector.set_sensitive(spoke.sensitive and spoke.ready) spoke.selector.set_property("status", spoke.status) spoke.selector.set_tooltip_markup(escape_markup(spoke.status)) spoke.selector.set_incomplete(not spoke.completed and spoke.mandatory) diff --git a/pyanaconda/ui/gui/spokes/password.py b/pyanaconda/ui/gui/spokes/password.py index 1ef7a0b..bedefb5 100644 --- a/pyanaconda/ui/gui/spokes/password.py +++ b/pyanaconda/ui/gui/spokes/password.py @@ -144,7 +144,7 @@ class PasswordSpoke(FirstbootSpokeMixIn, NormalSpoke, GUISpokeInputCheckHandler) return bool(self.data.rootpw.password or self.data.rootpw.lock)
@property - def showable(self): + def sensitive(self): return not (self.completed and flags.automatedInstall)
def _checkPasswordEmpty(self, inputcheck): diff --git a/pyanaconda/ui/gui/spokes/user.py b/pyanaconda/ui/gui/spokes/user.py index 07d9012..65c074b 100644 --- a/pyanaconda/ui/gui/spokes/user.py +++ b/pyanaconda/ui/gui/spokes/user.py @@ -1,6 +1,6 @@ # User creation spoke # -# Copyright (C) 2013 Red Hat, Inc. +# Copyright (C) 2013-2014 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of @@ -17,10 +17,12 @@ # Red Hat, Inc. # # Red Hat Author(s): Martin Sivak msivak@redhat.com +# Chris Lumens clumens@redhat.com #
import re
+from pyanaconda.flags import flags from pyanaconda.i18n import _, CN_ from pyanaconda.users import cryptPassword, validatePassword, guess_username
@@ -392,6 +394,10 @@ class UserSpoke(FirstbootSpokeMixIn, NormalSpoke, GUISpokeInputCheckHandler): self.data.user.userList.remove(self._user)
@property + def sensitive(self): + return not (self.completed and flags.automatedInstall) + + @property def completed(self): return len(self.data.user.userList) > 0
diff --git a/pyanaconda/ui/tui/spokes/user.py b/pyanaconda/ui/tui/spokes/user.py index 8cc96ac..f069eec 100644 --- a/pyanaconda/ui/tui/spokes/user.py +++ b/pyanaconda/ui/tui/spokes/user.py @@ -1,6 +1,6 @@ # User creation text spoke # -# Copyright (C) 2013 Red Hat, Inc. +# Copyright (C) 2013-2014 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of @@ -17,12 +17,14 @@ # Red Hat, Inc. # # Red Hat Author(s): Martin Sivak msivak@redhat.com +# Chris Lumens clumens@redhat.com #
from pyanaconda.ui.tui.spokes import EditTUISpoke from pyanaconda.ui.tui.spokes import EditTUISpokeEntry as Entry from pyanaconda.ui.common import FirstbootSpokeMixIn from pyanaconda.users import guess_username +from pyanaconda.flags import flags from pyanaconda.i18n import N_, _ from pykickstart.constants import FIRSTBOOT_RECONFIG from pyanaconda.constants import ANACONDA_ENVIRON, FIRSTBOOT_ENVIRON @@ -95,6 +97,10 @@ class UserSpoke(FirstbootSpokeMixIn, EditTUISpoke): return False
@property + def showable(self): + return not (self.completed and flags.automatedInstall) + + @property def mandatory(self): """ Only mandatory if root account is disabled. """ return not bool(self.data.rootpw.password) or self.data.rootpw.lock
On Fri, 2014-01-31 at 14:46 -0500, Chris Lumens wrote:
However, we still show the spoke in an insensitive state since removing all spokes from the progress hub might look pretty weird. This also redoes the root password spoke fix from #1041405 to make it insensitive instead of hidden too.
Note: Nothing should be required for the text UI here. The password and user spokes get sorted to the end of the list always. This will require changing on rhel7-branch.
pyanaconda/ui/common.py | 15 ++++++++++++++- pyanaconda/ui/gui/hubs/__init__.py | 2 +- pyanaconda/ui/gui/spokes/password.py | 2 +- pyanaconda/ui/gui/spokes/user.py | 8 +++++++- pyanaconda/ui/tui/spokes/user.py | 8 +++++++- 5 files changed, 30 insertions(+), 5 deletions(-)
diff --git a/pyanaconda/ui/common.py b/pyanaconda/ui/common.py index 63a7afc..96ac3c8 100644 --- a/pyanaconda/ui/common.py +++ b/pyanaconda/ui/common.py @@ -1,6 +1,6 @@ # Common classes for user interface # -# Copyright (C) 2012 Red Hat, Inc. +# Copyright (C) 2012-2014 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of @@ -282,6 +282,19 @@ class Spoke(UIObject): return False
@property
- def sensitive(self):
"""May the user click on this spoke's selector and be taken to the spoke?This is different from the showable property. A spoke that is notsensitive will still be shown on the hub, but the user may not enter it.This is also different from the ready property. A spoke that is notready may not be entered, but the spoke may become ready in the future.A spoke that is not sensitive will likely not become so.Most spokes will not want to override this method."""return True- @property def mandatory(self): """Mark this spoke as mandatory. Installation will not be allowed to proceed until all mandatory spokes are complete.
diff --git a/pyanaconda/ui/gui/hubs/__init__.py b/pyanaconda/ui/gui/hubs/__init__.py index ecccffc..e0f4d13 100644 --- a/pyanaconda/ui/gui/hubs/__init__.py +++ b/pyanaconda/ui/gui/hubs/__init__.py @@ -259,7 +259,7 @@ class Hub(GUIObject, common.Hub): setViewportBackground(viewport)
def _updateCompleteness(self, spoke, update_continue=True):
spoke.selector.set_sensitive(spoke.ready)
spoke.selector.set_sensitive(spoke.sensitive and spoke.ready) spoke.selector.set_property("status", spoke.status) spoke.selector.set_tooltip_markup(escape_markup(spoke.status)) spoke.selector.set_incomplete(not spoke.completed and spoke.mandatory)diff --git a/pyanaconda/ui/gui/spokes/password.py b/pyanaconda/ui/gui/spokes/password.py index 1ef7a0b..bedefb5 100644 --- a/pyanaconda/ui/gui/spokes/password.py +++ b/pyanaconda/ui/gui/spokes/password.py @@ -144,7 +144,7 @@ class PasswordSpoke(FirstbootSpokeMixIn, NormalSpoke, GUISpokeInputCheckHandler) return bool(self.data.rootpw.password or self.data.rootpw.lock)
@property
- def showable(self):
def sensitive(self): return not (self.completed and flags.automatedInstall)
def _checkPasswordEmpty(self, inputcheck):
diff --git a/pyanaconda/ui/gui/spokes/user.py b/pyanaconda/ui/gui/spokes/user.py index 07d9012..65c074b 100644 --- a/pyanaconda/ui/gui/spokes/user.py +++ b/pyanaconda/ui/gui/spokes/user.py @@ -1,6 +1,6 @@ # User creation spoke # -# Copyright (C) 2013 Red Hat, Inc. +# Copyright (C) 2013-2014 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of @@ -17,10 +17,12 @@ # Red Hat, Inc. # # Red Hat Author(s): Martin Sivak msivak@redhat.com +# Chris Lumens clumens@redhat.com #
import re
+from pyanaconda.flags import flags from pyanaconda.i18n import _, CN_ from pyanaconda.users import cryptPassword, validatePassword, guess_username
@@ -392,6 +394,10 @@ class UserSpoke(FirstbootSpokeMixIn, NormalSpoke, GUISpokeInputCheckHandler): self.data.user.userList.remove(self._user)
@property
- def sensitive(self):
return not (self.completed and flags.automatedInstall)- @property def completed(self): return len(self.data.user.userList) > 0
diff --git a/pyanaconda/ui/tui/spokes/user.py b/pyanaconda/ui/tui/spokes/user.py index 8cc96ac..f069eec 100644 --- a/pyanaconda/ui/tui/spokes/user.py +++ b/pyanaconda/ui/tui/spokes/user.py @@ -1,6 +1,6 @@ # User creation text spoke # -# Copyright (C) 2013 Red Hat, Inc. +# Copyright (C) 2013-2014 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of @@ -17,12 +17,14 @@ # Red Hat, Inc. # # Red Hat Author(s): Martin Sivak msivak@redhat.com +# Chris Lumens clumens@redhat.com #
from pyanaconda.ui.tui.spokes import EditTUISpoke from pyanaconda.ui.tui.spokes import EditTUISpokeEntry as Entry from pyanaconda.ui.common import FirstbootSpokeMixIn from pyanaconda.users import guess_username +from pyanaconda.flags import flags from pyanaconda.i18n import N_, _ from pykickstart.constants import FIRSTBOOT_RECONFIG from pyanaconda.constants import ANACONDA_ENVIRON, FIRSTBOOT_ENVIRON @@ -95,6 +97,10 @@ class UserSpoke(FirstbootSpokeMixIn, EditTUISpoke): return False
@property
- def showable(self):
return not (self.completed and flags.automatedInstall)- @property def mandatory(self): """ Only mandatory if root account is disabled. """ return not bool(self.data.rootpw.password) or self.data.rootpw.lock
This should be better. Let me just check it doesn't break the Initial Setup.
--- anaconda | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/anaconda b/anaconda index c1ed412..c87d750 100755 --- a/anaconda +++ b/anaconda @@ -53,8 +53,8 @@ def exitHandler(rebootData, storage, exitCode=None): anaconda.storage.umountFilesystems(ignoreErrors=True, swapoff=False) devicetree = anaconda.storage.devicetree devicetree.teardownAll() - for name in devicetree.diskImages: - dev = devicetree.getDeviceByName(name) + for imageName in devicetree.diskImages: + dev = devicetree.getDeviceByName(imageName) for loop in dev.parents: loop.controllable = True dev.deactivate(recursive=True)
On 01/30/2014 03:20 PM, Chris Lumens wrote:
#1-3 are all against RHEL7, but of those only #2 needs to go to rhel7-branch right now. I suppose the others could in the future. #4 fixes a pylint caught problem.
- Chris
anaconda-patches mailing list anaconda-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
These all look fine
anaconda-patches@lists.fedorahosted.org