Browse Source

SD2-714 - Save all menu option not disabled after saving all files. The OpenWindowStateEvaluator was looking for a condition called windowstate instead of openwindowstate.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/2.0@1208 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Matt Ward 20 years ago
parent
commit
c7a105f3a3
  1. 4
      AddIns/ICSharpCode.SharpDevelop.addin
  2. 4
      src/Main/Base/Project/Src/Internal/ConditionEvaluators/OpenWindowStateEvaluator.cs

4
AddIns/ICSharpCode.SharpDevelop.addin

@ -931,10 +931,12 @@
<MenuItem id = "SaveAs" <MenuItem id = "SaveAs"
label = "${res:OpenFileTabEventHandler.ContextMenu.SaveAs}" label = "${res:OpenFileTabEventHandler.ContextMenu.SaveAs}"
class = "ICSharpCode.SharpDevelop.Commands.TabStrip.SaveFileAsTab"/> class = "ICSharpCode.SharpDevelop.Commands.TabStrip.SaveFileAsTab"/>
<MenuItem id = "SaveAll" <Condition name = "OpenWindowState" openwindowstate="Dirty" action="Disable">
<MenuItem id = "SaveAll"
icon = "Icons.16x16.SaveAllIcon" icon = "Icons.16x16.SaveAllIcon"
label = "${res:XML.MainMenu.FileMenu.SaveAll.Description}" label = "${res:XML.MainMenu.FileMenu.SaveAll.Description}"
class = "ICSharpCode.SharpDevelop.Commands.SaveAllFiles"/> class = "ICSharpCode.SharpDevelop.Commands.SaveAllFiles"/>
</Condition>
<MenuItem id = "SaveSeparator" type = "Separator" /> <MenuItem id = "SaveSeparator" type = "Separator" />
<ComplexCondition action="Disable"> <ComplexCondition action="Disable">
<Not> <Not>

4
src/Main/Base/Project/Src/Internal/ConditionEvaluators/OpenWindowStateEvaluator.cs

@ -66,8 +66,8 @@ namespace ICSharpCode.Core
return false; return false;
} }
windowState = condition.Properties.Get("windowstate", WindowState.None); windowState = condition.Properties.Get("openwindowstate", WindowState.None);
nowindowState = condition.Properties.Get("nowindowstate", WindowState.None); nowindowState = condition.Properties.Get("noopenwindowstate", WindowState.None);
foreach (IViewContent view in WorkbenchSingleton.Workbench.ViewContentCollection) { foreach (IViewContent view in WorkbenchSingleton.Workbench.ViewContentCollection) {

Loading…
Cancel
Save