in develoment version from git :
$ git show
commit 30b554aa355bfde2d69a30304c3fce3e430481ed
Try save or loading task settings produce nothing.
It seems to be due to missing "self.gui" member inisde plugin module StatusManager.py, in class :
class StatusManager(pycam.Plugins.PluginBase):
CATEGORIES = ["System"]
UI_FILE = "StatusManager.ui"
def setup(self):
self._types = {}
self.settings = EventCore()
if self.gui:
# autoload task settings file on startup
autoload_enable = self.gui.get_object("AutoLoadTaskFile")
autoload_box = self.gui.get_object("StartupTaskFileBox")
autoload_source = self.gui.get_object("StartupTaskFile")
# TODO: fix the extension filter
#for one_filter in get_filters_from_list(FILTER_CONFIG):
# autoload_source.add_filter(one_filter)
# autoload_source.set_filter(one_filter)
def get_autoload_task_file(autoload_source=autoload_source):
if autoload_enable.get_active():
return autoload_source.get_filename()
else:
return ""
def set_autoload_task_file(filename):
if filename:
autoload_enable.set_active(True)
autoload_box.show()
autoload_source.set_filename(filename)
else:
autoload_enable.set_active(False)
autoload_box.hide()
autoload_source.unselect_all()
def autoload_enable_switched(widget, box):
if not widget.get_active():
set_autoload_task_file(None)
else:
autoload_box.show()
autoload_enable.connect("toggled", autoload_enable_switched,
autoload_box)
self.settings.add_item("default_task_settings_file",
get_autoload_task_file, set_autoload_task_file)
autoload_task_filename = self.settings.get("default_task_settings_file")
# TODO: use "startup" hook instead
if autoload_task_filename:
self.open_task_settings_file(autoload_task_filename)
("LoadTaskSettings", self.load_task_settings_file, None, "<Control>t"),
("SaveTaskSettings", self.save_task_settings_file, lambda: self.last_task_settings_uri, None),
("SaveAsTaskSettings", self.save_task_settings_file, None, None)
So it never adds gui callbacks.
The solution I found could be to add UI_FILE but it seems that it complains about StatusManager class has no attribute "settings" (like Project class have one).
As I'm not sure about the best way to solve this, I prefer to let you do it. ;)
Thanks,
Gilles
sorry - but the load/save settings feature is not migrated to the new style (post v0.5.1) for now.
excellent quality [url=http://cheapbeatsbydredrdrebeats.webs.com/]beats by dre[/url] <a href="http://cheapbeatsbydredrdrebeats.webs.com/" title="beats by dre">beats by dre</a>