[SCM] GUI front-end for Debian Live. branch, master, updated. 50db20df21dddbdb1b40ba59ea9e7bef02a2bcd5
Chris Lamb
chris at chris-lamb.co.uk
Wed Mar 5 00:41:20 UTC 2008
The following commit has been merged in the master branch:
commit ca08773555e39d5f32c93292953c0826d23cd56c
Author: Chris Lamb <chris at chris-lamb.co.uk>
Date: Wed Mar 5 00:40:07 2008 +0000
Prompt for confirmation when exiting the wizard.
Signed-off-by: Chris Lamb <chris at chris-lamb.co.uk>
diff --git a/LiveMagic/controllers/wizard.py b/LiveMagic/controllers/wizard.py
index 2731a7f..ed56247 100644
--- a/LiveMagic/controllers/wizard.py
+++ b/LiveMagic/controllers/wizard.py
@@ -27,6 +27,10 @@ class WizardController(object):
gtk.main_quit()
def get_suggested_mirror(self):
- s = models.SourcesList()
+ s = utils.SourcesList()
return s.get_mirror()
+ def on_wizard_cancel(self, *args):
+ ret = self.view.do_show_wizard_cancel_confirm_window()
+ if ret:
+ gtk.main_quit()
diff --git a/LiveMagic/views/wizard.py b/LiveMagic/views/wizard.py
index ddb586e..1f4080c 100644
--- a/LiveMagic/views/wizard.py
+++ b/LiveMagic/views/wizard.py
@@ -71,3 +71,15 @@ class WizardView(object):
'arch' : get_active('radio_architecture_i386'),
'mirror' : self['combobox_mirror'].get_active_text()
}
+
+ def do_show_wizard_cancel_confirm_window(self):
+ dialog = gtk.MessageDialog(
+ parent=self.asst,
+ flags=gtk.DIALOG_MODAL,
+ type=gtk.MESSAGE_QUESTION,
+ buttons=gtk.BUTTONS_YES_NO,
+ message_format="Are you sure you wish to cancel?");
+
+ res = dialog.run()
+ dialog.destroy()
+ return res == gtk.RESPONSE_YES
--
GUI front-end for Debian Live.
More information about the debian-live-changes
mailing list