[GRASS-SVN] r32026 -
grass/branches/develbranch_6/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Jul 6 08:42:39 EDT 2008
Author: martinl
Date: 2008-07-06 08:42:39 -0400 (Sun, 06 Jul 2008)
New Revision: 32026
Modified:
grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py
Log:
wxGUI/dialog: disable all buttons OnRun (cancel, help, copy, run) [merged from trunk r32025]
Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py 2008-07-06 12:41:24 UTC (rev 32025)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py 2008-07-06 12:42:39 UTC (rev 32026)
@@ -646,14 +646,14 @@
# buttons
btnsizer = wx.BoxSizer(orient=wx.HORIZONTAL)
# cancel
- btn_cancel = wx.Button(parent=self.panel, id=wx.ID_CANCEL)
- btn_cancel.SetToolTipString(_("Cancel the command settings and ignore changes"))
- btnsizer.Add(item=btn_cancel, proportion=0, flag=wx.ALL | wx.ALIGN_CENTER, border=10)
- btn_cancel.Bind(wx.EVT_BUTTON, self.OnCancel)
+ self.btn_cancel = wx.Button(parent=self.panel, id=wx.ID_CANCEL)
+ self.btn_cancel.SetToolTipString(_("Cancel the command settings and ignore changes"))
+ btnsizer.Add(item=self.btn_cancel, proportion=0, flag=wx.ALL | wx.ALIGN_CENTER, border=10)
+ self.btn_cancel.Bind(wx.EVT_BUTTON, self.OnCancel)
# help
- btn_help = wx.Button(parent=self.panel, id=wx.ID_HELP)
- btn_help.SetToolTipString(_("Show manual page of the command"))
- btn_help.Bind(wx.EVT_BUTTON, self.OnHelp)
+ self.btn_help = wx.Button(parent=self.panel, id=wx.ID_HELP)
+ self.btn_help.SetToolTipString(_("Show manual page of the command"))
+ self.btn_help.Bind(wx.EVT_BUTTON, self.OnHelp)
if self.get_dcmd is not None: # A callback has been set up
btn_apply = wx.Button(parent=self.panel, id=wx.ID_APPLY)
btn_ok = wx.Button(parent=self.panel, id=wx.ID_OK)
@@ -678,8 +678,8 @@
self.btn_abort.SetToolTipString(_("Abort the running command"))
self.btn_abort.Enable(False)
# copy
- btn_clipboard = wx.Button(parent=self.panel, id=wx.ID_COPY)
- btn_clipboard.SetToolTipString(_("Copy the current command string to the clipboard"))
+ self.btn_clipboard = wx.Button(parent=self.panel, id=wx.ID_COPY)
+ self.btn_clipboard.SetToolTipString(_("Copy the current command string to the clipboard"))
btnsizer.Add(item=self.btn_abort, proportion=0,
flag=wx.ALL | wx.ALIGN_CENTER,
@@ -689,16 +689,16 @@
flag=wx.ALL | wx.ALIGN_CENTER,
border=10)
- btnsizer.Add(item=btn_clipboard, proportion=0,
+ btnsizer.Add(item=self.btn_clipboard, proportion=0,
flag=wx.ALL | wx.ALIGN_CENTER,
border=10)
self.btn_run.Bind(wx.EVT_BUTTON, self.OnRun)
self.btn_abort.Bind(wx.EVT_BUTTON, self.OnAbort)
- btn_clipboard.Bind(wx.EVT_BUTTON, self.OnCopy)
+ self.btn_clipboard.Bind(wx.EVT_BUTTON, self.OnCopy)
# add help button
- btnsizer.Add(item=btn_help, proportion=0, flag=wx.ALL | wx.ALIGN_CENTER, border=10)
+ btnsizer.Add(item=self.btn_help, proportion=0, flag=wx.ALL | wx.ALIGN_CENTER, border=10)
guisizer.Add(item=btnsizer, proportion=0, flag=wx.ALIGN_CENTER)
@@ -798,7 +798,11 @@
gcmd.Command(cmd)
# update buttons status
- self.btn_run.Enable(False)
+ for btn in (self.btn_run,
+ self.btn_cancel,
+ self.btn_clipboard,
+ self.btn_help):
+ btn.Enable(False)
self.btn_abort.Enable(True)
def OnAbort(self, event):
@@ -808,7 +812,11 @@
except IndexError:
pass
- self.btn_run.Enable(True)
+ for btn in (self.btn_run,
+ self.btn_cancel,
+ self.btn_clipboard,
+ self.btn_help):
+ btn.Enable(True)
self.btn_abort.Enable(False)
def OnCopy(self, event):
More information about the grass-commit
mailing list