Commit c7849575 authored by intrigeri's avatar intrigeri

Drop patch: included in tails-persistence-setup 2.2.0-1 (#15102).

parent 65de0e1a
diff --git a/usr/share/perl5/Tails/Persistence/Configuration/ConfigFile.pm b/usr/share/perl5/Tails/Persistence/Configuration/ConfigFile.pm
index 6fc63eb..73dae86 100644
--- a/usr/share/perl5/Tails/Persistence/Configuration/ConfigFile.pm
+++ b/usr/share/perl5/Tails/Persistence/Configuration/ConfigFile.pm
@@ -98,6 +98,7 @@ method backup () {
$self->backup_config_file_path->chmod(0600);
# Ensure our changes land on the disk
systemx('sync', $self->backup_config_file_path->stringify);
+ systemx('sync', $self->backup_config_file_path->parent->stringify);
# Ensure changes made elsewhere are written synchronously on the disk
# (in case something else ever needs to modify this file)
systemx('chattr', '+S', $self->backup_config_file_path->stringify);
@@ -116,6 +117,7 @@ method save () {
$self->config_file_path->chmod(0600);
# Ensure our changes land on the disk
systemx('sync', $self->config_file_path->stringify);
+ systemx('sync', $self->config_file_path->parent->stringify);
# Ensure changes made by other code (e.g. live-persist) are written
# synchronously on the disk
systemx('chattr', '+S', $self->config_file_path->stringify);
diff --git a/usr/share/perl5/Tails/Persistence/Step/Bootstrap.pm b/usr/share/perl5/Tails/Persistence/Step/Bootstrap.pm
index 3236887..da84f4b 100644
--- a/usr/share/perl5/Tails/Persistence/Step/Bootstrap.pm
+++ b/usr/share/perl5/Tails/Persistence/Step/Bootstrap.pm
@@ -80,6 +80,12 @@ foreach (qw{mount_persistence_partition_cb create_configuration_cb}) {
);
}
+has 'passphrase_check_button' => (
+ lazy_build => 1,
+ is => 'rw',
+ isa => 'Gtk3::CheckButton',
+);
+
=head1 CONSTRUCTORS
@@ -110,6 +116,9 @@ method _build_main_widget () {
$box->pack_start($self->subtitle, FALSE, FALSE, 0);
$box->pack_start($self->description, FALSE, FALSE, 0);
+ my $show_passphrase_box = Gtk3::Box->new('GTK_ORIENTATION_HORIZONTAL', 0);
+ $show_passphrase_box->pack_end($self->passphrase_check_button, FALSE, FALSE, 0);
+ $box->add($show_passphrase_box);
my $passphrase_box = Gtk3::VBox->new(FALSE, 6);
$passphrase_box->set_spacing(6);
$passphrase_box->pack_start($self->table_alignment, FALSE, FALSE, 0);
@@ -219,6 +228,18 @@ method _build_table () {
return $table;
}
+method _build_passphrase_check_button () {
+ my $check_button = Gtk3::CheckButton->new_with_label(
+ $self->encoding->decode(gettext(q{Show Passphrase}))
+ );
+ $check_button->set_active(FALSE);
+ $check_button->signal_connect(
+ toggled => sub { $self->passphrase_check_button_toggled }
+ );
+
+ return $check_button;
+}
+
=head1 METHODS
@@ -259,6 +280,13 @@ method passphrase_entry_changed () {
$self->update_passphrase_ui;
}
+method passphrase_check_button_toggled () {
+ my $show_passphrase_op = $self->passphrase_check_button->get_active;
+ foreach my $entry ($self->passphrase_entry, $self->verify_passphrase_entry) {
+ $entry->set_visibility($show_passphrase_op);
+ }
+}
+
method operation_finished (HashRef $replies) {
my ($created_device, $error);
@@ -327,7 +355,7 @@ method operation_finished (HashRef $replies) {
}
method go_button_pressed () {
- $_->hide foreach ($self->intro, $self->warning_area, $self->table);
+ $_->hide foreach ($self->intro, $self->warning_area, $self->table,$self->passphrase_check_button);
$self->working(1);
$self->subtitle->set_text(
$self->encoding->decode(gettext(q{Creating...})),
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment