fpbrowser: Fixes some defines and improves the lpi

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1725 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
sekelsenmat
2011-07-01 05:41:36 +00:00
parent fb5c2019e9
commit 67e9c9c02c
3 changed files with 10 additions and 197 deletions

View File

@@ -17,10 +17,6 @@ uses
{$ENDIF} {$ENDIF}
ImgForm in 'ImgForm.pas', pageloader {ImageForm}; ImgForm in 'ImgForm.pas', pageloader {ImageForm};
{$IFDEF MSWINDOWS}
{$R *.res}
{$ENDIF}
begin begin
Application.Initialize; Application.Initialize;
Application.CreateForm(TForm1, Form1); Application.CreateForm(TForm1, Form1);

View File

@@ -6,9 +6,9 @@
<Flags> <Flags>
<LRSInOutputDirectory Value="False"/> <LRSInOutputDirectory Value="False"/>
</Flags> </Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/> <MainUnit Value="0"/>
<Title Value="fpbrowser"/> <Title Value="fpbrowser"/>
<ActiveWindowIndexAtStart Value="0"/>
</General> </General>
<VersionInfo> <VersionInfo>
<Language Value=""/> <Language Value=""/>
@@ -42,19 +42,11 @@
<DefaultFilename Value="../../components/thtmlport/package/htmlcomp.lpk" Prefer="True"/> <DefaultFilename Value="../../components/thtmlport/package/htmlcomp.lpk" Prefer="True"/>
</Item3> </Item3>
</RequiredPackages> </RequiredPackages>
<Units Count="8"> <Units Count="6">
<Unit0> <Unit0>
<Filename Value="fpbrowser.dpr"/> <Filename Value="fpbrowser.dpr"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="fpbrowser"/> <UnitName Value="fpbrowser"/>
<EditorIndex Value="0"/>
<WindowIndex Value="0"/>
<TopLine Value="1"/>
<CursorPos X="36" Y="3"/>
<UsageCount Value="25"/>
<Loaded Value="True"/>
<LoadedDesigner Value="True"/>
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit0> </Unit0>
<Unit1> <Unit1>
<Filename Value="mainform.pas"/> <Filename Value="mainform.pas"/>
@@ -63,209 +55,31 @@
<HasResources Value="True"/> <HasResources Value="True"/>
<ResourceBaseClass Value="Form"/> <ResourceBaseClass Value="Form"/>
<UnitName Value="mainform"/> <UnitName Value="mainform"/>
<IsVisibleTab Value="True"/>
<EditorIndex Value="4"/>
<WindowIndex Value="0"/>
<TopLine Value="1"/>
<CursorPos X="22" Y="310"/>
<UsageCount Value="25"/>
<Loaded Value="True"/>
<LoadedDesigner Value="True"/>
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit1> </Unit1>
<Unit2> <Unit2>
<Filename Value="submit.pas"/> <Filename Value="submit.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<HasResources Value="True"/> <HasResources Value="True"/>
<UnitName Value="Submit"/> <UnitName Value="Submit"/>
<EditorIndex Value="3"/>
<WindowIndex Value="0"/>
<TopLine Value="1"/>
<CursorPos X="1" Y="1"/>
<UsageCount Value="25"/>
<Loaded Value="True"/>
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit2> </Unit2>
<Unit3> <Unit3>
<Filename Value="fontdlg.pas"/> <Filename Value="fontdlg.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<HasResources Value="True"/> <HasResources Value="True"/>
<UnitName Value="Fontdlg"/> <UnitName Value="Fontdlg"/>
<EditorIndex Value="2"/>
<WindowIndex Value="0"/>
<TopLine Value="1"/>
<CursorPos X="1" Y="1"/>
<UsageCount Value="25"/>
<Loaded Value="True"/>
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit3> </Unit3>
<Unit4> <Unit4>
<Filename Value="htmlabt.pas"/> <Filename Value="htmlabt.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<HasResources Value="True"/> <HasResources Value="True"/>
<UnitName Value="HTMLAbt"/> <UnitName Value="HTMLAbt"/>
<EditorIndex Value="1"/>
<WindowIndex Value="0"/>
<TopLine Value="1"/>
<CursorPos X="1" Y="1"/>
<UsageCount Value="25"/>
<Loaded Value="True"/>
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit4> </Unit4>
<Unit5> <Unit5>
<Filename Value="pageloader.pas"/> <Filename Value="pageloader.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="pageloader"/> <UnitName Value="pageloader"/>
<EditorIndex Value="6"/>
<WindowIndex Value="0"/>
<TopLine Value="23"/>
<CursorPos X="17" Y="31"/>
<UsageCount Value="25"/>
<Loaded Value="True"/>
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit5> </Unit5>
<Unit6>
<Filename Value="../../../lazarus/lcl/lcltype.pp"/>
<UnitName Value="LCLType"/>
<EditorIndex Value="5"/>
<WindowIndex Value="0"/>
<TopLine Value="387"/>
<CursorPos X="12" Y="401"/>
<UsageCount Value="12"/>
<Loaded Value="True"/>
</Unit6>
<Unit7>
<Filename Value="../../components/thtmlport/package/styleun.pas"/>
<UnitName Value="StyleUn"/>
<WindowIndex Value="0"/>
<TopLine Value="2521"/>
<CursorPos X="43" Y="2554"/>
<UsageCount Value="10"/>
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit7>
</Units> </Units>
<JumpHistory Count="30" HistoryIndex="29">
<Position1>
<Filename Value="fpbrowser.dpr"/>
<Caret Line="10" Column="7" TopLine="1"/>
</Position1>
<Position2>
<Filename Value="fpbrowser.dpr"/>
<Caret Line="11" Column="6" TopLine="1"/>
</Position2>
<Position3>
<Filename Value="fpbrowser.dpr"/>
<Caret Line="12" Column="6" TopLine="1"/>
</Position3>
<Position4>
<Filename Value="mainform.pas"/>
<Caret Line="1" Column="1" TopLine="1"/>
</Position4>
<Position5>
<Filename Value="pageloader.pas"/>
<Caret Line="17" Column="24" TopLine="1"/>
</Position5>
<Position6>
<Filename Value="pageloader.pas"/>
<Caret Line="18" Column="39" TopLine="1"/>
</Position6>
<Position7>
<Filename Value="mainform.pas"/>
<Caret Line="273" Column="48" TopLine="268"/>
</Position7>
<Position8>
<Filename Value="mainform.pas"/>
<Caret Line="23" Column="55" TopLine="1"/>
</Position8>
<Position9>
<Filename Value="mainform.pas"/>
<Caret Line="270" Column="21" TopLine="246"/>
</Position9>
<Position10>
<Filename Value="pageloader.pas"/>
<Caret Line="58" Column="3" TopLine="8"/>
</Position10>
<Position11>
<Filename Value="pageloader.pas"/>
<Caret Line="42" Column="3" TopLine="18"/>
</Position11>
<Position12>
<Filename Value="mainform.pas"/>
<Caret Line="163" Column="15" TopLine="131"/>
</Position12>
<Position13>
<Filename Value="mainform.pas"/>
<Caret Line="969" Column="1" TopLine="945"/>
</Position13>
<Position14>
<Filename Value="mainform.pas"/>
<Caret Line="1" Column="1" TopLine="1"/>
</Position14>
<Position15>
<Filename Value="mainform.pas"/>
<Caret Line="422" Column="23" TopLine="381"/>
</Position15>
<Position16>
<Filename Value="mainform.pas"/>
<Caret Line="423" Column="23" TopLine="383"/>
</Position16>
<Position17>
<Filename Value="mainform.pas"/>
<Caret Line="450" Column="48" TopLine="409"/>
</Position17>
<Position18>
<Filename Value="mainform.pas"/>
<Caret Line="452" Column="21" TopLine="411"/>
</Position18>
<Position19>
<Filename Value="mainform.pas"/>
<Caret Line="2" Column="1" TopLine="1"/>
</Position19>
<Position20>
<Filename Value="mainform.pas"/>
<Caret Line="45" Column="11" TopLine="5"/>
</Position20>
<Position21>
<Filename Value="mainform.pas"/>
<Caret Line="77" Column="21" TopLine="37"/>
</Position21>
<Position22>
<Filename Value="mainform.pas"/>
<Caret Line="268" Column="24" TopLine="228"/>
</Position22>
<Position23>
<Filename Value="mainform.pas"/>
<Caret Line="272" Column="36" TopLine="232"/>
</Position23>
<Position24>
<Filename Value="mainform.pas"/>
<Caret Line="382" Column="9" TopLine="342"/>
</Position24>
<Position25>
<Filename Value="mainform.pas"/>
<Caret Line="403" Column="7" TopLine="389"/>
</Position25>
<Position26>
<Filename Value="mainform.pas"/>
<Caret Line="995" Column="17" TopLine="958"/>
</Position26>
<Position27>
<Filename Value="mainform.pas"/>
<Caret Line="1" Column="1" TopLine="1"/>
</Position27>
<Position28>
<Filename Value="mainform.pas"/>
<Caret Line="36" Column="25" TopLine="1"/>
</Position28>
<Position29>
<Filename Value="mainform.pas"/>
<Caret Line="270" Column="1" TopLine="255"/>
</Position29>
<Position30>
<Filename Value="mainform.pas"/>
<Caret Line="274" Column="5" TopLine="255"/>
</Position30>
</JumpHistory>
</ProjectOptions> </ProjectOptions>
<CompilerOptions> <CompilerOptions>
<Version Value="10"/> <Version Value="10"/>
@@ -298,6 +112,9 @@
</Options> </Options>
</Linking> </Linking>
<Other> <Other>
<CompilerMessages>
<UseMsgFile Value="True"/>
</CompilerMessages>
<CustomOptions Value="-dDebugIt"/> <CustomOptions Value="-dDebugIt"/>
<CompilerPath Value="$(CompPath)"/> <CompilerPath Value="$(CompPath)"/>
</Other> </Other>

View File

@@ -177,7 +177,7 @@ if Screen.Width <= 640 then
Position := poScreenCenter; Position := poScreenCenter;
{$ENDIF} {$ENDIF}
{$IFNDEF LCLCarbon} {$IFNDEF DARWIN}
OpenDialog.InitialDir := ExtractFilePath(ParamStr(0)); OpenDialog.InitialDir := ExtractFilePath(ParamStr(0));
{$ELSE} //Don't default to within app bundle. {$ELSE} //Don't default to within app bundle.
OpenDialog.InitialDir := ExtractFilePath(ParamStr(0)) + '../../../'; OpenDialog.InitialDir := ExtractFilePath(ParamStr(0)) + '../../../';
@@ -231,7 +231,7 @@ var
I: integer; I: integer;
begin begin
// With OS X app, ParamStr not meaningful unless launched with --args switch. // With OS X app, ParamStr not meaningful unless launched with --args switch.
if (ParamCount >= 1) {$IFDEF LCLCarbon} and (Copy(ParamStr(1), 1, 4) <> '-psn') {$ENDIF} then if (ParamCount >= 1) {$IFDEF DARWIN} and (Copy(ParamStr(1), 1, 4) <> '-psn') {$ENDIF} then
begin {Parameter is file to load} begin {Parameter is file to load}
{$IFNDEF LCL} {$IFNDEF LCL}
S := CmdLine; S := CmdLine;
@@ -358,7 +358,7 @@ if (I <= 2) or (J > 0) then
ShellExecute(Handle, nil, StrPCopy(PC, S), StrPCopy(PC2, Params), ShellExecute(Handle, nil, StrPCopy(PC, S), StrPCopy(PC2, Params),
nil, SW_SHOWNORMAL); nil, SW_SHOWNORMAL);
{$ELSE} //Not sure if this makes any sense since executable won't have .exe. {$ELSE} //Not sure if this makes any sense since executable won't have .exe.
{$IFDEF LCLCarbon} {$IFDEF DARWIN}
Shell('open -n "' + S + '" --args "' + Params + '"'); Shell('open -n "' + S + '" --args "' + Params + '"');
{$ELSE} {$ELSE}
Shell('"' + S + '" "' + Params + '"'); Shell('"' + S + '" "' + Params + '"');
@@ -391,7 +391,7 @@ if (I > 0) or (J > 0) then
{$IFDEF MSWINDOWS} {$IFDEF MSWINDOWS}
ShellExecute(0, nil, pchar(URL), nil, nil, SW_SHOWNORMAL); ShellExecute(0, nil, pchar(URL), nil, nil, SW_SHOWNORMAL);
{$ELSE} {$ELSE}
{$IFDEF LCLCarbon} {$IFDEF DARWIN}
Shell('open "' + URL + '"'); Shell('open "' + URL + '"');
{$ELSE} {$ELSE}
Shell('"' + URL + '"'); //use LCL's OpenURL? Shell('"' + URL + '"'); //use LCL's OpenURL?
@@ -878,7 +878,7 @@ begin
ShellExecute(Handle, nil, StrPCopy(PC, ParamStr(0)), ShellExecute(Handle, nil, StrPCopy(PC, ParamStr(0)),
StrPCopy(PC2, NewWindowFile), nil, SW_SHOWNORMAL); StrPCopy(PC2, NewWindowFile), nil, SW_SHOWNORMAL);
{$ELSE} {$ELSE}
{$IFDEF LCLCarbon} {$IFDEF DARWIN}
Shell('open -n "' + Shell('open -n "' +
ExtractFileDir(ExtractFileDir(ExtractFileDir(ParamStr(0)))) + ExtractFileDir(ExtractFileDir(ExtractFileDir(ParamStr(0)))) +
'" --args "' + NewWindowFile + '"'); '" --args "' + NewWindowFile + '"');