summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsegfault <segfault@riseup.net>2019-11-01 17:56:49 +0100
committersegfault <segfault@riseup.net>2019-11-02 14:29:16 +0100
commit67c1ce2bde4b486603590484770917246488c1c5 (patch)
treeea46ba2843907ed906cb6f204b990272c9543296
parent4b90ac7dfa0a129089d980675d735d431e9e020f (diff)
Remove unused code from Greeter
The "Relock Persistent Storage" button is never shown and the label says that Tails should be restarted to lock it again.
-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.py19
-rw-r--r--config/chroot_local-includes/usr/share/tails/greeter/main.ui.in13
3 files changed, 0 insertions, 36 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 992ed3d..99f8c25 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
@@ -319,10 +319,6 @@ class GreeterMainWindow(Gtk.Window, TranslatableWindow):
self.check_and_login()
return False
- def cb_button_storage_lock_clicked(self, widget, user_data=None):
- self.persistent_storage.lock()
- return False
-
def cb_button_storage_unlock_clicked(self, widget, user_data=None):
self.persistent_storage.unlock()
return False
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 df6c63f..fc77c7f 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
@@ -20,7 +20,6 @@ class PersistentStorage(object):
self.box_storage = builder.get_object('box_storage')
self.box_storage_unlock = builder.get_object('box_storage_unlock')
self.box_storage_unlocked = builder.get_object('box_storage_unlocked')
- 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')
@@ -48,24 +47,6 @@ class PersistentStorage(object):
# hide the whole thing for now.
self.box_storage.set_visible(False)
- def lock(self):
- 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)
- self.entry_storage_passphrase.set_visible(True)
- self.entry_storage_passphrase.set_sensitive(True)
- self.button_storage_unlock.set_visible(True)
- self.button_storage_unlock.set_sensitive(True)
- self.button_storage_unlock.set_label(_("Unlock"))
- else:
- self.label_infobar_persistence.set_label(
- _("Failed to relock persistent storage."))
- self.infobar_persistence.set_visible(True)
-
@staticmethod
def passphrase_changed(editable):
# Remove warning icon
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 346b200..a3b6884 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
@@ -422,19 +422,6 @@
<object class="GtkBox" id="box_storage_unlocked">
<property name="can_focus">False</property>
<child>
- <object class="GtkButton" id="button_storage_lock">
- <property name="label" translatable="yes">Relock Persistent Storage</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <signal name="clicked" handler="cb_button_storage_lock_clicked" swapped="no"/>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
<object class="GtkLabel" id="label_storage_unlocked">
<property name="visible">True</property>
<property name="can_focus">False</property>