[GRASS-SVN] r36030 - in grass/branches/develbranch_6/gui: scripts
tcltk/d.m tcltk/gis.m wxpython/xml
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Feb 22 06:24:43 EST 2009
Author: hamish
Date: 2009-02-22 06:24:43 -0500 (Sun, 22 Feb 2009)
New Revision: 36030
Added:
grass/branches/develbranch_6/gui/scripts/g.change.gui.py
grass/branches/develbranch_6/gui/scripts/g.change.gui.sh
Removed:
grass/branches/develbranch_6/gui/scripts/g.change.gui
Modified:
grass/branches/develbranch_6/gui/tcltk/d.m/menu.tcl
grass/branches/develbranch_6/gui/tcltk/gis.m/gmmenu.tcl
grass/branches/develbranch_6/gui/wxpython/xml/menudata.xml
Log:
add more g.change.gui (trac #500)
Deleted: grass/branches/develbranch_6/gui/scripts/g.change.gui
===================================================================
--- grass/branches/develbranch_6/gui/scripts/g.change.gui 2009-02-22 11:14:16 UTC (rev 36029)
+++ grass/branches/develbranch_6/gui/scripts/g.change.gui 2009-02-22 11:24:43 UTC (rev 36030)
@@ -1,49 +0,0 @@
-#!/bin/sh
-
-############################################################################
-#
-# MODULE: g.change.gui
-# AUTHOR(S): Hamish Bowman
-# PURPOSE:
-# COPYRIGHT: (C) 2009 GRASS Development Team
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-#############################################################################/
-#%Module
-#% description: Changes the default GRASS graphical user interface (GUI) setting.
-#% keywords: general, gui
-#%End
-#%Option
-#% key: gui
-#% type: string
-#% required: yes
-#% multiple: no
-#% options: tcltk,oldtcltk,wxpython,text
-#% label: GUI type
-#% description: Default value: GRASS_GUI if defined otherwise tcltk
-#% descriptions: tcltk;Tcl/Tk based GUI - GIS Manager (gis.m);oldtcltk;Old Tcl/Tk based GUI - Display Manager (d.m);wxpython;wxPython based next generation GUI;text;command line interface only
-#%End
-
-# simple front end to g.gui to be used from within the GUI.
-
-
-if [ -z "$GISBASE" ] ; then
- echo "You must be in GRASS GIS to run this program." 1>&2
- exit 1
-fi
-
-if [ "$1" != "@ARGS_PARSED@" ] ; then
- exec g.parser "$0" "$@"
-fi
-
-g.gui -nu gui="$GIS_OPT_GUI"
-
Added: grass/branches/develbranch_6/gui/scripts/g.change.gui.py
===================================================================
--- grass/branches/develbranch_6/gui/scripts/g.change.gui.py (rev 0)
+++ grass/branches/develbranch_6/gui/scripts/g.change.gui.py 2009-02-22 11:24:43 UTC (rev 36030)
@@ -0,0 +1,47 @@
+#!/usr/bin/env python
+
+############################################################################
+#
+# MODULE: g.change.gui
+# AUTHOR(S): Hamish Bowman
+# PURPOSE:
+# COPYRIGHT: (C) 2009 GRASS Development Team
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+############################################################################
+#%Module
+#% description: Changes the default GRASS graphical user interface (GUI) setting.
+#% keywords: general, gui
+#%End
+#%Option
+#% key: gui
+#% type: string
+#% required: yes
+#% multiple: no
+#% options: tcltk,oldtcltk,wxpython,text
+#% label: GUI type
+#% description: Default value: GRASS_GUI if defined otherwise tcltk
+#% descriptions: tcltk;Tcl/Tk based GUI - GIS Manager (gis.m);oldtcltk;Old Tcl/Tk based GUI - Display Manager (d.m);wxpython;wxPython based next generation GUI;text;command line interface only
+#%End
+
+# simple front end to g.gui to be used from within the GUI.
+
+import grass
+import sys
+
+def main():
+ grass.exec_command("g.gui", flags = 'nu', gui = options['gui'])
+ sys.exit(ret)
+
+if __name__ == "__main__":
+ options, flags = grass.parser()
+ sys.exit(main())
Property changes on: grass/branches/develbranch_6/gui/scripts/g.change.gui.py
___________________________________________________________________
Name: svn:mime-type
+ text/x-python
Name: svn:eol-style
+ native
Copied: grass/branches/develbranch_6/gui/scripts/g.change.gui.sh (from rev 36027, grass/branches/develbranch_6/gui/scripts/g.change.gui)
===================================================================
--- grass/branches/develbranch_6/gui/scripts/g.change.gui.sh (rev 0)
+++ grass/branches/develbranch_6/gui/scripts/g.change.gui.sh 2009-02-22 11:24:43 UTC (rev 36030)
@@ -0,0 +1,49 @@
+#!/bin/sh
+
+############################################################################
+#
+# MODULE: g.change.gui
+# AUTHOR(S): Hamish Bowman
+# PURPOSE:
+# COPYRIGHT: (C) 2009 GRASS Development Team
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+############################################################################
+#%Module
+#% description: Changes the default GRASS graphical user interface (GUI) setting.
+#% keywords: general, gui
+#%End
+#%Option
+#% key: gui
+#% type: string
+#% required: yes
+#% multiple: no
+#% options: tcltk,oldtcltk,wxpython,text
+#% label: GUI type
+#% description: Default value: GRASS_GUI if defined otherwise tcltk
+#% descriptions: tcltk;Tcl/Tk based GUI - GIS Manager (gis.m);oldtcltk;Old Tcl/Tk based GUI - Display Manager (d.m);wxpython;wxPython based next generation GUI;text;command line interface only
+#%End
+
+# simple front end to g.gui to be used from within the GUI.
+
+
+if [ -z "$GISBASE" ] ; then
+ echo "You must be in GRASS GIS to run this program." 1>&2
+ exit 1
+fi
+
+if [ "$1" != "@ARGS_PARSED@" ] ; then
+ exec g.parser "$0" "$@"
+fi
+
+g.gui -nu gui="$GIS_OPT_GUI"
+
Modified: grass/branches/develbranch_6/gui/tcltk/d.m/menu.tcl
===================================================================
--- grass/branches/develbranch_6/gui/tcltk/d.m/menu.tcl 2009-02-22 11:14:16 UTC (rev 36029)
+++ grass/branches/develbranch_6/gui/tcltk/d.m/menu.tcl 2009-02-22 11:24:43 UTC (rev 36030)
@@ -197,6 +197,7 @@
{command {[G_msg "Modify access by other users to current mapset"]} {} "g.access" {} -command {execute g.access }}
{command {[G_msg "Show current GRASS environment settings"]} {} "g.gisenv" {} -command {run_panel g.gisenv }}
{command {[G_msg "Set GRASS environment settings"]} {} "g.gisenv" {} -command {execute g.gisenv }}
+ {command {[G_msg "Change default GUI"]} {} "g.change.gui" {} -command {execute "$env(GISBASE)/etc/gui/scripts/g.change.gui.sh" }}
{command {[G_msg "Show current GRASS version"]} {} "g.version -c" {} -command {run_panel "g.version -c" }}
}}
{cascad {[G_msg "Manage projections"]} {} "" $tmenu {
Modified: grass/branches/develbranch_6/gui/tcltk/gis.m/gmmenu.tcl
===================================================================
--- grass/branches/develbranch_6/gui/tcltk/gis.m/gmmenu.tcl 2009-02-22 11:14:16 UTC (rev 36029)
+++ grass/branches/develbranch_6/gui/tcltk/gis.m/gmmenu.tcl 2009-02-22 11:24:43 UTC (rev 36030)
@@ -214,6 +214,7 @@
{command {[G_msg "User access"]} {} "g.access: Modify access by other users to current mapset" {} -command {execute g.access }}
{command {[G_msg "Show settings"]} {} "g.gisenv: Show current GRASS environment settings" {} -command {run_panel g.gisenv }}
{command {[G_msg "Change settings"]} {} "g.gisenv: Set GRASS environment settings" {} -command {execute g.gisenv }}
+ {command {[G_msg "Change default GUI"]} {} "g.change.gui: Change the default GUI setting" {} -command {execute "$env(GISBASE)/etc/gui/scripts/g.change.gui.sh" }}
{command {[G_msg "Show current GRASS version"]} {} "g.version -c: Show current GRASS version" {} -command {run_panel "g.version -c" }}
}}
{cascad {[G_msg "Manage projections"]} {} "" $tmenu {
Modified: grass/branches/develbranch_6/gui/wxpython/xml/menudata.xml
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/xml/menudata.xml 2009-02-22 11:14:16 UTC (rev 36029)
+++ grass/branches/develbranch_6/gui/wxpython/xml/menudata.xml 2009-02-22 11:24:43 UTC (rev 36030)
@@ -607,6 +607,12 @@
<command>g.gisenv</command>
</menuitem>
<menuitem>
+ <label>Change default GUI</label>
+ <help>Changes the default GRASS graphical user interface (GUI) setting.</help>
+ <handler>self.OnMenuCmd</handler>
+ <command>g.change.gui.py</command>
+ </menuitem>
+ <menuitem>
<label>Version</label>
<help>Displays version and copyright information.</help>
<handler>self.RunMenuCmd</handler>
More information about the grass-commit
mailing list