mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-13 10:29:17 +02:00
* patches from Gabor
This commit is contained in:
parent
20453b1973
commit
ba891366d5
@ -164,7 +164,7 @@ begin
|
|||||||
NewItem('~C~alculator', '', kbNoKey, cmCalculator, hcCalculator,
|
NewItem('~C~alculator', '', kbNoKey, cmCalculator, hcCalculator,
|
||||||
nil)))),
|
nil)))),
|
||||||
NewSubMenu('~O~ptions', hcOptionsMenu, NewMenu(
|
NewSubMenu('~O~ptions', hcOptionsMenu, NewMenu(
|
||||||
NewItem('Mode...','', kbNoKey, cmSetSwitchesMode, hcSetSwitchesMode,
|
NewItem('Mode~.~..','', kbNoKey, cmSetSwitchesMode, hcSetSwitchesMode,
|
||||||
NewItem('~C~ompiler...','', kbNoKey, cmCompiler, hcCompiler,
|
NewItem('~C~ompiler...','', kbNoKey, cmCompiler, hcCompiler,
|
||||||
NewItem('~M~emory sizes...','', kbNoKey, cmMemorySizes, hcMemorySizes,
|
NewItem('~M~emory sizes...','', kbNoKey, cmMemorySizes, hcMemorySizes,
|
||||||
NewItem('~L~inker...','', kbNoKey, cmLinker, hcLinker,
|
NewItem('~L~inker...','', kbNoKey, cmLinker, hcLinker,
|
||||||
@ -498,17 +498,43 @@ begin
|
|||||||
DoneTemplates;
|
DoneTemplates;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function IsSwitch(Param: string): boolean;
|
||||||
|
begin
|
||||||
|
IsSwitch:=(Param<>'') and (Param[1]<>DirSep) { <- allow UNIX root-relative paths }
|
||||||
|
and (Param[1] in ['-','/']); { <- but still accept dos switch char, eg. '/' }
|
||||||
|
end;
|
||||||
|
|
||||||
var MyApp: TIDEApp;
|
var MyApp: TIDEApp;
|
||||||
|
|
||||||
procedure InitApp;
|
procedure ProcessParams(BeforeINI: boolean);
|
||||||
var S: string;
|
var I: integer;
|
||||||
I: integer;
|
Param: string;
|
||||||
begin
|
begin
|
||||||
for I:=1 to ParamCount do
|
for I:=1 to ParamCount do
|
||||||
begin
|
begin
|
||||||
S:=ParamStr(I);
|
Param:=ParamStr(I);
|
||||||
if not(S[1] in['-','/']) then
|
if IsSwitch(Param) then
|
||||||
MyApp.Open(S);
|
begin
|
||||||
|
Param:=copy(Param,2,255);
|
||||||
|
if Param<>'' then
|
||||||
|
case Upcase(Param[1]) of
|
||||||
|
'C' : { custom config file (BP compatiblity) }
|
||||||
|
if BeforeINI then
|
||||||
|
INIPath:=copy(Param,2,255);
|
||||||
|
'R' : { enter the directory last exited from (BP comp.) }
|
||||||
|
begin
|
||||||
|
Param:=copy(Param,2,255);
|
||||||
|
if (Param='') or (Param='+') then
|
||||||
|
StartupOptions:=StartupOptions or soReturnToLastDir
|
||||||
|
else
|
||||||
|
if (Param='-') then
|
||||||
|
StartupOptions:=StartupOptions and (not soReturnToLastDir);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if BeforeINI=false then
|
||||||
|
MyApp.Open(Param);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -516,6 +542,8 @@ BEGIN
|
|||||||
writeln('þ Free Pascal IDE Version '+VersionStr);
|
writeln('þ Free Pascal IDE Version '+VersionStr);
|
||||||
StartupDir:=CompleteDir(FExpand('.'));
|
StartupDir:=CompleteDir(FExpand('.'));
|
||||||
|
|
||||||
|
ProcessParams(true);
|
||||||
|
|
||||||
InitReservedWords;
|
InitReservedWords;
|
||||||
InitHelpFiles;
|
InitHelpFiles;
|
||||||
InitSwitches;
|
InitSwitches;
|
||||||
@ -527,7 +555,9 @@ BEGIN
|
|||||||
ReadSwitches(SwitchesPath);
|
ReadSwitches(SwitchesPath);
|
||||||
|
|
||||||
MyApp.Init;
|
MyApp.Init;
|
||||||
InitApp;
|
|
||||||
|
ProcessParams(false);
|
||||||
|
|
||||||
MyApp.Run;
|
MyApp.Run;
|
||||||
MyApp.Done;
|
MyApp.Done;
|
||||||
|
|
||||||
@ -540,7 +570,10 @@ BEGIN
|
|||||||
END.
|
END.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.2 1998-12-28 15:47:40 peter
|
Revision 1.3 1998-12-30 13:38:38 peter
|
||||||
|
* patches from Gabor
|
||||||
|
|
||||||
|
Revision 1.2 1998/12/28 15:47:40 peter
|
||||||
+ Added user screen support, display & window
|
+ Added user screen support, display & window
|
||||||
+ Implemented Editor,Mouse Options dialog
|
+ Implemented Editor,Mouse Options dialog
|
||||||
+ Added location of .INI and .CFG file
|
+ Added location of .INI and .CFG file
|
||||||
|
@ -46,6 +46,9 @@ const
|
|||||||
acFirstAction = acTopicSearch;
|
acFirstAction = acTopicSearch;
|
||||||
acLastAction = acBrowseSymbol;
|
acLastAction = acBrowseSymbol;
|
||||||
|
|
||||||
|
{ Startup Option constants }
|
||||||
|
soReturnToLastDir = $00000001;
|
||||||
|
|
||||||
{ Command constants }
|
{ Command constants }
|
||||||
cmShowClipboard = 201;
|
cmShowClipboard = 201;
|
||||||
cmFindProcedure = 206;
|
cmFindProcedure = 206;
|
||||||
@ -241,7 +244,10 @@ implementation
|
|||||||
END.
|
END.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.2 1998-12-28 15:47:43 peter
|
Revision 1.3 1998-12-30 13:38:39 peter
|
||||||
|
* patches from Gabor
|
||||||
|
|
||||||
|
Revision 1.2 1998/12/28 15:47:43 peter
|
||||||
+ Added user screen support, display & window
|
+ Added user screen support, display & window
|
||||||
+ Implemented Editor,Mouse Options dialog
|
+ Implemented Editor,Mouse Options dialog
|
||||||
+ Added location of .INI and .CFG file
|
+ Added location of .INI and .CFG file
|
||||||
|
@ -64,10 +64,11 @@ const
|
|||||||
ieCtrlClickAction = 'CtrlClickAction';
|
ieCtrlClickAction = 'CtrlClickAction';
|
||||||
|
|
||||||
procedure InitINIFile;
|
procedure InitINIFile;
|
||||||
|
var S: string;
|
||||||
begin
|
begin
|
||||||
INIPath:=LocateFile(ININame);
|
S:=LocateFile(ININame);
|
||||||
if INIPath='' then
|
if S<>'' then
|
||||||
INIPath:=ININame;
|
INIPath:=S;
|
||||||
INIPath:=FExpand(INIPath);
|
INIPath:=FExpand(INIPath);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -223,7 +224,10 @@ end;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.2 1998-12-30 10:25:01 peter
|
Revision 1.3 1998-12-30 13:38:40 peter
|
||||||
|
* patches from Gabor
|
||||||
|
|
||||||
|
Revision 1.2 1998/12/30 10:25:01 peter
|
||||||
* fixed readinifile
|
* fixed readinifile
|
||||||
|
|
||||||
Revision 1.1 1998/12/28 15:47:45 peter
|
Revision 1.1 1998/12/28 15:47:45 peter
|
||||||
|
@ -38,7 +38,13 @@ begin
|
|||||||
for I:=high(TSwitchMode) downto low(TSwitchMode) do
|
for I:=high(TSwitchMode) downto low(TSwitchMode) do
|
||||||
LastItem:=NewSItem(SwitchesModeName[I], LastItem);
|
LastItem:=NewSItem(SwitchesModeName[I], LastItem);
|
||||||
New(RB, Init(R2, LastItem));
|
New(RB, Init(R2, LastItem));
|
||||||
RB^.SetData(SwitchesMode);
|
L:=ord(SwitchesMode);
|
||||||
|
{ ^^^ this is necessary, since TRadioButtons.GetData() reads a full
|
||||||
|
longint and by just specifying the SwitchesMode var (only 1 bytes),
|
||||||
|
the three bytes located next to it in the memory will determine the
|
||||||
|
three most significant bytes of the longint. And if they aren't all
|
||||||
|
zero, then we will select some items outside the actual ones... }
|
||||||
|
RB^.SetData(L);
|
||||||
Insert(RB);
|
Insert(RB);
|
||||||
R2.Copy(R);
|
R2.Copy(R);
|
||||||
R2.B.Y:=R2.A.Y+1;
|
R2.B.Y:=R2.A.Y+1;
|
||||||
@ -645,7 +651,10 @@ end;
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.2 1998-12-28 15:47:49 peter
|
Revision 1.3 1998-12-30 13:38:41 peter
|
||||||
|
* patches from Gabor
|
||||||
|
|
||||||
|
Revision 1.2 1998/12/28 15:47:49 peter
|
||||||
+ Added user screen support, display & window
|
+ Added user screen support, display & window
|
||||||
+ Implemented Editor,Mouse Options dialog
|
+ Implemented Editor,Mouse Options dialog
|
||||||
+ Added location of .INI and .CFG file
|
+ Added location of .INI and .CFG file
|
||||||
|
@ -45,6 +45,7 @@ const ClipboardWindow : PClipboardWindow = nil;
|
|||||||
SwitchesPath : string = SwitchesName;
|
SwitchesPath : string = SwitchesName;
|
||||||
CtrlMouseAction : integer = acTopicSearch;
|
CtrlMouseAction : integer = acTopicSearch;
|
||||||
AltMouseAction : integer = acBrowseSymbol;
|
AltMouseAction : integer = acBrowseSymbol;
|
||||||
|
StartupOptions : longint = 0;
|
||||||
|
|
||||||
ActionCommands : array[acFirstAction..acLastAction] of word =
|
ActionCommands : array[acFirstAction..acLastAction] of word =
|
||||||
(cmHelpTopicSearch,cmGotoCursor,cmToggleBreakpoint,
|
(cmHelpTopicSearch,cmGotoCursor,cmToggleBreakpoint,
|
||||||
@ -59,7 +60,10 @@ implementation
|
|||||||
END.
|
END.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.1 1998-12-28 15:47:54 peter
|
Revision 1.2 1998-12-30 13:38:42 peter
|
||||||
|
* patches from Gabor
|
||||||
|
|
||||||
|
Revision 1.1 1998/12/28 15:47:54 peter
|
||||||
+ Added user screen support, display & window
|
+ Added user screen support, display & window
|
||||||
+ Implemented Editor,Mouse Options dialog
|
+ Implemented Editor,Mouse Options dialog
|
||||||
+ Added location of .INI and .CFG file
|
+ Added location of .INI and .CFG file
|
||||||
|
Loading…
Reference in New Issue
Block a user