summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsegfault <segfault@riseup.net>2019-11-01 17:46:12 +0100
committersegfault <segfault@riseup.net>2019-11-02 14:29:05 +0100
commitd99e22bc7734e35936e19e543094ccb3e2bbe481 (patch)
tree55f2b9bfb217d9bb34f96035633e957ce800a617
parent82a68b7b9b897d80c028b5189fe730995fa5965f (diff)
Bring back the "Show Passphrase" button in the Greeter (refs: #17177)
-rw-r--r--config/chroot_local-includes/usr/lib/python3/dist-packages/tailsgreeter/ui/main_window.py4
-rw-r--r--config/chroot_local-includes/usr/lib/python3/dist-packages/tailsgreeter/ui/persistent_storage.py16
-rw-r--r--config/chroot_local-includes/usr/share/tails/greeter/main.ui.in16
3 files changed, 32 insertions, 4 deletions
diff --git a/config/chroot_local-includes/usr/lib/python3/dist-packages/tailsgreeter/ui/main_window.py b/config/chroot_local-includes/usr/lib/python3/dist-packages/tailsgreeter/ui/main_window.py
index 321116b..6cb8ec5 100644
--- a/config/chroot_local-includes/usr/lib/python3/dist-packages/tailsgreeter/ui/main_window.py
+++ b/config/chroot_local-includes/usr/lib/python3/dist-packages/tailsgreeter/ui/main_window.py
@@ -189,10 +189,6 @@ class GreeterMainWindow(Gtk.Window, TranslatableWindow):
self.box_language.set_focus_chain([
self.frame_language,
self.box_language_header])
- self.box_storage.set_focus_chain([
- self.box_storage_unlock,
- self.box_storage_unlocked,
- self.button_storage_configure])
self.box_settings.set_focus_chain([
self.box_settings_values,
self.box_settings_header])
diff --git a/config/chroot_local-includes/usr/lib/python3/dist-packages/tailsgreeter/ui/persistent_storage.py b/config/chroot_local-includes/usr/lib/python3/dist-packages/tailsgreeter/ui/persistent_storage.py
index 7daddef..3e848ae 100644
--- a/config/chroot_local-includes/usr/lib/python3/dist-packages/tailsgreeter/ui/persistent_storage.py
+++ b/config/chroot_local-includes/usr/lib/python3/dist-packages/tailsgreeter/ui/persistent_storage.py
@@ -23,15 +23,25 @@ class PersistentStorage(object):
self.button_storage_configure = builder.get_object('button_storage_configure')
self.button_storage_lock = builder.get_object('button_storage_lock')
self.button_storage_unlock = builder.get_object('button_storage_unlock')
+ self.checkbutton_storage_show_passphrase = builder.get_object('checkbutton_storage_show_passphrase')
self.entry_storage_passphrase = builder.get_object('entry_storage_passphrase')
self.image_storage_state = builder.get_object('image_storage_state')
self.infobar_persistence = builder.get_object('infobar_persistence')
self.label_infobar_persistence = builder.get_object('label_infobar_persistence')
self.spinner_storage_unlock = builder.get_object('spinner_storage_unlock')
+ self.checkbutton_storage_show_passphrase.connect('toggled', self.cb_checkbutton_storage_show_passphrase_toggled)
+
+ self.box_storage.set_focus_chain([
+ self.box_storage_unlock,
+ self.box_storage_unlocked,
+ self.button_storage_configure,
+ self.checkbutton_storage_show_passphrase])
+
if self.persistence_setting.has_persistence():
self.button_storage_configure.set_visible(False)
self.box_storage_unlock.set_visible(True)
+ self.checkbutton_storage_show_passphrase.set_visible(True)
self.image_storage_state.set_visible(True)
self.entry_storage_passphrase.set_visible(True)
self.spinner_storage_unlock.set_visible(False)
@@ -50,6 +60,7 @@ class PersistentStorage(object):
if self.persistence_setting.lock():
self.button_storage_lock.set_visible(False)
self.box_storage_unlock.set_visible(True)
+ self.checkbutton_storage_show_passphrase.set_visible(True)
self.image_storage_state.set_visible(True)
self.image_storage_state.set_from_icon_name(
'tails-locked', Gtk.IconSize.BUTTON)
@@ -77,6 +88,7 @@ class PersistentStorage(object):
self.entry_storage_passphrase.set_sensitive(False)
self.button_storage_unlock.set_sensitive(False)
self.button_storage_unlock.set_label(_("Unlocking…"))
+ self.checkbutton_storage_show_passphrase.set_visible(False)
self.image_storage_state.set_visible(False)
self.spinner_storage_unlock.set_visible(True)
@@ -105,6 +117,7 @@ class PersistentStorage(object):
self.entry_storage_passphrase.set_sensitive(True)
self.button_storage_unlock.set_sensitive(True)
self.button_storage_unlock.set_label(_("Unlock"))
+ self.checkbutton_storage_show_passphrase.set_visible(True)
self.image_storage_state.set_visible(True)
self.spinner_storage_unlock.set_visible(False)
self.label_infobar_persistence.set_label(
@@ -126,3 +139,6 @@ class PersistentStorage(object):
Gtk.IconSize.BUTTON)
self.image_storage_state.set_visible(True)
self.box_storage_unlocked.set_visible(True)
+
+ def cb_checkbutton_storage_show_passphrase_toggled(self, widget):
+ self.entry_storage_passphrase.set_visibility(widget.get_active())
diff --git a/config/chroot_local-includes/usr/share/tails/greeter/main.ui.in b/config/chroot_local-includes/usr/share/tails/greeter/main.ui.in
index 2a058a2..67216cb 100644
--- a/config/chroot_local-includes/usr/share/tails/greeter/main.ui.in
+++ b/config/chroot_local-includes/usr/share/tails/greeter/main.ui.in
@@ -322,6 +322,22 @@
</packing>
</child>
<child>
+ <object class="GtkCheckButton" id="checkbutton_storage_show_passphrase">
+ <property name="label" translatable="yes">Show Passphrase</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled" handler="cb_checkbutton_storage_show_passphrase_toggled" swapped="no"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child>
<object class="GtkLinkButton" id="linkbutton_storage_help">
<property name="visible">False</property>
<property name="can_focus">True</property>