diff options
author | Martin Sivak <msivak@redhat.com> | 2008-04-22 19:16:52 +0200 |
---|---|---|
committer | Martin Sivak <msivak@redhat.com> | 2008-04-22 19:16:52 +0200 |
commit | 23e5e69d30fef1b02aa7b176f44875c09c2ed1dc (patch) | |
tree | 8e6165b2c73bcbc947b810fb133d8be0720ced04 /frontend/main.py | |
parent | 43cb2727dcc19f102d54418cbba1887cb916b5e4 (diff) | |
download | firstaidkit-23e5e69d30fef1b02aa7b176f44875c09c2ed1dc.tar.gz firstaidkit-23e5e69d30fef1b02aa7b176f44875c09c2ed1dc.tar.xz firstaidkit-23e5e69d30fef1b02aa7b176f44875c09c2ed1dc.zip |
Expert page works and all pages have better flag handling
Diffstat (limited to 'frontend/main.py')
-rw-r--r-- | frontend/main.py | 44 |
1 files changed, 41 insertions, 3 deletions
diff --git a/frontend/main.py b/frontend/main.py index 899e331..f27dec6 100644 --- a/frontend/main.py +++ b/frontend/main.py @@ -129,7 +129,7 @@ class CallbacksMainWindow(object): except KeyError, e: pass - self._cfg.operation.flags = '"'+'" "'.join(flags)+'"' + self._cfg.operation.flags = " ".join(map(lambda x: x.encode("string-escape"), flags)) self.execute() return True @@ -174,7 +174,7 @@ class CallbacksMainWindow(object): else: self._cfg.operation.dependencies = "False" - self._cfg.operation.flags = '"'+'" "'.join(flags)+'"' + self._cfg.operation.flags = " ".join(map(lambda x: x.encode("string-escape"), flags)) self.execute() return True @@ -191,6 +191,44 @@ class CallbacksMainWindow(object): def on_b_StartExpert_activate(self, widget, *args): print "on_b_StartExpert_activate" + #check verbose + if self._glade.get_widget("check_Expert_Verbose").get_active(): + self._cfg.operation.verbose = "True" + else: + self._cfg.operation.verbose = "False" + + #check interactive + if self._glade.get_widget("check_Expert_Interactive").get_active(): + self._cfg.operation.interactive = "True" + else: + self._cfg.operation.interactive = "False" + + #check dependency + if self._glade.get_widget("check_Expert_Dependency").get_active(): + self._cfg.operation.dependencies = "True" + else: + self._cfg.operation.dependencies = "False" + + #get the plugin & flow list + plugins = [] + flows = [] + + for pname,iter in self._data.plugin_iter.iteritems(): + childiter = self._data.plugin_list_store.iter_children(iter) + while childiter is not None: + if self._data.plugin_list_store.get_value(childiter, 0): #checkbox is checked + plugins.append(pname) + flows.append(self._data.plugin_list_store.get_value(childiter, 1)) + childiter = self._data.plugin_list_store.iter_next(childiter) + + plugins = map(lambda x: x.encode("string-escape"), plugins) + flows = map(lambda x: x.encode("string-escape"), flows) + + #set the flow mode + self._cfg.operation.mode = "flow" + self._cfg.operation.flow = " ".join(flows) + self._cfg.operation.plugin = " ".join(plugins) + self.execute() return True @@ -220,7 +258,7 @@ class CallbacksFlagList(object): if len(f)==0: self._cfg.operation.flags = "" else: - self._cfg.operation.flags = '"'+'" "'.join(f)+'"' + self._cfg.operation.flags = " ".join(map(lambda x: x.encode("string-escape"), f)) self._dialog.destroy() return True |