summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTails developers <tails@boum.org>2013-09-21 16:25:48 +0000
committerTails developers <tails@boum.org>2013-09-21 16:27:25 +0000
commitf8a89722240ba939d64f2589a4610a938b161724 (patch)
tree4020fa32164446239b012bf7199885fdfb3f7b95
parentbe55449597ec2177b61e8df9008429a429a3b73a (diff)
Display a dialog instead the confirmation line in the logsfeature/confirmation_dialog
-rwxr-xr-xliveusb/gui.py20
1 files changed, 13 insertions, 7 deletions
diff --git a/liveusb/gui.py b/liveusb/gui.py
index 1d61c47..ff51a4d 100755
--- a/liveusb/gui.py
+++ b/liveusb/gui.py
@@ -674,13 +674,19 @@ class LiveUSBDialog(QtGui.QDialog, LiveUSBInterface):
if self.opts.partition:
if not self.confirmed:
- self.status(_("Warning: All data on the selected drive will "
- "be lost."))
- self.status(_("Press 'Next' if you wish to continue."))
- self.confirmed = True
- self.startButton.setText(_("Next"))
- self.enable_widgets(True)
- return
+ # Display a confirmation dialog
+ reply = QtGui.QMessageBox.question(self,
+ _("Please confirm your device selection"),
+ _("You are going to install Tails on the device %s %s (%s). Continue?") %
+ (self.live.drive['vendor'], self.live.drive['model'], self.live.drive['size']),
+ QtGui.QMessageBox.Yes | QtGui.QMessageBox.No,
+ QtGui.QMessageBox.No)
+ if (reply == QtGui.QMessageBox.Yes):
+ self.confirmed = True
+ else:
+ self.target_selected = None
+ self.enable_widgets(True)
+ return
else:
# The user has confirmed that they wish to partition their device,
# let's go on