[Greater-commits] r3682 - in branches/3.0.0-all-models/GREAT-ER: . Greater/UI
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Tue Jul 26 11:30:38 CEST 2011
Author: aheinecke
Date: 2011-07-26 11:30:37 +0200 (Tue, 26 Jul 2011)
New Revision: 3682
Modified:
branches/3.0.0-all-models/GREAT-ER/
branches/3.0.0-all-models/GREAT-ER/ChangeLog
branches/3.0.0-all-models/GREAT-ER/Greater/UI/mainwindow.py
Log:
Merged revisions 3611 via svnmerge from
svn+ssh://wald.intevation.org/greater/trunk/GREAT-ER
........
r3611 | aheinecke | 2011-07-18 15:09:22 +0200 (Mon, 18 Jul 2011) | 2 lines
Fix Menubar activations
........
Property changes on: branches/3.0.0-all-models/GREAT-ER
___________________________________________________________________
Name: svnmerge-integrated
- /trunk/GREAT-ER:1-232,310,312-315,319,322,327,333,335,340-344,346-347,368,375,397-398,400,403,410,412-431,434-448,3577-3578,3604-3606
+ /trunk/GREAT-ER:1-232,310,312-315,319,322,327,333,335,340-344,346-347,368,375,397-398,400,403,410,412-431,434-448,3577-3578,3604-3606,3611
Modified: branches/3.0.0-all-models/GREAT-ER/ChangeLog
===================================================================
--- branches/3.0.0-all-models/GREAT-ER/ChangeLog 2011-07-26 09:29:00 UTC (rev 3681)
+++ branches/3.0.0-all-models/GREAT-ER/ChangeLog 2011-07-26 09:30:37 UTC (rev 3682)
@@ -3,6 +3,8 @@
* Greater/UI/mainwindow.py:
- Increase default size of the greter window to fit a third of
the screen.
+ - Fix menubar activations by matching them to specific items
+ and not relavtive positons
* Greater/UI/application.py:
- Read Thuban Startup Files to enable Thuban extentions if they
are available.
Modified: branches/3.0.0-all-models/GREAT-ER/Greater/UI/mainwindow.py
===================================================================
--- branches/3.0.0-all-models/GREAT-ER/Greater/UI/mainwindow.py 2011-07-26 09:29:00 UTC (rev 3681)
+++ branches/3.0.0-all-models/GREAT-ER/Greater/UI/mainwindow.py 2011-07-26 09:30:37 UTC (rev 3682)
@@ -76,8 +76,7 @@
def OnIdle(self, event):
"""Handle disabling and enabling menu entries on demand.
- The first and the last menu ('File' and 'Help') are always enabled.
- 'Simulation' is now always enabled, too.
+ The 'Help', 'File' and 'Simulation' Entries are always enabled.
Other menus are only enabled, if there is an open session.
"""
# FIXME: Shouldn't the menu better (de)acticated automatically
@@ -91,11 +90,11 @@
self.prev_session_open = session_open
self.prev_results_exist = results_exist_or_catchment
menubar = self.GetMenuBar()
- for idx in range(1, menubar.GetMenuCount() - 1):
+ for idx in range(0, menubar.GetMenuCount()):
label = menubar.GetLabelTop(idx).replace('&', '')
if label == 'Analysis':
menubar.EnableTop(idx, results_exist_or_catchment)
- elif label != 'Simulation':
+ elif label not in ['Simulation', 'Help', 'File']:
menubar.EnableTop(idx, session_open)
# call Skip to make sure any other idle processing is actually
More information about the Greater-commits
mailing list