configBase.TitleRow(right, 'SD Card settings')
configBase.SettingRow(right, 'auto_detect_sd')
configBase.SettingRow(right, 'sdcard_rootfolder')
-
+ #same as the expert settings button.
+ self.browseButton = wx.Button(right, -1, '...', style=wx.BU_EXACTFIT)
+ self.browseButton.SetFont(wx.Font(wx.SystemSettings.GetFont(wx.SYS_ANSI_VAR_FONT).GetPointSize() * 0.8, wx.FONTFAMILY_DEFAULT, wx.NORMAL, wx.FONTWEIGHT_NORMAL))
+ self.browseButton.Bind(wx.EVT_BUTTON, self.OnBrowseSDRootFolder)
+ right.GetSizer().Add(self.browseButton, (right.GetSizer().GetRows()-1, 2), flag=wx.ALIGN_CENTER_VERTICAL)
+
configBase.TitleRow(right, _("Cura settings"))
configBase.SettingRow(right, 'check_for_updates')
- configBase.SettingRow(right, 'submit_slice_information')
+ #configBase.SettingRow(right, 'submit_slice_information')
- self.okButton = wx.Button(right, -1, 'Ok')
+ self.okButton = wx.Button(right, -1, _('Ok'))
right.GetSizer().Add(self.okButton, (right.GetSizer().GetRows(), 0), flag=wx.BOTTOM, border=5)
self.okButton.Bind(wx.EVT_BUTTON, lambda e: self.Close())
#self.parent.reloadSettingPanels()
self.Destroy()
+ def OnBrowseSDRootFolder(self, e):
+ path = profile.getPreference('sdcard_rootfolder')
+ if path == '':
+ path = os.path.expanduser('~/Documents')
+ if not os.path.exists(path):
+ path = ''
+
+ dlg=wx.DirDialog(self, _("Select replication root folder"), path)
+ if dlg.ShowModal() != wx.ID_OK:
+ dlg.Destroy()
+ return
+
+ profile.putPreference('sdcard_rootfolder', dlg.GetPath())
+ dlg.Destroy()
+ self.Close()
+ self.parent.OnPreferences(None)
+
+
+
+
+
+
class machineSettingsDialog(wx.Dialog):
def __init__(self, parent):
- super(machineSettingsDialog, self).__init__(None, title=_("Machine settings"))
+ super(machineSettingsDialog, self).__init__(parent, title=_("Machine settings"))
wx.EVT_CLOSE(self, self.OnClose)
setting('filament_cost_kg', '0', float, 'preference', 'hidden').setLabel(_("Cost (price/kg)"), _("Cost of your filament per kg, to estimate the cost of the final print."))
setting('filament_cost_meter', '0', float, 'preference', 'hidden').setLabel(_("Cost (price/m)"), _("Cost of your filament per meter, to estimate the cost of the final print."))
setting('auto_detect_sd', 'True', bool, 'preference', 'hidden').setLabel(_("Auto detect SD card drive"), _("Auto detect the SD card. You can disable this because on some systems external hard-drives or USB sticks are detected as SD card."))
- setting('sdcard_rootfolder', '', str, 'preference', 'hidden').setLabel(_("Base folder to replicate on SD card"), _("The specified folder will be used as a base path. Any gcode generated from object coming from within that folder will be automatically saved on the SD card at the same sub-folder. Any object coming from outside of this path will save the gcode on the root folder of the card."))
+
+ def _getMyDocumentsFolder():
+ if platform.system() == "Windows":
+ path = os.path.expanduser('~/Documents')
+ else:
+ path = os.path.expanduser('~/')
+ if not os.path.exists(path):
+ path = ''
+
+ return path
+
+ setting('sdcard_rootfolder', _getMyDocumentsFolder(), str, 'preference', 'hidden').setLabel(_("Base folder to replicate on SD card"), _("The specified folder will be used as a base path. Any gcode generated from object coming from within that folder will be automatically saved on the SD card at the same sub-folder. Any object coming from outside of this path will save the gcode on the root folder of the card."))
-setting('check_for_updates', 'True', bool, 'preference', 'hidden').setLabel(_("Check for updates"), _("Check for newer versions of Cura on startup"))
+setting('check_for_updates', 'False', bool, 'preference', 'hidden').setLabel(_("Check for updates"), _("Check for newer versions of Cura on startup"))
setting('submit_slice_information', 'False', bool, 'preference', 'hidden').setLabel(_("Send usage statistics"), _("Submit anonymous usage information to improve future versions of Cura"))
setting('youmagine_token', '', str, 'preference', 'hidden')
setting('filament_physical_density', '1240', float, 'preference', 'hidden').setRange(500.0, 3000.0).setLabel(_("Density (kg/m3)"), _("Weight of the filament per m3. Around 1240 for PLA. And around 1040 for ABS. This value is used to estimate the weight if the filament used for the print."))
##Do we need to create the final archive
ARCHIVE_FOR_DISTRIBUTION=1
##Which version name are we appending to the final archive
- export BUILD_NAME=15.01-RC11
+ export BUILD_NAME=15.01
TARGET_DIR=Cura-${BUILD_NAME}-${BUILD_TARGET}
+##Revision
+export REVISION=1.19
+
+##Git commit
+GIT_HASH=$(git rev-parse --short=4 HEAD)
+
##Which versions of external programs to use
WIN_PORTABLE_PY_VERSION=2.7.2.1