[GRASS-SVN] r39673 - in grass/trunk/gui/wxpython: . xml
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Nov 3 07:10:18 EST 2009
Author: martinl
Date: 2009-11-03 07:10:18 -0500 (Tue, 03 Nov 2009)
New Revision: 39673
Modified:
grass/trunk/gui/wxpython/wxgui.py
grass/trunk/gui/wxpython/xml/menudata.xml
Log:
quit wxGUI/GRASS
(merge r39672 from devbr6)
Modified: grass/trunk/gui/wxpython/wxgui.py
===================================================================
--- grass/trunk/gui/wxpython/wxgui.py 2009-11-03 12:08:39 UTC (rev 39672)
+++ grass/trunk/gui/wxpython/wxgui.py 2009-11-03 12:10:18 UTC (rev 39673)
@@ -27,6 +27,7 @@
import string
import getopt
import platform
+import signal
### XML
try:
@@ -1456,6 +1457,19 @@
self.OnAddVector(None)
event.Skip()
+
+ def OnQuit(self, event):
+ """!Quit GRASS"""
+ # quit wxGUI session
+ self.OnCloseWindow(event)
+
+ # quit GRASS shell
+ try:
+ pid = os.environ['GRASS_SHELL_PID']
+ except KeyError:
+ return
+
+ os.kill(int(pid), signal.SIGQUIT)
def OnCloseWindow(self, event):
"""!Cleanup when wxGUI is quit"""
Modified: grass/trunk/gui/wxpython/xml/menudata.xml
===================================================================
--- grass/trunk/gui/wxpython/xml/menudata.xml 2009-11-03 12:08:39 UTC (rev 39672)
+++ grass/trunk/gui/wxpython/xml/menudata.xml 2009-11-03 12:10:18 UTC (rev 39673)
@@ -644,9 +644,14 @@
</menuitem>
<separator />
<menuitem>
- <label>E&xit</label>
- <help>Quit GUI</help>
+ <label>Quit GUI</label>
+ <help>Quit wxGUI session</help>
<handler>self.OnCloseWindow</handler>
+ </menuitem>
+ <menuitem>
+ <label>Quit GRASS GIS</label>
+ <help>Quit GRASS session including wxGUI</help>
+ <handler>self.OnQuit</handler>
<shortcut>Ctrl+Q</shortcut>
</menuitem>
</items>
More information about the grass-commit
mailing list