Commits

Anonymous committed c2f32a7

Changed some default directories for dialogs.

Comments (0)

Files changed (1)

orange/OrangeCanvas/orngCanvas.pyw

 #    main file, that creates the MDI environment
 
 from qt import *
-import sys, os, cPickle
+import sys, os, cPickle, user
 import orngTabs, orngDoc, orngDlgs, orngOutput, orngRegistry
 
 class OrangeCanvasDlg(QMainWindow):
         self.statusBar.message("")
 
     def menuItemSaveOutputWindow(self):
-        qname = QFileDialog.getSaveFileName( self.outputDir + "/Output.htm", "HTML Document (*.htm)", self, "", "Save Output To File")
+        qname = QFileDialog.getSaveFileName( self.saveSchemaDir + "/Output.htm", "HTML Document (*.htm)", self, "", "Save Output To File")
         if qname.isEmpty(): return
         name = str(qname)
 
         #if not self.settings.has_key("catchException"): self.settings["catchException"] = 1
         #if not self.settings.has_key("catchOutput"): self.settings["catchOutput"] = 1
 
-        self.settings.setdefault("saveSchemaDir", self.outputDir)
-        self.settings.setdefault("saveApplicationDir", self.outputDir)
+        if sys.platform == "darwin":
+            self.settings.setdefault("saveSchemaDir", user.home)
+            self.settings.setdefault("saveApplicationDir", user.home)
+        else:
+            self.settings.setdefault("saveSchemaDir", self.outputDir)
+            self.settings.setdefault("saveApplicationDir", self.outputDir)
         self.settings.setdefault("showSignalNames", 1)
         self.settings.setdefault("useContexts", 1)