[PATCH 1/3] Add the User creation spoke including the Advanced dialog

Chris Lumens clumens at redhat.com
Tue Feb 12 21:14:09 UTC 2013

I hate commenting on glade files.

Please make sure you give every single button, entry, checkbox, combo
box, and the like a keyboard accelerator.  For things like entries where
you have a label next to it, you do this by giving the underline
character, checking "Use Underline", and then "Mnemonic widget..." and
select the entry.

You will also need to add all your new files to po/POTFILES.in.  I
really wish there were a better way to handle this, but I don't know
that there is.

Otherwise, glade stuff looks fine.  I can't believe I read all that.

> +    @property
> +    def status(self):
> +        if self._error:
> +            return _("Error creating user account: %s") % self._error

The status area on the hub isn't really long enough to display this much
text.  That's why we've been using the info bar along the bottom with
some sort of "Click for more details" approach, or directing the user
into the spoke before displaying the full error.

> +    def _validatePassword(self):
> +        """This method checks the password weakness and
> +        implements the Press Done twice logic. It is used from
> +        the on_back_clicked handler.
> +
> +        It also sets the self._error of the password is not
> +        sufficient or does not pass the pwquality checks.
> +
> +        :return: True if the password should be accepted, False otherwise
> +        :rtype: bool
> +
> +        """
> +
> +        # Do various steps to validate the password
> +        # sets self._error to an error string
> +        # Return True if valid, False otherwise
> +        self._error = False

I don't like how self._error can be None, False, or a string containing
the error message.  Seems like you could just skip the False bit.

Also just a couple general comments:

(1) Make sure you've got line wrap set on everything that could possibly
need it.  Some of those translations are pretty verbose.

(2) What happens to the add user spoke (and the root password spoke, for
that matter) if this is a kickstart install and the information is
already provided in the kickstart file?  I've not tried this.

(3) And then the reverse of that - if I fill in add user (and root
password), will those make it into /root/anaconda-ks.cfg?  I've not
tried this either.

- Chris

More information about the anaconda-patches mailing list