chiark / gitweb /
Merge tag '15.01' into upstream
authorYouness Alaoui <kakaroto@kakaroto.homelinux.net>
Fri, 6 Mar 2015 18:06:37 +0000 (13:06 -0500)
committerYouness Alaoui <kakaroto@kakaroto.homelinux.net>
Fri, 6 Mar 2015 18:06:37 +0000 (13:06 -0500)
Conflicts:
Cura/util/profile.py

1  2 
Cura/gui/mainWindow.py
Cura/gui/preferencesDialog.py
Cura/util/profile.py
package.sh

Simple merge
index ddd401682775f6427e0d032420117e0a1d43c77a,708d30b56919e2662d460534636b0b503efcee09..bdeedf5bc8432bccacf15e4cb3dd694106acef64
@@@ -48,12 -49,17 +49,17 @@@ class preferencesDialog(wx.Dialog)
                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)
  
index 3d943d2a025a5f0c839ed71e053e15dd2b49babc,33b7288f070331ceab8e9cdb1e1b3469174c9d32..2d68bf38d853011debbdd66c5404f00c44655e83
@@@ -489,8 -487,19 +489,19 @@@ setting('save_profile', 'False', bool, 
  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."))
diff --cc package.sh
index 36d7799ebfb27e120875130f95ac35daed6c956b,5c3912fe2b01b8ae6f09cdaf7f1f9bd566266cf5..761ae93fc2444b7d0015a64eb1143cd6e3bd8a95
@@@ -22,15 -22,9 +22,15 @@@ BUILD_TARGET=${1:-none
  ##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