[GRASS-SVN] r50167 - in grass/trunk/gui/wxpython: lmgr xml
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Jan 13 17:47:11 EST 2012
Author: mmetz
Date: 2012-01-13 14:47:11 -0800 (Fri, 13 Jan 2012)
New Revision: 50167
Modified:
grass/trunk/gui/wxpython/lmgr/frame.py
grass/trunk/gui/wxpython/xml/menudata.xml
Log:
wxGUI: add option to change CWD
Modified: grass/trunk/gui/wxpython/lmgr/frame.py
===================================================================
--- grass/trunk/gui/wxpython/lmgr/frame.py 2012-01-13 21:43:18 UTC (rev 50166)
+++ grass/trunk/gui/wxpython/lmgr/frame.py 2012-01-13 22:47:11 UTC (rev 50167)
@@ -704,6 +704,18 @@
GMessage(parent = self,
message = _("Current mapset is <%s>.") % mapset)
+ def OnChangeCWD(self, event):
+ """!Change current working directory
+ """
+ dlg = wx.DirDialog(parent = self, message = _("Choose a working directory"),
+ defaultPath = os.getcwd(), style = wx.DD_CHANGE_DIR)
+
+ cwd_path = ''
+ if dlg.ShowModal() == wx.ID_OK:
+ cwd_path = dlg.GetPath()
+
+ # save path to somewhere ?
+
def OnNewVector(self, event):
"""!Create new vector map layer"""
dlg = CreateNewVector(self, log = self.goutput,
Modified: grass/trunk/gui/wxpython/xml/menudata.xml
===================================================================
--- grass/trunk/gui/wxpython/xml/menudata.xml 2012-01-13 21:43:18 UTC (rev 50166)
+++ grass/trunk/gui/wxpython/xml/menudata.xml 2012-01-13 22:47:11 UTC (rev 50167)
@@ -911,6 +911,11 @@
<handler>OnPreferences</handler>
<id>ID_PREFERENCES</id>
</menuitem>
+ <menuitem>
+ <label>Change working directory</label>
+ <help>Change working directory</help>
+ <handler>OnChangeCWD</handler>
+ </menuitem>
</items>
</menu>
<menu>
More information about the grass-commit
mailing list