Bug when try to SaveAs on Windows fixed
authorlaurent
Wed, 16 Dec 2009 15:07:47 +0100
changeset 529 ffe0fba7e427
parent 527 2a3ab252b4e0
child 530 862d9adcd904
Bug when try to SaveAs on Windows fixed
plugger.py
--- a/plugger.py	Wed Dec 16 14:13:55 2009 +0100
+++ b/plugger.py	Wed Dec 16 15:07:47 2009 +0100
@@ -972,7 +972,11 @@
     
     def SaveProjectAs(self, dosave=True):
         # Ask user to choose a path with write permissions
-        dirdialog = wx.DirDialog(self.AppFrame , _("Choose a directory to save project"), os.getenv("HOME"), wx.DD_NEW_DIR_BUTTON)
+        if wx.Platform == '__WXMSW__':
+            path = os.getenv("USERPROFILE")
+        else:
+            path = os.getenv("HOME")
+        dirdialog = wx.DirDialog(self.AppFrame , _("Choose a directory to save project"), path, wx.DD_NEW_DIR_BUTTON)
         answer = dirdialog.ShowModal()
         dirdialog.Destroy()
         if answer == wx.ID_OK: