[GRASS-SVN] r33233 - grass/branches/develbranch_6/gui/wxpython/gui_modules

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


Author: martinl
Date: 2008-09-03 06:55:48 -0400 (Wed, 03 Sep 2008)
New Revision: 33233

Modified:
   grass/branches/develbranch_6/gui/wxpython/gui_modules/dbm.py
Log:
wxGUI: cosmetics in dbm (statusbar logging)


Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/dbm.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/dbm.py	2008-09-03 08:53:30 UTC (rev 33232)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/dbm.py	2008-09-03 10:55:48 UTC (rev 33233)
@@ -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