[GRASS-SVN] r33234 - grass/trunk/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Sep 3 06:58:55 EDT 2008


Author: martinl
Date: 2008-09-03 06:58:54 -0400 (Wed, 03 Sep 2008)
New Revision: 33234

Modified:
   grass/trunk/gui/wxpython/gui_modules/dbm.py
Log:
wxGUI: cosmetics in dbm (statusbar logging)
(merge from devbr6, r33233)


Modified: grass/trunk/gui/wxpython/gui_modules/dbm.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/dbm.py	2008-09-03 10:55:48 UTC (rev 33233)
+++ grass/trunk/gui/wxpython/gui_modules/dbm.py	2008-09-03 10:58:54 UTC (rev 33234)
@@ -285,6 +285,9 @@
 
         self.SendSizeEvent()
 
+        self.log.write(_("Number of loaded records: %d") % \
+                           self.GetItemCount())
+        
         return keyId
     
     def OnItemSelected(self, event):
@@ -502,9 +505,9 @@
 
         # events
         self.btnQuit.Bind(wx.EVT_BUTTON,            self.OnCloseWindow)
+        self.notebook.Bind(FN.EVT_FLATNOTEBOOK_PAGE_CHANGED, self.OnPageChanged)
         self.Bind(FN.EVT_FLATNOTEBOOK_PAGE_CHANGED, self.OnLayerPageChanged, self.browsePage)
-        self.Bind(FN.EVT_FLATNOTEBOOK_PAGE_CHANGED, self.OnLayerPageChanged, self.manageTablePage)
-
+        
         # do layout
         self.__layout()
 
@@ -1558,6 +1561,18 @@
         except:
             pass
 
+        event.Skip()
+        
+    def OnPageChanged(self, event):
+        if event.GetSelection() == 0:
+            self.log.write(_("Number of loaded records: %d") % \
+                               self.FindWindowById(self.layerPage[self.layer]['data']).\
+                               GetItemCount())
+        else:
+            self.log.write("")
+        
+        event.Skip()
+        
     def OnLayerRightUp(self, event):
         """Layer description area, context menu"""
         pass



More information about the grass-commit mailing list