[GRASS-SVN] r43287 - in grass/trunk/gui/wxpython: . gui_modules

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


Author: martinl
Date: 2010-08-26 22:36:37 +0000 (Thu, 26 Aug 2010)
New Revision: 43287

Modified:
   grass/trunk/gui/wxpython/gui_modules/gmodeler.py
   grass/trunk/gui/wxpython/gui_modules/goutput.py
   grass/trunk/gui/wxpython/wxgui.py
Log:
wxGUI: prompt focus cosmetics


Modified: grass/trunk/gui/wxpython/gui_modules/gmodeler.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/gmodeler.py	2010-08-26 20:50:50 UTC (rev 43286)
+++ grass/trunk/gui/wxpython/gui_modules/gmodeler.py	2010-08-26 22:36:37 UTC (rev 43287)
@@ -2366,7 +2366,6 @@
         @param parent parent window
         @param id window id
         @param title window title
-
         @param kwargs wx.Dialogs' arguments
         """
         self.parent = parent
@@ -2382,6 +2381,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/trunk/gui/wxpython/gui_modules/goutput.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/goutput.py	2010-08-26 20:50:50 UTC (rev 43286)
+++ grass/trunk/gui/wxpython/gui_modules/goutput.py	2010-08-26 22:36:37 UTC (rev 43287)
@@ -198,7 +198,7 @@
         
         # search & command prompt
         self.cmd_prompt = prompt.GPromptSTC(parent = self)
-                
+        
         if self.parent.GetName() != 'LayerManager':
             self.search = None
             self.cmd_prompt.Hide()
@@ -705,7 +705,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/trunk/gui/wxpython/wxgui.py
===================================================================
--- grass/trunk/gui/wxpython/wxgui.py	2010-08-26 20:50:50 UTC (rev 43286)
+++ grass/trunk/gui/wxpython/wxgui.py	2010-08-26 22:36:37 UTC (rev 43287)
@@ -196,7 +196,7 @@
         if self.curr_page:
             self.curr_page.maptree.mapdisplay.Raise()
         wx.CallAfter(self.Raise)
-
+        
     def __createNoteBook(self):
         """!Creates notebook widgets"""
         if globalvar.hasAgw:
@@ -306,26 +306,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()
@@ -333,7 +324,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()
@@ -348,7 +338,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