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:
...
...
@@ -187,6 +191,7 @@ class BooleanSetting(wxSetting):
def_get_value(self):
returnbool(self._value)
def_set_value(self,value):
self._value=value
ifself.widget:
...
...
@@ -208,10 +213,13 @@ class StaticTextSetting(wxSetting):
defupdate(self):
pass
def_get_value(self):
return""
def_set_value(self,value):
pass
defget_specific_widget(self,parent):
importwx
self.widget=wx.StaticText(parent,-1,self.text)
...
...
@@ -223,6 +231,7 @@ class Settings(object):
# if v < 0: raise ValueError("You cannot set negative temperatures. To turn the hotend off entirely, set its temperature to 0.")
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"))