[GRASS-SVN] r53735 - in grass/trunk/gui/wxpython: . lmgr mapswipe

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Nov 8 05:35:30 PST 2012


Author: martinl
Date: 2012-11-08 05:35:29 -0800 (Thu, 08 Nov 2012)
New Revision: 53735

Added:
   grass/trunk/gui/wxpython/mapswipe/
   grass/trunk/gui/wxpython/mapswipe/Makefile
   grass/trunk/gui/wxpython/mapswipe/g.gui.mapswipe.py
Removed:
   grass/trunk/gui/wxpython/mapswipe/main.py
   grass/trunk/gui/wxpython/swipe/
Modified:
   grass/trunk/gui/wxpython/Makefile
   grass/trunk/gui/wxpython/lmgr/frame.py
   grass/trunk/gui/wxpython/mapswipe/dialogs.py
   grass/trunk/gui/wxpython/mapswipe/frame.py
   grass/trunk/gui/wxpython/wxpythonlib.dox
Log:
wxGUI: rename swipe to mapswipe


Modified: grass/trunk/gui/wxpython/Makefile
===================================================================
--- grass/trunk/gui/wxpython/Makefile	2012-11-08 13:27:20 UTC (rev 53734)
+++ grass/trunk/gui/wxpython/Makefile	2012-11-08 13:35:29 UTC (rev 53735)
@@ -11,12 +11,12 @@
 
 SRCFILES := $(wildcard icons/*.* scripts/* xml/*) \
 	$(wildcard core/* dbmgr/* gcp/* gmodeler/* gui_core/* iclass/* lmgr/* location_wizard/* \
-	mapdisp/* modules/* nviz/* psmap/* swipe/* vdigit/* wxplot/* ogc_services/*) \
+	mapdisp/* modules/* nviz/* psmap/* mapswipe/* vdigit/* wxplot/* ogc_services/*) \
 	gis_set.py gis_set_error.py wxgui.py README
 DSTFILES := $(patsubst %,$(ETCDIR)/%,$(SRCFILES)) $(patsubst %.py,$(ETCDIR)/%.pyc,$(filter %.py,$(SRCFILES)))
 
 PYDSTDIRS := $(patsubst %,$(ETCDIR)/%,core dbmgr gcp gmodeler gui_core iclass lmgr location_wizard \
-	mapdisp modules nviz psmap swipe vdigit wxplot ogc_services)
+	mapdisp modules nviz psmap mapswipe vdigit wxplot ogc_services)
 DSTDIRS := $(patsubst %,$(ETCDIR)/%,icons scripts xml)
 
 default: $(DSTFILES)

Modified: grass/trunk/gui/wxpython/lmgr/frame.py
===================================================================
--- grass/trunk/gui/wxpython/lmgr/frame.py	2012-11-08 13:27:20 UTC (rev 53734)
+++ grass/trunk/gui/wxpython/lmgr/frame.py	2012-11-08 13:35:29 UTC (rev 53735)
@@ -67,7 +67,7 @@
 from gui_core.forms        import GUI
 from gcp.manager           import GCPWizard
 from nviz.main             import haveNviz
-from swipe.frame           import SwipeMapFrame
+from mapswipe.frame        import SwipeMapFrame
 
 class GMFrame(wx.Frame):
     """!Layer Manager frame with notebook widget for controlling GRASS

Copied: grass/trunk/gui/wxpython/mapswipe/Makefile (from rev 53734, grass/trunk/gui/wxpython/swipe/Makefile)
===================================================================
--- grass/trunk/gui/wxpython/mapswipe/Makefile	                        (rev 0)
+++ grass/trunk/gui/wxpython/mapswipe/Makefile	2012-11-08 13:35:29 UTC (rev 53735)
@@ -0,0 +1,8 @@
+MODULE_TOPDIR = ../../..
+
+PGM = g.gui.mapswipe
+
+include $(MODULE_TOPDIR)/include/Make/Script.make
+include $(MODULE_TOPDIR)/include/Make/NoHtml.make
+
+default: script

Modified: grass/trunk/gui/wxpython/mapswipe/dialogs.py
===================================================================
--- grass/trunk/gui/wxpython/swipe/dialogs.py	2012-11-07 09:32:03 UTC (rev 53718)
+++ grass/trunk/gui/wxpython/mapswipe/dialogs.py	2012-11-08 13:35:29 UTC (rev 53735)
@@ -1,5 +1,5 @@
 """!
- at package swipe.dialogs
+ at package mapswipe.dialogs
 
 @brief Dialogs used in Map Swipe
 

Modified: grass/trunk/gui/wxpython/mapswipe/frame.py
===================================================================
--- grass/trunk/gui/wxpython/swipe/frame.py	2012-11-07 09:32:03 UTC (rev 53718)
+++ grass/trunk/gui/wxpython/mapswipe/frame.py	2012-11-08 13:35:29 UTC (rev 53735)
@@ -1,5 +1,5 @@
 """!
- at package swipe.frame
+ at package mapswipe.frame
 
 @brief Map Swipe Frame
 
@@ -29,9 +29,9 @@
 from core.gcmd          import RunCommand, GError, GMessage
 from mapdisp.statusbar  import EVT_AUTO_RENDER
 
-from swipe.toolbars  import SwipeMapToolbar, SwipeMainToolbar, SwipeMiscToolbar
-from swipe.mapwindow import SwipeBufferedWindow
-from swipe.dialogs   import SwipeMapDialog
+from mapswipe.toolbars  import SwipeMapToolbar, SwipeMainToolbar, SwipeMiscToolbar
+from mapswipe.mapwindow import SwipeBufferedWindow
+from mapswipe.dialogs   import SwipeMapDialog
 
 
 class SwipeMapFrame(DoubleMapFrame):

Copied: grass/trunk/gui/wxpython/mapswipe/g.gui.mapswipe.py (from rev 53734, grass/trunk/gui/wxpython/swipe/g.gui.mapswipe.py)
===================================================================
--- grass/trunk/gui/wxpython/mapswipe/g.gui.mapswipe.py	                        (rev 0)
+++ grass/trunk/gui/wxpython/mapswipe/g.gui.mapswipe.py	2012-11-08 13:35:29 UTC (rev 53735)
@@ -0,0 +1,89 @@
+#!/usr/bin/env python
+############################################################################
+#
+# MODULE:    Map Swipe
+# AUTHOR(S): Anna Kratochvilova
+# PURPOSE:   The Map Swipe is a wxGUI component which allows the user to
+#            interactively compare two maps  
+# COPYRIGHT: (C) 2012 by Anna Kratochvilova, and the 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: Allows to interactively compare two maps by swiping.
+#%end
+#%option G_OPT_R_INPUT
+#% key: first
+#% description: First (top/right) raster map
+#% required: no
+#%end
+#%option G_OPT_R_INPUT
+#% key: second
+#% description: Second (bottom/left) raster map
+#% required: no
+#%end
+
+
+import os
+import sys
+
+import  wx
+import gettext
+
+import grass.script as grass
+
+if __name__ == '__main__':
+    sys.path.append(os.path.join(os.environ['GISBASE'], "etc", "gui", "wxpython"))
+
+from core.settings  import UserSettings
+from mapswipe.frame import SwipeMapFrame
+
+
+def main():
+    gettext.install('grasswxpy', os.path.join(os.getenv("GISBASE"), 'locale'), unicode = True)
+
+    driver = UserSettings.Get(group = 'display', key = 'driver', subkey = 'type')
+    if driver == 'png':
+        os.environ['GRASS_RENDER_IMMEDIATE'] = 'png'
+    else:
+        os.environ['GRASS_RENDER_IMMEDIATE'] = 'cairo'
+
+    options, flags = grass.parser()
+
+    first = options['first']
+    second = options['second']
+
+    for mapName in [first, second]:    
+        if mapName:
+            gfile = grass.find_file(name = mapName)
+            if not gfile['name']:
+                grass.fatal(_("Raster map <%s> not found") % mapName)
+
+    app = wx.PySimpleApp()
+    wx.InitAllImageHandlers()
+
+    frame = SwipeMapFrame()
+    
+    if first:
+        frame.SetFirstRaster(first)
+    if second:
+        frame.SetSecondRaster(second)
+
+    frame.Show()
+
+    app.MainLoop()
+
+
+if __name__ == '__main__':
+    main()
+

Deleted: grass/trunk/gui/wxpython/mapswipe/main.py
===================================================================
--- grass/trunk/gui/wxpython/swipe/main.py	2012-11-07 09:32:03 UTC (rev 53718)
+++ grass/trunk/gui/wxpython/mapswipe/main.py	2012-11-08 13:35:29 UTC (rev 53735)
@@ -1,89 +0,0 @@
-#!/usr/bin/env python
-############################################################################
-#
-# MODULE:    Map Swipe
-# AUTHOR(S): Anna Kratochvilova
-# PURPOSE:   The Map Swipe is a wxGUI component which allows the user to
-#            interactively compare two maps  
-# COPYRIGHT: (C) 2012 by Anna Kratochvilova, and the 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: Allows to interactively compare two maps by swiping.
-#%end
-#%option G_OPT_R_INPUT
-#% key: first
-#% description: First (top/right) raster map
-#% required: no
-#%end
-#%option G_OPT_R_INPUT
-#% key: second
-#% description: Second (bottom/left) raster map
-#% required: no
-#%end
-
-
-import os
-import sys
-
-import  wx
-import gettext
-
-import grass.script as grass
-
-if __name__ == '__main__':
-    sys.path.append(os.path.join(os.environ['GISBASE'], "etc", "gui", "wxpython"))
-
-from core.settings import UserSettings
-from frame import SwipeMapFrame
-
-
-def main():
-    gettext.install('grasswxpy', os.path.join(os.getenv("GISBASE"), 'locale'), unicode = True)
-
-    driver = UserSettings.Get(group = 'display', key = 'driver', subkey = 'type')
-    if driver == 'png':
-        os.environ['GRASS_RENDER_IMMEDIATE'] = 'png'
-    else:
-        os.environ['GRASS_RENDER_IMMEDIATE'] = 'cairo'
-
-    options, flags = grass.parser()
-
-    first = options['first']
-    second = options['second']
-
-    for mapName in [first, second]:    
-        if mapName:
-            gfile = grass.find_file(name = mapName)
-            if not gfile['name']:
-                grass.fatal(_("Raster map <%s> not found") % mapName)
-
-    app = wx.PySimpleApp()
-    wx.InitAllImageHandlers()
-
-    frame = SwipeMapFrame()
-    
-    if first:
-        frame.SetFirstRaster(first)
-    if second:
-        frame.SetSecondRaster(second)
-
-    frame.Show()
-
-    app.MainLoop()
-
-
-if __name__ == '__main__':
-    main()
-

Modified: grass/trunk/gui/wxpython/wxpythonlib.dox
===================================================================
--- grass/trunk/gui/wxpython/wxpythonlib.dox	2012-11-08 13:27:20 UTC (rev 53734)
+++ grass/trunk/gui/wxpython/wxpythonlib.dox	2012-11-08 13:35:29 UTC (rev 53735)
@@ -36,7 +36,7 @@
  - \ref psmap
  - \ref locWizard
  - \ref plot
- - \ref swipe
+ - \ref mapswipe
  - \ref other
 - \ref devel
 - \ref seeAlso
@@ -478,17 +478,17 @@
  - toolbars::IClassMapManagerToolbar
  - toolbars::IClassMiscToolbar
 
-\subsection swipe Map Swipe
+\subsection mapswipe Map Swipe
 
-- swipe::frame
+- mapswipe::frame
  - frame::SwipeMapFrame
  - frame::MapSplitter
-- swipe::mapwindow
+- mapswipe::mapwindow
  - mapwindow::SwipeBufferedWindow
  - mapwindow::_MouseEvent
-- swipe::dialogs
+- mapswipe::dialogs
  - dialogs::SwipeMapDialog
-- swipe::toolbars
+- mapswipe::toolbars
  - toolbars::SwipeMapToolbar
  - toolbars::SwipeMainToolbar
  - toolbars::SwipeMiscToolbar



More information about the grass-commit mailing list