[GRASS-SVN] r29955 - in grass/trunk/gui/wxpython: gui_modules icons icons/silk

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Feb 5 07:10:40 EST 2008


Author: martinl
Date: 2008-02-05 07:10:40 -0500 (Tue, 05 Feb 2008)
New Revision: 29955

Added:
   grass/trunk/gui/wxpython/icons/silk/arrow_out.png
   grass/trunk/gui/wxpython/icons/silk/arrow_undo.png
Removed:
   grass/trunk/gui/wxpython/icons/silk/mouse.png
Modified:
   grass/trunk/gui/wxpython/gui_modules/toolbars.py
   grass/trunk/gui/wxpython/icons/icon.py
   grass/trunk/gui/wxpython/icons/silk/__init__.py
Log:
wxGUI: Undo icon added to the digitization toolbar, function is not implemented yet (TODO)

Modified: grass/trunk/gui/wxpython/gui_modules/toolbars.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/toolbars.py	2008-02-05 06:57:42 UTC (rev 29954)
+++ grass/trunk/gui/wxpython/gui_modules/toolbars.py	2008-02-05 12:10:40 UTC (rev 29955)
@@ -330,9 +330,12 @@
                      self.OnAdditionalToolMenu)]
 
         if row is None or row == 1:
-            self.settings = self.exit = None
+            self.undo = self.settings = self.exit = None
 
             data.append(("", "", "", "", "", "", ""))
+            data.append((self.undo, "digUndo", Icons["digUndo"].GetBitmap(),
+                         wx.ITEM_NORMAL, Icons["digUndo"].GetLabel(), Icons["digUndo"].GetDesc(),
+                         self.OnUndo))
             data.append((self.settings, "digSettings", Icons["digSettings"].GetBitmap(),
                          wx.ITEM_NORMAL, Icons["digSettings"].GetLabel(), Icons["digSettings"].GetDesc(),
                          self.OnSettings))
@@ -452,6 +455,15 @@
         self.action="copyCats"
         self.parent.MapWindow.mouse['box'] = 'point'
 
+    def OnUndo(self, event):
+        """Undo changes
+
+        @todo
+        """
+        wx.MessageBox(parent=self.parent, message=_("Undo is not implemented yet."),
+                      caption=_("Message"), style=wx.ID_OK | wx.ICON_INFORMATION)
+        event.Skip()
+
     def OnSettings(self, event):
         """Show settings dialog"""
 
@@ -680,7 +692,7 @@
 
             if not self.comboid:
                 self.combo = wx.ComboBox(self.toolbar[self.numOfRows-1], id=wx.ID_ANY, value=value,
-                                         choices=layerNameList, size=(150, -1),
+                                         choices=layerNameList, size=(135, -1),
                                          style=wx.CB_READONLY)
                 self.comboid = self.toolbar[self.numOfRows-1].InsertControl(0, self.combo)
                 self.parent.Bind(wx.EVT_COMBOBOX, self.OnSelectMap, self.comboid)

Modified: grass/trunk/gui/wxpython/icons/icon.py
===================================================================
--- grass/trunk/gui/wxpython/icons/icon.py	2008-02-05 06:57:42 UTC (rev 29954)
+++ grass/trunk/gui/wxpython/icons/icon.py	2008-02-05 12:10:40 UTC (rev 29955)
@@ -69,6 +69,7 @@
     ## attributes
     "digDispAttr" : 'display.attributes.gif',
     ## general
+    "digUndo" : wx.ART_ERROR,
     "digSettings" : 'settings.gif',
     "digAdditionalTools" : wx.ART_ERROR,
     "digExit"    : 'exit.gif',
@@ -289,6 +290,9 @@
     "digAdditionalTools" : MetaIcon (img=icons_img["digAdditionalTools"], label="Additional tools " \
                                          "(copy, flip, connect, etc.)",
                                      desc="Left: Select; Middle: Unselect; Right: Confirm"),
+    "digUndo" : MetaIcon (img=icons_img["digUndo"], label="Undo",
+                          desc="Undo previous changes (not implemented yet)"),
+
     # analyze raster
     "analyze"    : MetaIcon (img=icons_img["analyze"], label="Analyze map"),
     "measure"    : MetaIcon (img=icons_img["measure"], label="Measure distance"),

Modified: grass/trunk/gui/wxpython/icons/silk/__init__.py
===================================================================
--- grass/trunk/gui/wxpython/icons/silk/__init__.py	2008-02-05 06:57:42 UTC (rev 29954)
+++ grass/trunk/gui/wxpython/icons/silk/__init__.py	2008-02-05 12:10:40 UTC (rev 29955)
@@ -15,7 +15,7 @@
     "query"      : 'information.png',
     "savefile"   : 'picture_save.png',
     "printmap"   : 'printer.png',
-    "pan"        : 'mouse.png', # should be changed, not nice icon
+    "pan"        : 'arrow_out.png', 
     # zoom (mapdisplay)
     "zoom_in"    : 'zoom_in.png',
     "zoom_out"   : 'zoom_out.png',
@@ -53,6 +53,7 @@
     ## attributes
     "digDispAttr" : 'table.png',
     ## general
+    "digUndo" : 'arrow_undo.png',
     "digSettings" : 'color_swatch.png',
     "digAdditionalTools" : 'plugin.png',
     "digExit"     : 'door_in.png',

Added: grass/trunk/gui/wxpython/icons/silk/arrow_out.png
===================================================================
(Binary files differ)


Property changes on: grass/trunk/gui/wxpython/icons/silk/arrow_out.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: grass/trunk/gui/wxpython/icons/silk/arrow_undo.png
===================================================================
(Binary files differ)


Property changes on: grass/trunk/gui/wxpython/icons/silk/arrow_undo.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Deleted: grass/trunk/gui/wxpython/icons/silk/mouse.png
===================================================================
(Binary files differ)



More information about the grass-commit mailing list