From e4ecdc279593310145a3123a14b64cf01874049f Mon Sep 17 00:00:00 2001 From: tatiana Date: Wed, 11 Nov 2009 12:43:53 +0000 Subject: [PATCH] ENH: Default open directory dir for win32 --- invesalius/gui/task_importer.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/invesalius/gui/task_importer.py b/invesalius/gui/task_importer.py index 0b5302a..1cd288b 100644 --- a/invesalius/gui/task_importer.py +++ b/invesalius/gui/task_importer.py @@ -17,10 +17,13 @@ # detalhes. #-------------------------------------------------------------------------- import os +import sys + import wx import wx.lib.hyperlink as hl import wx.lib.platebtn as pbtn import wx.lib.pubsub as ps + import constants as const BTN_IMPORT_LOCAL = wx.NewId() @@ -166,8 +169,12 @@ class InnerTaskPanel(wx.Panel): if proj_name: print "TODO: Send Signal - Open project "+ proj_name else: + if sys.platform == 'win32': + path = "" + else: + path = os.getcwd() dlg = wx.FileDialog(self, message="Open project...", - defaultDir=os.getcwd(), + defaultDir=path, defaultFile="", wildcard=WILDCARD_OPEN, style=wx.OPEN|wx.CHANGE_DIR) dlg.SetFilterIndex(3) -- libgit2 0.21.2