[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 50db20df21dddbdb1b40ba59ea9e7bef02a2bcd5
Author: Chris Lamb <chris at chris-lamb.co.uk>
Date: Wed Mar 5 00:41:05 2008 +0000
Rework wizard building to new API.
Signed-off-by: Chris Lamb <chris at chris-lamb.co.uk>
diff --git a/DebianLive/utils/__init__.py b/DebianLive/utils/__init__.py
index 764dfe2..99aea2d 100644
--- a/DebianLive/utils/__init__.py
+++ b/DebianLive/utils/__init__.py
@@ -1,2 +1,8 @@
from sources_list import SourcesList
from list_observer import ListObserver
+
+import os.path
+import time
+
+def get_build_dir():
+ return os.path.expanduser('~/DebianLive/%s' % time.strftime('%Y-%m-%d-%H%M%S'))
diff --git a/LiveMagic/controllers/wizard.py b/LiveMagic/controllers/wizard.py
index 2731a7f..09e95ee 100644
--- a/LiveMagic/controllers/wizard.py
+++ b/LiveMagic/controllers/wizard.py
@@ -1,6 +1,6 @@
import gtk
-from LiveMagic import models
+from DebianLive import Config, utils
class WizardController(object):
@@ -9,11 +9,13 @@ class WizardController(object):
# Fill in data from model
data = self.view.get_wizard_completed_details()
- self.model.new()
- self.model.binary.LH_BINARY_IMAGES = [data['media']]
- self.model.bootstrap.LH_MIRROR_BOOTSTRAP = data['mirror']
- self.model.chroot.LH_PACKAGES_LISTS = data['desktop']
- self.model.bootstrap.LH_ARCHITECTURE = data['arch']
+ build_dir = utils.get_build_dir()
+
+ self.model = Config(build_dir)
+ self.model.binary['LH_BINARY_IMAGES'] = [data['media']]
+ self.model.bootstrap['LH_MIRROR_BOOTSTRAP'] = data['mirror']
+ self.model.chroot['LH_PACKAGES_LISTS'] = data['desktop']
+ self.model.bootstrap['LH_ARCHITECTURE'] = data['arch']
self.model.save()
self.view.do_dim_wizard()
@@ -27,6 +29,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()
--
GUI front-end for Debian Live.
More information about the debian-live-changes
mailing list