synedit now stops, when key was handled

git-svn-id: trunk@6321 -
This commit is contained in:
mattias 2004-12-02 11:23:41 +00:00
parent eb92b0e1d3
commit 330e4a4b46
2 changed files with 20 additions and 3 deletions

View File

@ -6739,9 +6739,15 @@ begin
ExecuteCommand(Command, AChar, Data); ExecuteCommand(Command, AChar, Data);
// notify hooked command handlers after the command was executed inside of // notify hooked command handlers after the command was executed inside of
// the class // the class
NotifyHookedCommandHandlers(TRUE, Command, AChar, Data); {$IFDEF SYN_LAZARUS}
if Command <> ecNone then
{$ENDIF}
NotifyHookedCommandHandlers(TRUE, Command, AChar, Data);
end; end;
DoOnCommandProcessed(Command, AChar, Data); {$IFDEF SYN_LAZARUS}
if Command <> ecNone then
{$ENDIF}
DoOnCommandProcessed(Command, AChar, Data);
end; end;
procedure TCustomSynEdit.ExecuteCommand(Command: TSynEditorCommand; procedure TCustomSynEdit.ExecuteCommand(Command: TSynEditorCommand;

View File

@ -2033,6 +2033,9 @@ begin
ecSaveAll: ecSaveAll:
DoSaveAll([sfCheckAmbigiousFiles]); DoSaveAll([sfCheckAmbigiousFiles]);
ecQuit:
mnuQuitClicked(Self);
ecBuild: ecBuild:
begin begin
@ -6233,6 +6236,7 @@ procedure TMainIDE.DoRestart;
{$IFNDEF VER1_0} {$IFNDEF VER1_0}
StartLazProcess := TProcess.Create(nil); StartLazProcess := TProcess.Create(nil);
try try
// TODO: use the target directory, where the new startlazarus is
StartLazProcess.CurrentDirectory := ExtractFileDir(ParamStr(0)); StartLazProcess.CurrentDirectory := ExtractFileDir(ParamStr(0));
ExeName := AppendPathDelim(StartLazProcess.CurrentDirectory) + ExeName := AppendPathDelim(StartLazProcess.CurrentDirectory) +
'startlazarus' + GetDefaultExecutableExt; 'startlazarus' + GetDefaultExecutableExt;
@ -6250,6 +6254,7 @@ procedure TMainIDE.DoRestart;
{$ENDIF} {$ENDIF}
end; end;
var CanClose: boolean;
begin begin
{$IFDEF VER1_0} {$IFDEF VER1_0}
if not StartedByStartLazarus then begin if not StartedByStartLazarus then begin
@ -6257,7 +6262,10 @@ begin
exit; exit;
end; end;
{$ENDIF} {$ENDIF}
mnuQuitClicked(Self); CanClose:=true;
MainIDEBar.OnCloseQuery(Self, CanClose);
if not CanClose then exit;
MainIDEBar.Close;
if Application.Terminated then begin if Application.Terminated then begin
if StartedByStartLazarus then if StartedByStartLazarus then
ExitCode := ExitCodeRestartLazarus ExitCode := ExitCodeRestartLazarus
@ -10955,6 +10963,9 @@ end.
{ ============================================================================= { =============================================================================
$Log$ $Log$
Revision 1.802 2004/12/02 11:23:41 mattias
synedit now stops, when key was handled
Revision 1.801 2004/11/26 21:43:41 vincents Revision 1.801 2004/11/26 21:43:41 vincents
fixed fpc 1.0.x compilation fixed fpc 1.0.x compilation