[Pkg-privacy-commits] [tails-installer] 32/70: Feature 9005: modify the GUI to cope with the UX suggested changes.
Ulrike Uhlig
ulrike at moszumanska.debian.org
Mon Nov 20 14:54:56 UTC 2017
This is an automated email from the git hooks/post-receive script.
ulrike pushed a commit to annotated tag tails-installer_4.20
in repository tails-installer.
commit da2f87e47b6bcb3c63346febf5d7d09b8cb802a5
Author: Tails developers <amnesia at boum.org>
Date: Tue Jul 19 18:41:18 2016 +0200
Feature 9005: modify the GUI to cope with the UX suggested changes.
---
data/tails-installer.ui | 4 ++--
tails_installer/gui.py | 30 +++++++++++++++++++-----------
2 files changed, 21 insertions(+), 13 deletions(-)
diff --git a/data/tails-installer.ui b/data/tails-installer.ui
index 711be44..7301fe1 100644
--- a/data/tails-installer.ui
+++ b/data/tails-installer.ui
@@ -178,7 +178,7 @@
<child>
<object class="GtkFileChooserButton" id="filechooserbutton_source_file">
<property name="visible">True</property>
- <property name="sensitive">False</property>
+ <property name="sensitive">True</property>
<property name="can_focus">False</property>
<signal name="file-set" handler="on_source_file_set" swapped="no"/>
</object>
@@ -342,7 +342,7 @@
<child>
<object class="GtkLinkButton" id="check_force_reinstall">
<property name="label" translatable="yes">Force reinstall</property>
- <property name="visible">True</property>
+ <property name="visible">False</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="margin_left">18</property>
diff --git a/tails_installer/gui.py b/tails_installer/gui.py
index 407c6c7..e62dc60 100755
--- a/tails_installer/gui.py
+++ b/tails_installer/gui.py
@@ -317,11 +317,11 @@ class TailsInstallerWindow(Gtk.ApplicationWindow):
# Inside tails
if is_running_from_tails():
self.opts.clone = True
- self.__box_source_file.set_visible(False)
# Outside
else:
self.opts.clone = False
- self.__box_source_select.set_visible(False)
+ self.__radio_button_source_device.set_visible(False)
+ self.__filechooserbutton_source_file.set_sensitive(True)
if self.opts.clone or config['download']['enabled']:
self.source_available = True
@@ -384,7 +384,7 @@ class TailsInstallerWindow(Gtk.ApplicationWindow):
self.__box_source = builder.get_object('box_source')
self.__box_source_select = builder.get_object('box_source_select')
self.__box_source_file = builder.get_object('box_source_file')
- self.__filechooserbutton_source_file = builder.get_object('liststore_source')
+ self.__filechooserbutton_source_file = builder.get_object('filechooserbutton_source_file')
self.__box_source_dl = builder.get_object('box_source_dl')
self.__liststore_source_dl = builder.get_object('liststore_source_dl')
self.__combobox_source_dl = builder.get_object('combobox_source_dl')
@@ -396,6 +396,7 @@ class TailsInstallerWindow(Gtk.ApplicationWindow):
self.__button_start = builder.get_object('button_start')
self.__radio_button_source_iso = builder.get_object('radio_button_source_iso')
self.__radio_button_source_device = builder.get_object('radio_button_source_device')
+ self.__button_force_reinstall = builder.get_object('check_force_reinstall')
self.add(self.__box_installer)
builder.connect_signals(self)
@@ -418,15 +419,17 @@ class TailsInstallerWindow(Gtk.ApplicationWindow):
def on_radio_changed(self, radio_button):
active_radio = [r for r in radio_button.get_group() if r.get_active()][0]
- if active_radio.get_label() == "Clone from current device":
+ if active_radio.get_label() == "Clone current Tails":
self.opts.clone = True
- self.__box_source_file.set_visible(False)
- elif active_radio.get_label() == "Clone from ISO":
+ #self.__box_source_file.set_visible(False)
+ self.__filechooserbutton_source_file.set_sensitive(False)
+ elif active_radio.get_label() == "Use existing Live system ISO":
self.opts.clone = False
- self.__box_source_file.set_visible(True)
+ self.__filechooserbutton_source_file.set_sensitive(False)
def on_force_reinstall_clicked(self, button):
- self.user_force_reinstall = True
+ self.force_reinstall = True
+ self.__button_force_reinstall.set_visible(False)
self.on_start_clicked(button)
def on_source_file_set(self, filechooserbutton):
@@ -440,10 +443,11 @@ class TailsInstallerWindow(Gtk.ApplicationWindow):
device = self.live.drives[drive]
# If device has not any valid recognized Tails partition
- # Just crate a new installation from scratch
+ # Just create a new installation from scratch
if not self.live.device_can_be_upgraded(device):
self.opts.partition = True
self.__button_start.set_label('Install Tails')
+ self.__button_force_reinstall.set_visible(False)
# If there is valid Tails partition
elif self.user_force_reinstall:
self.opts.partition = True
@@ -491,8 +495,10 @@ class TailsInstallerWindow(Gtk.ApplicationWindow):
def update_start_button(self):
if self.source_available and self.target_available:
self.__button_start.set_sensitive(True)
+ self.__button_force_reinstall.set_visible(True)
else:
self.__button_start.set_sensitive(False)
+ self.__button_force_reinstall.set_visible(False)
def populate_devices(self, *args, **kw):
if self.in_process or self.target_selected:
@@ -608,8 +614,10 @@ class TailsInstallerWindow(Gtk.ApplicationWindow):
self.in_process = not enabled
def get_selected_drive(self):
- drive = self.__liststore_target.get(
- self.__combobox_target.get_active_iter(), 1)[0]
+ drive = None
+ iter = self.__combobox_target.get_active_iter()
+ if iter != None:
+ drive = self.__liststore_target.get(iter, 1)[0]
if drive:
return _to_unicode(drive)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/tails-installer.git
More information about the Pkg-privacy-commits
mailing list