self.toolbar.AddLabelTool(6," "+_("Fit to plate"),wx.Image(imagefile('fit.png'),wx.BITMAP_TYPE_PNG).ConvertToBitmap(),shortHelp=_("Fit to plate [F]"),longHelp='')
confirmation=wx.MessageDialog(None,_("Are you sure you want to reset the setting to the default value: {0!r} ?").format(self.default),_("Confirm set default"),wx.ICON_EXCLAMATION|wx.YES_NO|wx.NO_DEFAULT)
confirmation=wx.MessageDialog(None,_("Are you sure you want to reset the setting to the default value: {0!r} ?").format(self.default),_("Confirm set default"),wx.ICON_EXCLAMATION|wx.YES_NO|wx.NO_DEFAULT)
ifconfirmation.ShowModal()==wx.ID_YES:
self._set_value(self.default)
else:
...
...
@@ -117,7 +121,7 @@ class Setting(object):
defupdate(self):
raiseNotImplementedError
def__str__(self):
returnself.name
...
...
@@ -125,7 +129,7 @@ class Setting(object):
returnself.name
classHiddenSetting(Setting):
hidden=True
def_set_value(self,value):
...
...
@@ -133,7 +137,7 @@ class HiddenSetting(Setting):
value=property(Setting._get_value,_set_value)
classwxSetting(Setting):
widget=None
def_set_value(self,value):
...
...
@@ -153,7 +157,7 @@ class StringSetting(wxSetting):
self.log(_("Creates a gcode file from an stl model using the slicer (with tab-completion)"))
...
...
@@ -1443,8 +1447,8 @@ class pronsole(cmd.Cmd):
self.log(_("Turns off everything on the printer"))
defadd_cmdline_arguments(self,parser):
parser.add_argument('-c','--conf','--config',help=_("load this file on startup instead of .pronsolerc ; you may chain config files, if so settings auto-save will use the last specified file"),action="append",default=[])
parser.add_argument('-e','--execute',help=_("executes command after configuration/.pronsolerc is loaded ; macros/settings from these commands are not autosaved"),action="append",default=[])
parser.add_argument('-c','--conf','--config',help=_("load this file on startup instead of .pronsolerc ; you may chain config files, if so settings auto-save will use the last specified file"),action="append",default=[])
parser.add_argument('-e','--execute',help=_("executes command after configuration/.pronsolerc is loaded ; macros/settings from these commands are not autosaved"),action="append",default=[])
parser.add_argument('filename',nargs='?',help=_("file to load"))