[GRASS-SVN] r30094 - grass/trunk/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Feb 12 07:16:14 EST 2008
Author: martinl
Date: 2008-02-12 07:16:14 -0500 (Tue, 12 Feb 2008)
New Revision: 30094
Modified:
grass/trunk/gui/wxpython/gui_modules/menuform.py
grass/trunk/gui/wxpython/gui_modules/wxgui_utils.py
Log:
wxGUI:Use separate command output log window for each running instance (regardless of standalone status).
Modified: grass/trunk/gui/wxpython/gui_modules/menuform.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/menuform.py 2008-02-12 10:49:56 UTC (rev 30093)
+++ grass/trunk/gui/wxpython/gui_modules/menuform.py 2008-02-12 12:16:14 UTC (rev 30094)
@@ -539,8 +539,6 @@
self.task = task_description
self.parent = parent
- self.standalone = True
-
# module name + keywords
title = self.task.name
try:
@@ -576,10 +574,12 @@
# set apropriate output window
if self.parent:
self.standalone = False
- try:
- self.goutput = self.parent.GetLogWindow()
- except:
- self.goutput = None
+ else:
+ self.standalone = True
+ # try:
+ # self.goutput = self.parent.GetLogWindow()
+ # except:
+ # self.goutput = None
# logo+description
topsizer = wx.BoxSizer(wx.HORIZONTAL)
@@ -595,8 +595,9 @@
# notebooks
self.notebookpanel = cmdPanel (parent=self, task=self.task, standalone=self.standalone)
- if self.standalone:
- self.goutput = self.notebookpanel.goutput
+ ### add 'command output' tab also for dialog open from menu
+ # if self.standalone:
+ self.goutput = self.notebookpanel.goutput
self.notebookpanel.OnUpdateValues = self.updateValuesHook
guisizer.Add (item=self.notebookpanel, proportion=1, flag=wx.EXPAND)
@@ -725,10 +726,10 @@
else:
runCmd = gcmd.Command(cmd)
- if self.standalone:
- # change page if needed
- if self.notebookpanel.notebook.GetSelection() != self.notebookpanel.outpageid:
- self.notebookpanel.notebook.SetSelection(self.notebookpanel.outpageid)
+ #if self.standalone:
+ # change page if needed
+ if self.notebookpanel.notebook.GetSelection() != self.notebookpanel.outpageid:
+ self.notebookpanel.notebook.SetSelection(self.notebookpanel.outpageid)
if self.get_dcmd is None:
# close dialog?
@@ -833,11 +834,12 @@
self.notebook.AddPage( tab[section], text=section )
# are we running from command line?
- if standalone:
- from gui_modules import wxgui_utils
- self.goutput = wxgui_utils.GMConsole(self)
- self.outpage = self.notebook.AddPage(self.goutput, text=_("Command output") )
- self.outpageid = self.notebook.GetPageCount() - 1
+ ### add 'command output' tab regardless standalone dialog
+ # if standalone:
+ from gui_modules import wxgui_utils
+ self.goutput = wxgui_utils.GMConsole(self)
+ self.outpage = self.notebook.AddPage(self.goutput, text=_("Command output") )
+ self.outpageid = self.notebook.GetPageCount() - 1
manual_tab = helpPanel( parent = self.notebook, grass_command = self.task.name)
if manual_tab.Ok:
Modified: grass/trunk/gui/wxpython/gui_modules/wxgui_utils.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/wxgui_utils.py 2008-02-12 10:49:56 UTC (rev 30093)
+++ grass/trunk/gui/wxpython/gui_modules/wxgui_utils.py 2008-02-12 12:16:14 UTC (rev 30094)
@@ -1161,7 +1161,8 @@
p2 = self.cmd_output.GetCurrentPos()
self.cmd_output.StartStyling(p1, 0xff)
self.cmd_output.SetStyling(p2 - p1, self.cmd_output.StyleCommand)
-
+
+ # TODO: allow running multiple instances
grassCmd = gcmd.Command(cmdlist, wait=False,
stdout=self.cmd_stdout,
stderr=self.cmd_stderr)
More information about the grass-commit
mailing list