def OnPreferences(self, e):
		#(width, height) = self.simpleSettingsPanel.GetSizer().GetSize() 
		#width = int(profile.getPreference('window_width'))
		#self.splitter.SetSashPosition(width)
		prefDialog = preferencesDialog.preferencesDialog(self)
		prefDialog.Centre()
		prefDialog.Show()
 def OnCopyToSD(self, e):
     if profile.getPreference('sdpath') == '':
         wx.MessageBox(
             "You need to configure your SD card drive first before you can copy files to it.\nOpening the preferences now.",
             'No SD card drive.', wx.OK | wx.ICON_INFORMATION)
         prefDialog = preferencesDialog.preferencesDialog(self.GetParent())
         prefDialog.Centre()
         prefDialog.Show(True)
         if profile.getPreference('sdpath') == '':
             print "No path set"
             return
     exportFilename = sliceRun.getExportFilename(self.filelist[0])
     filename = os.path.basename(exportFilename)
     if profile.getPreference('sdshortnames') == 'True':
         filename = sliceRun.getShortFilename(filename)
     try:
         shutil.copy(
             exportFilename,
             os.path.join(profile.getPreference('sdpath'), filename))
     except:
         self.GetParent().preview3d.ShowWarningPopup(
             "Failed to copy file to SD card.")
         return
     self.GetParent().preview3d.ShowWarningPopup(
         "Copy finished, safely remove SD card?", self.OnSafeRemove)
	def OnCopyToSD(self, e):
		if profile.getPreference('sdpath') == '':
			wx.MessageBox("You need to configure your SD card drive first before you can copy files to it.\nOpening the preferences now.", 'No SD card drive.', wx.OK | wx.ICON_INFORMATION)
			prefDialog = preferencesDialog.preferencesDialog(self.GetParent())
			prefDialog.Centre()
			prefDialog.Show(True)
			if profile.getPreference('sdpath') == '':
				print "No path set"
				return
		exportFilename = sliceRun.getExportFilename(self.filelist[0])
		filename = os.path.basename(exportFilename)
		if profile.getPreference('sdshortnames') == 'True':
			filename = sliceRun.getShortFilename(filename)
		try:
			shutil.copy(exportFilename, os.path.join(profile.getPreference('sdpath'), filename))
		except:
			self.GetParent().preview3d.ShowWarningPopup("Failed to copy file to SD card.")
			return
		self.GetParent().preview3d.ShowWarningPopup("Copy finished, safely remove SD card?", self.OnSafeRemove)
Exemple #4
0
 def OnPreferences(self, e):
     prefDialog = preferencesDialog.preferencesDialog(self)
     prefDialog.Centre()
     prefDialog.Show()
     prefDialog.Raise()
     wx.CallAfter(prefDialog.Show)
Exemple #5
0
	def OnPreferences(self, e):
		prefDialog = preferencesDialog.preferencesDialog(self)
		prefDialog.Centre()
		prefDialog.Show(True)
	def OnPreferences(self, e):
		prefDialog = preferencesDialog.preferencesDialog(self)
		prefDialog.Centre()
		prefDialog.Show()
		prefDialog.Raise()
		wx.CallAfter(prefDialog.Show)
Exemple #7
0
 def OnPreferences(self, e):
     prefDialog = preferencesDialog.preferencesDialog(self)
     prefDialog.Centre()
     prefDialog.Show(True)
	def OnPreferences(self, e):
		prefDialog = preferencesDialog.preferencesDialog(self)
		prefDialog.Centre()
		prefDialog.Show()
		self.blarg.OnSlice(e)