[PATCH 4/7] Add a dialog for collecting a passphrase for newly encrypted devices.

Chris Lumens clumens at redhat.com
Mon Oct 8 20:45:22 UTC 2012


>  pyanaconda/ui/gui/spokes/lib/passphrase.glade |  230 +++++++++++++++++++++++++
>  pyanaconda/ui/gui/spokes/lib/passphrase.py    |  177 +++++++++++++++++++

Remember to add these files to po/POTFILES.in or their strings will
never get translated.

For UI consistency, I recommend the following:

(1) passphrase_dialog_title_label be bold and have xalign = 0.0.

(2) passphrase_description_label have xalign = 0.0.

(3) passphrase_cancel_button have halign = end.

> +warning_label_template = _("Warning: You current keyboard layout is <b>%s</b>."
                                           ^

Typo.

> +        # disable input methods for the passphrase Entry widgets and make sure
> +        # the focus change mask is enabled
> +        self._passphrase_entry = self.builder.get_object("passphrase_entry")
> +        self._passphrase_entry.set_property("im-module", "")
> +        self._passphrase_entry.set_icon_from_stock(Gtk.EntryIconPosition.SECONDARY, "")
> +        self._passphrase_entry.add_events(Gdk.EventMask.FOCUS_CHANGE_MASK)
> +        self._confirm_entry = self.builder.get_object("confirm_entry")
> +        self._confirm_entry.set_property("im-module", "")
> +        self._confirm_entry.add_events(Gdk.EventMask.FOCUS_CHANGE_MASK)
> +
> +        self._save_button = self.builder.get_object("passphrase_save_button")
> +
> +        # add the passphrase strength meter
> +        self._strength_bar = Gtk.LevelBar()
> +        self._strength_bar.set_mode(Gtk.LevelBarMode.DISCRETE)
> +        self._strength_bar.set_min_value(0)
> +        self._strength_bar.set_max_value(4)
> +        box = self.builder.get_object("strength_box")
> +        box.pack_start(self._strength_bar, False, True, 0)
> +        box.show_all()
> +        self._strength_label = self.builder.get_object("strength_label")

It's distressing to see this much UI code that glade appears unable to
handle.

- Chris


More information about the anaconda-patches mailing list