[GRASS-SVN] r43288 - in grass/branches/develbranch_6/gui/wxpython: . gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Aug 26 18:38:18 EDT 2010


Author: martinl
Date: 2010-08-26 22:38:17 +0000 (Thu, 26 Aug 2010)
New Revision: 43288

Modified:
   grass/branches/develbranch_6/gui/wxpython/gui_modules/gmodeler.py
   grass/branches/develbranch_6/gui/wxpython/gui_modules/goutput.py
   grass/branches/develbranch_6/gui/wxpython/wxgui.py
Log:
wxGUI: prompt focus cosmetics
(merge r43287 from trunk)


Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/gmodeler.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/gmodeler.py	2010-08-26 22:36:37 UTC (rev 43287)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/gmodeler.py	2010-08-26 22:38:17 UTC (rev 43288)
@@ -2372,7 +2372,6 @@
         @param parent parent window
         @param id window id
         @param title window title
-
         @param kwargs wx.Dialogs' arguments
         """
         self.parent = parent
@@ -2388,6 +2387,7 @@
         
         self.cmd_prompt = prompt.GPromptSTC(parent = self)
         self.search = SearchModuleWindow(parent = self.panel, cmdPrompt = self.cmd_prompt, showTip = True)
+        wx.CallAfter(self.cmd_prompt.SetFocus)
         
         # get commands
         items = self.cmd_prompt.GetCommandItems()

Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/goutput.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/goutput.py	2010-08-26 22:36:37 UTC (rev 43287)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/goutput.py	2010-08-26 22:38:17 UTC (rev 43288)
@@ -197,7 +197,7 @@
         
         # search & command prompt
         self.cmd_prompt = prompt.GPromptSTC(parent = self)
-                
+        
         if self.parent.GetName() != 'LayerManager':
             self.search = None
             self.cmd_prompt.Hide()
@@ -704,7 +704,6 @@
 
         # set focus on prompt
         if self.parent.GetName() == "LayerManager":
-            self.cmd_prompt.SetFocus()
             self.btn_abort.Enable(False)
         else:
             # updated command dialog

Modified: grass/branches/develbranch_6/gui/wxpython/wxgui.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/wxgui.py	2010-08-26 22:36:37 UTC (rev 43287)
+++ grass/branches/develbranch_6/gui/wxpython/wxgui.py	2010-08-26 22:38:17 UTC (rev 43288)
@@ -193,7 +193,7 @@
         if self.curr_page:
             self.curr_page.maptree.mapdisplay.Raise()
         wx.CallAfter(self.Raise)
-
+        
     def __createNoteBook(self):
         """!Creates notebook widgets"""
         if globalvar.hasAgw:
@@ -298,26 +298,17 @@
                        onDone = self.OnDone)
         
     def OnMapsets(self, event):
+        """!Launch mapset access dialog
         """
-        Launch mapset access dialog
-        """
-        dlg = preferences.MapsetAccess(parent=self, id=wx.ID_ANY)
+        dlg = preferences.MapsetAccess(parent = self, id = wx.ID_ANY)
         dlg.CenterOnScreen()
-
-        # if OK is pressed...
+        
         if dlg.ShowModal() == wx.ID_OK:
             ms = dlg.GetMapsets()
-            # run g.mapsets with string of accessible mapsets
             gcmd.RunCommand('g.mapsets',
                             parent = self,
                             mapset = '%s' % ','.join(ms))
-            
-    def OnRDigit(self, event):
-        """
-        Launch raster digitizing module
-        """
-        pass
-
+        
     def OnCBPageChanged(self, event):
         """!Page in notebook (display) changed"""
         old_pgnum = event.GetOldSelection()
@@ -325,7 +316,6 @@
         
         self.curr_page   = self.gm_cb.GetCurrentPage()
         self.curr_pagenum = self.gm_cb.GetSelection()
-        
         try:
             self.curr_page.maptree.mapdisplay.SetFocus()
             self.curr_page.maptree.mapdisplay.Raise()
@@ -340,7 +330,7 @@
         if page == self.goutput.pageid:
             # remove '(...)'
             self.notebook.SetPageText(page, _("Command console"))
-            self.goutput.cmd_prompt.SetSTCFocus(True)
+            wx.CallAfter(self.goutput.cmd_prompt.SetFocus)
         self.SetStatusText('', 0)
         
         event.Skip()



More information about the grass-commit mailing list