|
@@ -204,9 +204,6 @@ type
|
|
|
function GetPalette: PPalette; virtual;
|
|
|
constructor Load(var S: TStream);
|
|
|
procedure Store(var S: TStream);
|
|
|
- procedure Show; virtual;
|
|
|
- procedure Hide; virtual;
|
|
|
- procedure Close; virtual;
|
|
|
destructor Done; virtual;
|
|
|
end;
|
|
|
|
|
@@ -2674,15 +2671,17 @@ begin
|
|
|
end;
|
|
|
|
|
|
procedure TSourceWindow.UpdateCommands;
|
|
|
-var Active: boolean;
|
|
|
+var Active, Visible: boolean;
|
|
|
begin
|
|
|
- Active:=GetState(sfActive);
|
|
|
+ Visible:=GetState(sfVisible);
|
|
|
+ Active:=GetState(sfActive) and Visible;
|
|
|
if Editor^.IsClipboard=false then
|
|
|
begin
|
|
|
SetCmdState(SourceCmds+CompileCmds,Active);
|
|
|
SetCmdState(EditorCmds,Active);
|
|
|
end;
|
|
|
SetCmdState(ToClipCmds+FromClipCmds+NulClipCmds+UndoCmd+RedoCmd+[cmHide],Active);
|
|
|
+ SetCmdState([cmTile,cmCascade],Visible or IsThereAnyVisibleEditorWindow);
|
|
|
Message(Application,evBroadcast,cmCommandSetChanged,nil);
|
|
|
end;
|
|
|
|
|
@@ -2723,23 +2722,6 @@ begin
|
|
|
PopStatus;
|
|
|
end;
|
|
|
|
|
|
-procedure TSourceWindow.Show;
|
|
|
-begin
|
|
|
- inherited Show;
|
|
|
- IDEApp.SetCmdState([cmTile,cmCascade],true);
|
|
|
-end;
|
|
|
-
|
|
|
-procedure TSourceWindow.Hide;
|
|
|
-begin
|
|
|
- inherited Hide;
|
|
|
- IDEApp.SetCmdState([cmTile,cmCascade],IsThereAnyVisibleEditorWindow);
|
|
|
-end;
|
|
|
-
|
|
|
-procedure TSourceWindow.Close;
|
|
|
-begin
|
|
|
- inherited Close;
|
|
|
-end;
|
|
|
-
|
|
|
destructor TSourceWindow.Done;
|
|
|
begin
|
|
|
PushStatus(FormatStrStr(msg_closingfile,GetStr(Title)));
|
|
@@ -4322,10 +4304,7 @@ begin
|
|
|
{ this makes loading a lot slower and is not needed as far as I can see (FK)
|
|
|
Message(Application,evBroadcast,cmUpdate,nil);
|
|
|
}
|
|
|
- if ShowIt then
|
|
|
- W^.SetCmdState([cmTile,cmCascade,cmSaveAll],true)
|
|
|
- else
|
|
|
- W^.SetCmdState([cmSaveAll],true);
|
|
|
+ W^.SetCmdState([cmSaveAll],true);
|
|
|
end;
|
|
|
PopStatus;
|
|
|
IOpenEditorWindow:=W;
|