mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-08 05:19:08 +02:00
implemented closing unneeded package
git-svn-id: trunk@2928 -
This commit is contained in:
parent
9412a7dbef
commit
c82e149209
50
ide/main.pp
50
ide/main.pp
@ -554,7 +554,7 @@ type
|
|||||||
function DoJumpToCompilerMessage(Index:integer;
|
function DoJumpToCompilerMessage(Index:integer;
|
||||||
FocusEditor: boolean): boolean;
|
FocusEditor: boolean): boolean;
|
||||||
procedure DoShowMessagesView;
|
procedure DoShowMessagesView;
|
||||||
procedure DoArrangeSourceEditorAndMessageView;
|
procedure DoArrangeSourceEditorAndMessageView(PutOnTop: boolean);
|
||||||
function GetTestBuildDir: string; override;
|
function GetTestBuildDir: string; override;
|
||||||
function GetProjectTargetFilename: string;
|
function GetProjectTargetFilename: string;
|
||||||
function GetTestProjectFilename: string;
|
function GetTestProjectFilename: string;
|
||||||
@ -2731,7 +2731,7 @@ begin
|
|||||||
// select the new form (object inspector, formeditor, control selection)
|
// select the new form (object inspector, formeditor, control selection)
|
||||||
PropertyEditorHook1.LookupRoot := AForm;
|
PropertyEditorHook1.LookupRoot := AForm;
|
||||||
TDesigner(AForm.Designer).SelectOnlyThisComponent(AForm);
|
TDesigner(AForm.Designer).SelectOnlyThisComponent(AForm);
|
||||||
BringWindowToTop(AForm.Handle);
|
AForm.ShowOnTop;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TMainIDE.DoLoadResourceFile(AnUnitInfo: TUnitInfo;
|
function TMainIDE.DoLoadResourceFile(AnUnitInfo: TUnitInfo;
|
||||||
@ -4444,7 +4444,7 @@ Begin
|
|||||||
if OnlyForms and (AnUnitInfo.Form<>nil) then begin
|
if OnlyForms and (AnUnitInfo.Form<>nil) then begin
|
||||||
AForm:=TForm(AnUnitInfo.Form);
|
AForm:=TForm(AnUnitInfo.Form);
|
||||||
end;
|
end;
|
||||||
BringWindowToTop(AForm.Handle)
|
AForm.ShowOnTop;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
finally
|
finally
|
||||||
@ -4482,7 +4482,7 @@ begin
|
|||||||
ItemByEnum(nmiwUnitDependenciesName);
|
ItemByEnum(nmiwUnitDependenciesName);
|
||||||
ALayout.Apply;
|
ALayout.Apply;
|
||||||
if not WasVisible then
|
if not WasVisible then
|
||||||
BringWindowToTop(UnitDependenciesView.Handle);
|
UnitDependenciesView.ShowOnTop;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TMainIDE.DoOpenFileAtCursor(Sender: TObject):TModalResult;
|
function TMainIDE.DoOpenFileAtCursor(Sender: TObject):TModalResult;
|
||||||
@ -5320,8 +5320,7 @@ begin
|
|||||||
|
|
||||||
frmToDo.FileName:=Project1.MainUnitInfo.Filename;
|
frmToDo.FileName:=Project1.MainUnitInfo.Filename;
|
||||||
|
|
||||||
frmToDo.Show;
|
frmToDo.ShowOnTop;
|
||||||
BringWindowToTop(frmToDo.Handle);
|
|
||||||
Result:=mrOk;
|
Result:=mrOk;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -5368,7 +5367,7 @@ begin
|
|||||||
|
|
||||||
// show messages
|
// show messages
|
||||||
MessagesView.Clear;
|
MessagesView.Clear;
|
||||||
DoArrangeSourceEditorAndMessageView;
|
DoArrangeSourceEditorAndMessageView(false);
|
||||||
TheOutputFilter.OnOutputString:=@MessagesView.Add;
|
TheOutputFilter.OnOutputString:=@MessagesView.Add;
|
||||||
TheOutputFilter.OnReadLine:=@MessagesView.ShowProgress;
|
TheOutputFilter.OnReadLine:=@MessagesView.ShowProgress;
|
||||||
|
|
||||||
@ -6069,8 +6068,7 @@ begin
|
|||||||
|
|
||||||
else begin
|
else begin
|
||||||
if ObjectInspector1=nil then exit;
|
if ObjectInspector1=nil then exit;
|
||||||
ObjectInspector1.Show;
|
ObjectInspector1.ShowOnTop;
|
||||||
BringWindowToTop(ObjectInspector1.Handle);
|
|
||||||
FDisplayState:= Succ(FDisplayState);
|
FDisplayState:= Succ(FDisplayState);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -6089,8 +6087,7 @@ begin
|
|||||||
if AForm=nil then exit;
|
if AForm=nil then exit;
|
||||||
FDisplayState:= dsForm;
|
FDisplayState:= dsForm;
|
||||||
FLastFormActivated:=AForm;
|
FLastFormActivated:=AForm;
|
||||||
AForm.Show;
|
AForm.ShowOnTop;
|
||||||
BringWindowToTop(AForm.Handle);
|
|
||||||
if TheControlSelection.SelectionForm<>AForm then begin
|
if TheControlSelection.SelectionForm<>AForm then begin
|
||||||
// select the new form (object inspector, formeditor, control selection)
|
// select the new form (object inspector, formeditor, control selection)
|
||||||
PropertyEditorHook1.LookupRoot := AForm;
|
PropertyEditorHook1.LookupRoot := AForm;
|
||||||
@ -6110,8 +6107,7 @@ begin
|
|||||||
SourceNotebook.Notebook.PageIndex:= ActiveUnitInfo.EditorIndex;
|
SourceNotebook.Notebook.PageIndex:= ActiveUnitInfo.EditorIndex;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
SourceNoteBook.Show;
|
SourceNoteBook.ShowOnTop;
|
||||||
BringWindowToTop(SourceNoteBook.Handle);
|
|
||||||
FDisplayState:= dsSource;
|
FDisplayState:= dsSource;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -6294,7 +6290,8 @@ begin
|
|||||||
if TopLine<1 then TopLine:=1;
|
if TopLine<1 then TopLine:=1;
|
||||||
if FocusEditor then begin
|
if FocusEditor then begin
|
||||||
//SourceNotebook.BringToFront;
|
//SourceNotebook.BringToFront;
|
||||||
BringWindowToTop(SourceNoteBook.Handle);
|
MessagesView.ShowOnTop;
|
||||||
|
SourceNoteBook.ShowOnTop;
|
||||||
SourceNotebook.FocusEditor;
|
SourceNotebook.FocusEditor;
|
||||||
end;
|
end;
|
||||||
SrcEdit.EditorComponent.CaretXY:=CaretXY;
|
SrcEdit.EditorComponent.CaretXY:=CaretXY;
|
||||||
@ -6327,19 +6324,20 @@ var
|
|||||||
ALayout: TIDEWindowLayout;
|
ALayout: TIDEWindowLayout;
|
||||||
begin
|
begin
|
||||||
WasVisible:=MessagesView.Visible;
|
WasVisible:=MessagesView.Visible;
|
||||||
MessagesView.Show;
|
MessagesView.Visible:=true;
|
||||||
ALayout:=EnvironmentOptions.IDEWindowLayoutList.
|
ALayout:=EnvironmentOptions.IDEWindowLayoutList.
|
||||||
ItemByEnum(nmiwMessagesViewName);
|
ItemByEnum(nmiwMessagesViewName);
|
||||||
ALayout.Apply;
|
ALayout.Apply;
|
||||||
if not WasVisible then
|
if not WasVisible then
|
||||||
BringWindowToTop(SourceNotebook.Handle);
|
// the sourcenotebook is more interesting than the messages
|
||||||
|
SourceNotebook.ShowOnTop;
|
||||||
|
|
||||||
//set the event here for the selectionchanged event
|
//set the event here for the selectionchanged event
|
||||||
if not assigned(MessagesView.OnSelectionChanged) then
|
if not assigned(MessagesView.OnSelectionChanged) then
|
||||||
MessagesView.OnSelectionChanged := @MessagesViewSelectionChanged;
|
MessagesView.OnSelectionChanged := @MessagesViewSelectionChanged;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TMainIDE.DoArrangeSourceEditorAndMessageView;
|
procedure TMainIDE.DoArrangeSourceEditorAndMessageView(PutOnTop: boolean);
|
||||||
begin
|
begin
|
||||||
DoShowMessagesView;
|
DoShowMessagesView;
|
||||||
|
|
||||||
@ -6348,8 +6346,10 @@ begin
|
|||||||
and ((SourceNotebook.Top+SourceNotebook.Height) > MessagesView.Top) then
|
and ((SourceNotebook.Top+SourceNotebook.Height) > MessagesView.Top) then
|
||||||
SourceNotebook.Height := Max(50,Min(SourceNotebook.Height,
|
SourceNotebook.Height := Max(50,Min(SourceNotebook.Height,
|
||||||
MessagesView.Top-SourceNotebook.Top));
|
MessagesView.Top-SourceNotebook.Top));
|
||||||
MessagesView.BringToFront;
|
if PutOnTop then begin
|
||||||
SourceNotebook.BringToFront;
|
MessagesView.ShowOnTop;
|
||||||
|
SourceNotebook.ShowOnTop;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TMainIDE.GetTestBuildDir: string;
|
function TMainIDE.GetTestBuildDir: string;
|
||||||
@ -6934,7 +6934,7 @@ begin
|
|||||||
TopLine:=NewTopLine;
|
TopLine:=NewTopLine;
|
||||||
LeftChar:=Max(NewX-CharsInWindow,1);
|
LeftChar:=Max(NewX-CharsInWindow,1);
|
||||||
end;
|
end;
|
||||||
BringWindowToTop(SourceNoteBook.Handle);
|
SourceNoteBook.ShowOnTop;
|
||||||
SourceNotebook.FocusEditor;
|
SourceNotebook.FocusEditor;
|
||||||
UpdateSourceNames;
|
UpdateSourceNames;
|
||||||
Result:=mrOk;
|
Result:=mrOk;
|
||||||
@ -7009,7 +7009,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
// syntax error -> show error and jump
|
// syntax error -> show error and jump
|
||||||
// show error in message view
|
// show error in message view
|
||||||
DoArrangeSourceEditorAndMessageView;
|
DoArrangeSourceEditorAndMessageView(false);
|
||||||
MessagesView.ClearTillLastSeparator;
|
MessagesView.ClearTillLastSeparator;
|
||||||
MessagesView.AddSeparator;
|
MessagesView.AddSeparator;
|
||||||
if CodeToolBoss.ErrorCode<>nil then begin
|
if CodeToolBoss.ErrorCode<>nil then begin
|
||||||
@ -7029,7 +7029,8 @@ begin
|
|||||||
if DoOpenEditorFile(CodeToolBoss.ErrorCode.Filename,-1,[ofOnlyIfExists])=mrOk
|
if DoOpenEditorFile(CodeToolBoss.ErrorCode.Filename,-1,[ofOnlyIfExists])=mrOk
|
||||||
then begin
|
then begin
|
||||||
ActiveSrcEdit:=SourceNoteBook.GetActiveSE;
|
ActiveSrcEdit:=SourceNoteBook.GetActiveSE;
|
||||||
BringWindowToTop(SourceNoteBook.Handle);
|
MessagesView.ShowOnTop;
|
||||||
|
SourceNoteBook.ShowOnTop;
|
||||||
with ActiveSrcEdit.EditorComponent do begin
|
with ActiveSrcEdit.EditorComponent do begin
|
||||||
CaretXY:=ErrorCaret;
|
CaretXY:=ErrorCaret;
|
||||||
BlockBegin:=CaretXY;
|
BlockBegin:=CaretXY;
|
||||||
@ -7770,7 +7771,7 @@ begin
|
|||||||
|
|
||||||
ToolStatus:=itBuilder;
|
ToolStatus:=itBuilder;
|
||||||
MessagesView.Clear;
|
MessagesView.Clear;
|
||||||
DoArrangeSourceEditorAndMessageView;
|
DoArrangeSourceEditorAndMessageView(false);
|
||||||
|
|
||||||
TheOutputFilter.OnOutputString:=@MessagesView.Add;
|
TheOutputFilter.OnOutputString:=@MessagesView.Add;
|
||||||
TheOutputFilter.OnReadLine:=@MessagesView.ShowProgress;
|
TheOutputFilter.OnReadLine:=@MessagesView.ShowProgress;
|
||||||
@ -8255,6 +8256,9 @@ end.
|
|||||||
|
|
||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.519 2003/04/11 21:21:34 mattias
|
||||||
|
implemented closing unneeded package
|
||||||
|
|
||||||
Revision 1.518 2003/04/10 19:42:16 mattias
|
Revision 1.518 2003/04/10 19:42:16 mattias
|
||||||
implemented package graph showing open packages
|
implemented package graph showing open packages
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user