1
0
mirror of https://github.com/moparisthebest/Simba synced 2025-01-31 07:10:28 -05:00

Few changes

git-svn-id: http://www.villavu.com/repositories/merlijn/mufasa@354 3f818213-9676-44b0-a9b4-5e4c4e03d09d
This commit is contained in:
Wizzup? 2009-12-31 20:38:40 +00:00
parent 568484d2e0
commit 4eba136b9c
3 changed files with 159 additions and 119 deletions

View File

@ -11,7 +11,7 @@
<TargetFileExt Value=""/> <TargetFileExt Value=""/>
<Icon Value="0"/> <Icon Value="0"/>
<UseXPManifest Value="True"/> <UseXPManifest Value="True"/>
<ActiveEditorIndexAtStart Value="6"/> <ActiveEditorIndexAtStart Value="4"/>
</General> </General>
<VersionInfo> <VersionInfo>
<ProjectVersion Value=""/> <ProjectVersion Value=""/>
@ -35,10 +35,10 @@
<Filename Value="project1.lpr"/> <Filename Value="project1.lpr"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="project1"/> <UnitName Value="project1"/>
<CursorPos X="25" Y="83"/> <CursorPos X="7" Y="124"/>
<TopLine Value="60"/> <TopLine Value="99"/>
<EditorIndex Value="0"/> <EditorIndex Value="0"/>
<UsageCount Value="116"/> <UsageCount Value="120"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit0> </Unit0>
<Unit1> <Unit1>
@ -46,15 +46,15 @@
<UnitName Value="CustApp"/> <UnitName Value="CustApp"/>
<CursorPos X="15" Y="51"/> <CursorPos X="15" Y="51"/>
<TopLine Value="32"/> <TopLine Value="32"/>
<UsageCount Value="4"/> <UsageCount Value="3"/>
</Unit1> </Unit1>
<Unit2> <Unit2>
<Filename Value="../../Units/MMLCore/client.pas"/> <Filename Value="../../Units/MMLCore/client.pas"/>
<UnitName Value="Client"/> <UnitName Value="Client"/>
<CursorPos X="20" Y="33"/> <CursorPos X="20" Y="33"/>
<TopLine Value="1"/> <TopLine Value="1"/>
<EditorIndex Value="13"/> <EditorIndex Value="11"/>
<UsageCount Value="49"/> <UsageCount Value="52"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit2> </Unit2>
<Unit3> <Unit3>
@ -62,15 +62,15 @@
<UnitName Value="windowutil"/> <UnitName Value="windowutil"/>
<CursorPos X="110" Y="30"/> <CursorPos X="110" Y="30"/>
<TopLine Value="3"/> <TopLine Value="3"/>
<UsageCount Value="4"/> <UsageCount Value="3"/>
</Unit3> </Unit3>
<Unit4> <Unit4>
<Filename Value="../../Units/MMLCore/window.pas"/> <Filename Value="../../Units/MMLCore/window.pas"/>
<UnitName Value="Window"/> <UnitName Value="Window"/>
<CursorPos X="55" Y="251"/> <CursorPos X="55" Y="251"/>
<TopLine Value="236"/> <TopLine Value="236"/>
<EditorIndex Value="17"/> <EditorIndex Value="15"/>
<UsageCount Value="48"/> <UsageCount Value="51"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit4> </Unit4>
<Unit5> <Unit5>
@ -78,8 +78,8 @@
<UnitName Value="colour_conv"/> <UnitName Value="colour_conv"/>
<CursorPos X="18" Y="346"/> <CursorPos X="18" Y="346"/>
<TopLine Value="307"/> <TopLine Value="307"/>
<EditorIndex Value="9"/> <EditorIndex Value="7"/>
<UsageCount Value="29"/> <UsageCount Value="32"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit5> </Unit5>
<Unit6> <Unit6>
@ -87,8 +87,8 @@
<UnitName Value="finder"/> <UnitName Value="finder"/>
<CursorPos X="1" Y="1728"/> <CursorPos X="1" Y="1728"/>
<TopLine Value="1701"/> <TopLine Value="1701"/>
<EditorIndex Value="8"/> <EditorIndex Value="6"/>
<UsageCount Value="52"/> <UsageCount Value="55"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit6> </Unit6>
<Unit7> <Unit7>
@ -96,8 +96,8 @@
<UnitName Value="Input"/> <UnitName Value="Input"/>
<CursorPos X="72" Y="47"/> <CursorPos X="72" Y="47"/>
<TopLine Value="36"/> <TopLine Value="36"/>
<EditorIndex Value="12"/> <EditorIndex Value="10"/>
<UsageCount Value="48"/> <UsageCount Value="51"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit7> </Unit7>
<Unit8> <Unit8>
@ -105,8 +105,8 @@
<UnitName Value="MufasaTypes"/> <UnitName Value="MufasaTypes"/>
<CursorPos X="98" Y="92"/> <CursorPos X="98" Y="92"/>
<TopLine Value="76"/> <TopLine Value="76"/>
<EditorIndex Value="18"/> <EditorIndex Value="16"/>
<UsageCount Value="50"/> <UsageCount Value="53"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit8> </Unit8>
<Unit9> <Unit9>
@ -114,23 +114,23 @@
<UnitName Value="ocr"/> <UnitName Value="ocr"/>
<CursorPos X="1" Y="133"/> <CursorPos X="1" Y="133"/>
<TopLine Value="108"/> <TopLine Value="108"/>
<EditorIndex Value="15"/> <EditorIndex Value="13"/>
<UsageCount Value="49"/> <UsageCount Value="52"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit9> </Unit9>
<Unit10> <Unit10>
<Filename Value="../../../../Documents/fpc/rtl/objpas/sysutils/diskh.inc"/> <Filename Value="../../../../Documents/fpc/rtl/objpas/sysutils/diskh.inc"/>
<CursorPos X="10" Y="18"/> <CursorPos X="10" Y="18"/>
<TopLine Value="1"/> <TopLine Value="1"/>
<UsageCount Value="5"/> <UsageCount Value="4"/>
</Unit10> </Unit10>
<Unit11> <Unit11>
<Filename Value="../../Units/MMLCore/files.pas"/> <Filename Value="../../Units/MMLCore/files.pas"/>
<UnitName Value="files"/> <UnitName Value="files"/>
<CursorPos X="22" Y="36"/> <CursorPos X="22" Y="36"/>
<TopLine Value="18"/> <TopLine Value="18"/>
<EditorIndex Value="14"/> <EditorIndex Value="12"/>
<UsageCount Value="11"/> <UsageCount Value="13"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit11> </Unit11>
<Unit12> <Unit12>
@ -138,7 +138,7 @@
<UnitName Value="Graphics"/> <UnitName Value="Graphics"/>
<CursorPos X="3" Y="243"/> <CursorPos X="3" Y="243"/>
<TopLine Value="223"/> <TopLine Value="223"/>
<UsageCount Value="7"/> <UsageCount Value="6"/>
</Unit12> </Unit12>
<Unit13> <Unit13>
<Filename Value="../../Units/MMLCore/bitmaps.pas"/> <Filename Value="../../Units/MMLCore/bitmaps.pas"/>
@ -146,42 +146,42 @@
<CursorPos X="56" Y="477"/> <CursorPos X="56" Y="477"/>
<TopLine Value="435"/> <TopLine Value="435"/>
<EditorIndex Value="1"/> <EditorIndex Value="1"/>
<UsageCount Value="47"/> <UsageCount Value="50"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit13> </Unit13>
<Unit14> <Unit14>
<Filename Value="../../../../Documents/fpc/rtl/inc/objpash.inc"/> <Filename Value="../../../../Documents/fpc/rtl/inc/objpash.inc"/>
<CursorPos X="22" Y="177"/> <CursorPos X="22" Y="177"/>
<TopLine Value="162"/> <TopLine Value="162"/>
<UsageCount Value="5"/> <UsageCount Value="4"/>
</Unit14> </Unit14>
<Unit15> <Unit15>
<Filename Value="../../../../Documents/lazarus/lcl/intfgraphics.pas"/> <Filename Value="../../../../Documents/lazarus/lcl/intfgraphics.pas"/>
<UnitName Value="IntfGraphics"/> <UnitName Value="IntfGraphics"/>
<CursorPos X="30" Y="2975"/> <CursorPos X="30" Y="2975"/>
<TopLine Value="2959"/> <TopLine Value="2959"/>
<UsageCount Value="5"/> <UsageCount Value="4"/>
</Unit15> </Unit15>
<Unit16> <Unit16>
<Filename Value="../../Units/MMLAddon/mmlpsthread.pas"/> <Filename Value="../../Units/MMLAddon/mmlpsthread.pas"/>
<UnitName Value="mmlpsthread"/> <UnitName Value="mmlpsthread"/>
<CursorPos X="3" Y="154"/> <CursorPos X="3" Y="154"/>
<TopLine Value="235"/> <TopLine Value="235"/>
<UsageCount Value="5"/> <UsageCount Value="4"/>
</Unit16> </Unit16>
<Unit17> <Unit17>
<Filename Value="../../../../Documents/fpc/rtl/i386/mmx.pp"/> <Filename Value="../../../../Documents/fpc/rtl/i386/mmx.pp"/>
<UnitName Value="mmx"/> <UnitName Value="mmx"/>
<CursorPos X="80" Y="15"/> <CursorPos X="80" Y="15"/>
<TopLine Value="71"/> <TopLine Value="71"/>
<UsageCount Value="5"/> <UsageCount Value="4"/>
</Unit17> </Unit17>
<Unit18> <Unit18>
<Filename Value="../../Units/MMLAddon/PSInc/Wrappers/ocr.inc"/> <Filename Value="../../Units/MMLAddon/PSInc/Wrappers/ocr.inc"/>
<CursorPos X="20" Y="4"/> <CursorPos X="20" Y="4"/>
<TopLine Value="1"/> <TopLine Value="1"/>
<EditorIndex Value="16"/> <EditorIndex Value="14"/>
<UsageCount Value="45"/> <UsageCount Value="48"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit18> </Unit18>
<Unit19> <Unit19>
@ -190,7 +190,7 @@
<CursorPos X="89" Y="33"/> <CursorPos X="89" Y="33"/>
<TopLine Value="1"/> <TopLine Value="1"/>
<EditorIndex Value="2"/> <EditorIndex Value="2"/>
<UsageCount Value="45"/> <UsageCount Value="48"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit19> </Unit19>
<Unit20> <Unit20>
@ -198,8 +198,8 @@
<UnitName Value="dtmutil"/> <UnitName Value="dtmutil"/>
<CursorPos X="43" Y="218"/> <CursorPos X="43" Y="218"/>
<TopLine Value="49"/> <TopLine Value="49"/>
<EditorIndex Value="10"/> <EditorIndex Value="8"/>
<UsageCount Value="41"/> <UsageCount Value="44"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit20> </Unit20>
<Unit21> <Unit21>
@ -207,8 +207,8 @@
<UnitName Value="CustApp"/> <UnitName Value="CustApp"/>
<CursorPos X="59" Y="274"/> <CursorPos X="59" Y="274"/>
<TopLine Value="274"/> <TopLine Value="274"/>
<EditorIndex Value="7"/> <EditorIndex Value="5"/>
<UsageCount Value="21"/> <UsageCount Value="24"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit21> </Unit21>
<Unit22> <Unit22>
@ -216,8 +216,8 @@
<UnitName Value="ocrutil"/> <UnitName Value="ocrutil"/>
<CursorPos X="22" Y="470"/> <CursorPos X="22" Y="470"/>
<TopLine Value="445"/> <TopLine Value="445"/>
<EditorIndex Value="11"/> <EditorIndex Value="9"/>
<UsageCount Value="29"/> <UsageCount Value="32"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit22> </Unit22>
<Unit23> <Unit23>
@ -225,19 +225,19 @@
<UnitName Value="XTest"/> <UnitName Value="XTest"/>
<CursorPos X="56" Y="22"/> <CursorPos X="56" Y="22"/>
<TopLine Value="1"/> <TopLine Value="1"/>
<UsageCount Value="7"/> <UsageCount Value="6"/>
</Unit23> </Unit23>
<Unit24> <Unit24>
<Filename Value="../../../../Documents/fpc/rtl/inc/mathh.inc"/> <Filename Value="../../../../Documents/fpc/rtl/inc/mathh.inc"/>
<CursorPos X="58" Y="78"/> <CursorPos X="58" Y="78"/>
<TopLine Value="57"/> <TopLine Value="57"/>
<UsageCount Value="7"/> <UsageCount Value="6"/>
</Unit24> </Unit24>
<Unit25> <Unit25>
<Filename Value="../../../../Documents/fpc/rtl/inc/innr.inc"/> <Filename Value="../../../../Documents/fpc/rtl/inc/innr.inc"/>
<CursorPos X="4" Y="98"/> <CursorPos X="4" Y="98"/>
<TopLine Value="78"/> <TopLine Value="78"/>
<UsageCount Value="7"/> <UsageCount Value="6"/>
</Unit25> </Unit25>
<Unit26> <Unit26>
<Filename Value="../../../../Documents/lazarus/lcl/graphtype.pp"/> <Filename Value="../../../../Documents/lazarus/lcl/graphtype.pp"/>
@ -249,181 +249,173 @@
<Unit27> <Unit27>
<Filename Value="../../Units/Synapse/httpsend.pas"/> <Filename Value="../../Units/Synapse/httpsend.pas"/>
<UnitName Value="httpsend"/> <UnitName Value="httpsend"/>
<CursorPos X="1" Y="758"/> <CursorPos X="64" Y="365"/>
<TopLine Value="731"/> <TopLine Value="379"/>
<EditorIndex Value="3"/> <UsageCount Value="14"/>
<UsageCount Value="12"/>
<Loaded Value="True"/>
</Unit27> </Unit27>
<Unit28> <Unit28>
<Filename Value="../../Units/MMLAddon/internets.pas"/> <Filename Value="../../Units/MMLAddon/internets.pas"/>
<UnitName Value="internets"/> <UnitName Value="internets"/>
<CursorPos X="9" Y="21"/> <CursorPos X="9" Y="21"/>
<TopLine Value="1"/> <TopLine Value="1"/>
<EditorIndex Value="4"/> <EditorIndex Value="3"/>
<UsageCount Value="12"/> <UsageCount Value="15"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit28> </Unit28>
<Unit29> <Unit29>
<Filename Value="../../../../Documents/fpc/rtl/objpas/classes/classesh.inc"/> <Filename Value="../../../../Documents/fpc/rtl/objpas/classes/classesh.inc"/>
<CursorPos X="14" Y="712"/> <CursorPos X="14" Y="712"/>
<TopLine Value="696"/> <TopLine Value="696"/>
<UsageCount Value="10"/> <UsageCount Value="9"/>
</Unit29> </Unit29>
<Unit30> <Unit30>
<Filename Value="../../Units/MMLAddon/updater.pas"/> <Filename Value="../../Units/MMLAddon/updater.pas"/>
<UnitName Value="updater"/> <UnitName Value="updater"/>
<CursorPos X="43" Y="169"/> <CursorPos X="13" Y="157"/>
<TopLine Value="146"/> <TopLine Value="139"/>
<EditorIndex Value="6"/> <EditorIndex Value="4"/>
<UsageCount Value="12"/> <UsageCount Value="15"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit30> </Unit30>
<Unit31> <Unit31>
<Filename Value="../../Units/Synapse/blcksock.pas"/> <Filename Value="../../Units/Synapse/blcksock.pas"/>
<UnitName Value="blcksock"/> <UnitName Value="blcksock"/>
<CursorPos X="3" Y="133"/> <CursorPos X="3" Y="198"/>
<TopLine Value="137"/> <TopLine Value="180"/>
<EditorIndex Value="5"/> <UsageCount Value="15"/>
<UsageCount Value="12"/>
<Loaded Value="True"/>
</Unit31> </Unit31>
<Unit32> <Unit32>
<Filename Value="../../Units/Synapse/ssfpc.pas"/> <Filename Value="../../Units/Synapse/ssfpc.pas"/>
<UnitName Value="ssfpc"/> <UnitName Value="ssfpc"/>
<CursorPos X="3" Y="94"/> <CursorPos X="3" Y="94"/>
<TopLine Value="1"/> <TopLine Value="1"/>
<UsageCount Value="10"/> <UsageCount Value="9"/>
</Unit32> </Unit32>
<Unit33> <Unit33>
<Filename Value="../../Units/Synapse/sslinux.pas"/> <Filename Value="../../Units/Synapse/sslinux.pas"/>
<UnitName Value="sslinux"/> <UnitName Value="sslinux"/>
<CursorPos X="1" Y="62"/> <CursorPos X="1" Y="62"/>
<TopLine Value="32"/> <TopLine Value="32"/>
<UsageCount Value="10"/> <UsageCount Value="9"/>
</Unit33> </Unit33>
</Units> </Units>
<JumpHistory Count="30" HistoryIndex="29"> <JumpHistory Count="29" HistoryIndex="28">
<Position1> <Position1>
<Filename Value="../../Units/MMLAddon/updater.pas"/> <Filename Value="../../Units/MMLAddon/updater.pas"/>
<Caret Line="85" Column="54" TopLine="74"/> <Caret Line="75" Column="23" TopLine="62"/>
</Position1> </Position1>
<Position2> <Position2>
<Filename Value="../../Units/MMLAddon/updater.pas"/> <Filename Value="../../Units/MMLAddon/updater.pas"/>
<Caret Line="83" Column="24" TopLine="65"/> <Caret Line="115" Column="13" TopLine="84"/>
</Position2> </Position2>
<Position3> <Position3>
<Filename Value="../../Units/MMLAddon/updater.pas"/> <Filename Value="../../Units/MMLAddon/updater.pas"/>
<Caret Line="90" Column="34" TopLine="67"/> <Caret Line="70" Column="60" TopLine="45"/>
</Position3> </Position3>
<Position4> <Position4>
<Filename Value="../../Units/MMLAddon/updater.pas"/> <Filename Value="../../Units/MMLAddon/updater.pas"/>
<Caret Line="93" Column="93" TopLine="68"/> <Caret Line="110" Column="15" TopLine="95"/>
</Position4> </Position4>
<Position5> <Position5>
<Filename Value="../../Units/MMLAddon/updater.pas"/> <Filename Value="../../Units/MMLAddon/updater.pas"/>
<Caret Line="101" Column="13" TopLine="78"/> <Caret Line="117" Column="44" TopLine="92"/>
</Position5> </Position5>
<Position6> <Position6>
<Filename Value="../../Units/Synapse/blcksock.pas"/> <Filename Value="../../Units/MMLAddon/updater.pas"/>
<Caret Line="803" Column="33" TopLine="781"/> <Caret Line="30" Column="30" TopLine="11"/>
</Position6> </Position6>
<Position7> <Position7>
<Filename Value="../../Units/MMLAddon/updater.pas"/> <Filename Value="../../Units/MMLAddon/updater.pas"/>
<Caret Line="106" Column="35" TopLine="78"/> <Caret Line="126" Column="11" TopLine="95"/>
</Position7> </Position7>
<Position8> <Position8>
<Filename Value="../../Units/Synapse/blcksock.pas"/> <Filename Value="project1.lpr"/>
<Caret Line="176" Column="63" TopLine="162"/> <Caret Line="12" Column="7" TopLine="5"/>
</Position8> </Position8>
<Position9> <Position9>
<Filename Value="../../Units/MMLAddon/updater.pas"/> <Filename Value="../../Units/MMLCore/client.pas"/>
<Caret Line="8" Column="39" TopLine="1"/> <Caret Line="33" Column="20" TopLine="1"/>
</Position9> </Position9>
<Position10> <Position10>
<Filename Value="../../Units/MMLAddon/updater.pas"/> <Filename Value="../../Units/MMLCore/files.pas"/>
<Caret Line="109" Column="11" TopLine="98"/> <Caret Line="123" Column="19" TopLine="111"/>
</Position10> </Position10>
<Position11> <Position11>
<Filename Value="../../Units/MMLAddon/updater.pas"/> <Filename Value="../../Units/MMLAddon/updater.pas"/>
<Caret Line="111" Column="15" TopLine="84"/> <Caret Line="140" Column="18" TopLine="117"/>
</Position11> </Position11>
<Position12> <Position12>
<Filename Value="../../Units/MMLAddon/updater.pas"/> <Filename Value="../../Units/MMLAddon/updater.pas"/>
<Caret Line="75" Column="23" TopLine="62"/> <Caret Line="35" Column="59" TopLine="17"/>
</Position12> </Position12>
<Position13> <Position13>
<Filename Value="../../Units/MMLAddon/updater.pas"/> <Filename Value="../../Units/MMLAddon/updater.pas"/>
<Caret Line="115" Column="13" TopLine="84"/> <Caret Line="131" Column="13" TopLine="113"/>
</Position13> </Position13>
<Position14> <Position14>
<Filename Value="../../Units/MMLAddon/updater.pas"/> <Filename Value="../../Units/MMLAddon/updater.pas"/>
<Caret Line="70" Column="60" TopLine="45"/> <Caret Line="130" Column="19" TopLine="113"/>
</Position14> </Position14>
<Position15> <Position15>
<Filename Value="../../Units/Synapse/httpsend.pas"/> <Filename Value="../../Units/MMLAddon/updater.pas"/>
<Caret Line="228" Column="23" TopLine="204"/> <Caret Line="131" Column="13" TopLine="112"/>
</Position15> </Position15>
<Position16> <Position16>
<Filename Value="../../Units/MMLAddon/updater.pas"/> <Filename Value="../../Units/MMLAddon/updater.pas"/>
<Caret Line="110" Column="15" TopLine="95"/> <Caret Line="120" Column="54" TopLine="102"/>
</Position16> </Position16>
<Position17> <Position17>
<Filename Value="../../Units/MMLAddon/updater.pas"/> <Filename Value="../../Units/MMLAddon/updater.pas"/>
<Caret Line="117" Column="44" TopLine="92"/> <Caret Line="40" Column="33" TopLine="12"/>
</Position17> </Position17>
<Position18> <Position18>
<Filename Value="../../Units/MMLAddon/updater.pas"/> <Filename Value="../../Units/MMLAddon/updater.pas"/>
<Caret Line="30" Column="30" TopLine="11"/> <Caret Line="38" Column="41" TopLine="20"/>
</Position18> </Position18>
<Position19> <Position19>
<Filename Value="../../Units/MMLAddon/updater.pas"/> <Filename Value="../../Units/MMLAddon/updater.pas"/>
<Caret Line="126" Column="11" TopLine="95"/> <Caret Line="130" Column="18" TopLine="113"/>
</Position19> </Position19>
<Position20> <Position20>
<Filename Value="project1.lpr"/> <Filename Value="../../Units/MMLAddon/updater.pas"/>
<Caret Line="12" Column="7" TopLine="5"/> <Caret Line="8" Column="26" TopLine="1"/>
</Position20> </Position20>
<Position21> <Position21>
<Filename Value="../../Units/MMLCore/client.pas"/> <Filename Value="../../Units/MMLAddon/updater.pas"/>
<Caret Line="33" Column="20" TopLine="1"/> <Caret Line="130" Column="18" TopLine="113"/>
</Position21> </Position21>
<Position22> <Position22>
<Filename Value="../../Units/MMLCore/files.pas"/> <Filename Value="../../Units/MMLAddon/updater.pas"/>
<Caret Line="123" Column="19" TopLine="111"/> <Caret Line="23" Column="27" TopLine="5"/>
</Position22> </Position22>
<Position23> <Position23>
<Filename Value="../../Units/MMLAddon/updater.pas"/> <Filename Value="../../Units/MMLAddon/updater.pas"/>
<Caret Line="140" Column="18" TopLine="117"/> <Caret Line="16" Column="1" TopLine="5"/>
</Position23> </Position23>
<Position24> <Position24>
<Filename Value="../../Units/MMLAddon/updater.pas"/> <Filename Value="../../Units/MMLAddon/updater.pas"/>
<Caret Line="35" Column="59" TopLine="17"/> <Caret Line="28" Column="39" TopLine="16"/>
</Position24> </Position24>
<Position25> <Position25>
<Filename Value="../../Units/MMLAddon/updater.pas"/> <Filename Value="project1.lpr"/>
<Caret Line="131" Column="13" TopLine="113"/> <Caret Line="117" Column="13" TopLine="98"/>
</Position25> </Position25>
<Position26> <Position26>
<Filename Value="../../Units/MMLAddon/updater.pas"/> <Filename Value="../../Units/MMLAddon/updater.pas"/>
<Caret Line="130" Column="19" TopLine="113"/> <Caret Line="129" Column="25" TopLine="111"/>
</Position26> </Position26>
<Position27> <Position27>
<Filename Value="../../Units/MMLAddon/updater.pas"/> <Filename Value="../../Units/MMLAddon/updater.pas"/>
<Caret Line="131" Column="13" TopLine="112"/> <Caret Line="95" Column="56" TopLine="67"/>
</Position27> </Position27>
<Position28> <Position28>
<Filename Value="../../Units/MMLAddon/updater.pas"/> <Filename Value="../../Units/MMLAddon/updater.pas"/>
<Caret Line="120" Column="54" TopLine="102"/> <Caret Line="157" Column="1" TopLine="132"/>
</Position28> </Position28>
<Position29> <Position29>
<Filename Value="../../Units/MMLAddon/updater.pas"/> <Filename Value="../../Units/MMLAddon/updater.pas"/>
<Caret Line="40" Column="33" TopLine="12"/> <Caret Line="156" Column="50" TopLine="139"/>
</Position29> </Position29>
<Position30>
<Filename Value="../../Units/MMLAddon/updater.pas"/>
<Caret Line="38" Column="41" TopLine="20"/>
</Position30>
</JumpHistory> </JumpHistory>
</ProjectOptions> </ProjectOptions>
<CompilerOptions> <CompilerOptions>

View File

@ -53,6 +53,17 @@ begin
result.c[0] := 255; result.c[0] := 255;
end; end;
var
aTime: dword;
function myChange: boolean;
begin
if gettickcount-atime > 1000 then
result := true
else
result := false;
end;
procedure MufasaTests.DoRun; procedure MufasaTests.DoRun;
@ -98,12 +109,20 @@ begin
Exit; Exit;
end; end;
atime:=gettickcount;
up := TMMLFileDownloader.Create; up := TMMLFileDownloader.Create;
up.FileURL:='http://www.villavu.com/pics/desktop.png'; up.FileURL:='http://www.villavu.com/pics/desktop.png';
up.ReplacementFile:='test.png'; up.ReplacementFile:='test.png';
up.DownloadAndSave; up.OnBeat:=@myChange;
up.Replace; try
up.Free; up.DownloadAndSave;
up.Replace;
finally
writeln(inttostr(gettickcount-atime));
up.Free;
end;

View File

@ -14,6 +14,8 @@ type
destructor Destroy; override; destructor Destroy; override;
end; } end; }
TMemory = pointer; TMemory = pointer;
TFunctionBoolean = function: boolean;
TMMLFileDownloader = class(TObject) TMMLFileDownloader = class(TObject)
private private
@ -23,23 +25,40 @@ type
HTTPSend: THTTPSend; HTTPSend: THTTPSend;
FFileSize: Integer; FFileSize: Integer;
FDownloaded: Boolean; FDownloaded: Boolean;
FOnChange: TProcedure; FOnChange: TFunctionBoolean;
FOnBeat: TFunctionBoolean;
public public
constructor Create; constructor Create;
destructor Destroy; override; destructor Destroy; override;
{ Download and Save the file }
function DownloadAndSave: Boolean; function DownloadAndSave: Boolean;
{ Replace the new file with the one we downloaded }
function Replace: Boolean; function Replace: Boolean;
{ Where do we get the file from? }
property FileURL: String read FFileURL write FFileURL; property FileURL: String read FFileURL write FFileURL;
property ReplacementFile: String read FReplacementFile write FReplacementFile;
property Downloaded: Boolean read FDownloaded;
property OnChange: TProcedure read FOnChange write FOnChange;
{ The file to write to. Note that downloading downloads to this
file with a '_' added to the end of the FileName;
Replace; is called to replace the old file with the downloaded
one }
property ReplacementFile: String read FReplacementFile write FReplacementFile;
{ Return true if we have downloaded the file completely }
property Downloaded: Boolean read FDownloaded;
{ If either of these events return "True", an exception is thrown
and the download is cancelled. This way we can easily `cancel'
a download. }
property OnChange: TFunctionBoolean read FOnChange write FOnChange;
{ Called every 50ms }
property OnBeat: TFunctionBoolean read FOnBeat write FOnBeat;
function GetPercentage: Integer; function GetPercentage: Integer;
private private
procedure TryToGetFileSize; procedure TryToGetFileSize;
@ -47,11 +66,7 @@ type
const Buffer: TMemory; Len: Integer); const Buffer: TMemory; Len: Integer);
procedure OnStatus(Sender: TObject; Reason: THookSocketReason; procedure OnStatus(Sender: TObject; Reason: THookSocketReason;
const Value: String); const Value: String);
procedure OnHeartBeat(Sender: TObject);
end; end;
@ -82,7 +97,15 @@ begin
if FFileSize = 0 then if FFileSize = 0 then
TryToGetFileSize; TryToGetFileSize;
if Assigned(FOnChange) then if Assigned(FOnChange) then
FOnChange(); if FOnChange() then
raise Exception.Create('OnChange event called for a quit');
end;
procedure TMMLFileDownloader.OnHeartBeat(Sender: TObject);
begin
if Assigned(FOnBeat) then
if FOnBeat() then
raise Exception.Create('OnChange event called for a quit');
end; end;
procedure TMMLFileDownloader.OnMonitor(Sender: TObject; Writing: Boolean; procedure TMMLFileDownloader.OnMonitor(Sender: TObject; Writing: Boolean;
@ -97,7 +120,8 @@ begin
if FFileSize = 0 then if FFileSize = 0 then
TryToGetFileSize; TryToGetFileSize;
if Assigned(FOnChange) then if Assigned(FOnChange) then
FOnChange(); if FOnChange() then
raise Exception.Create('OnChange event called for a quit');
// writeln('Percent done: ' + IntToStr(GetPercentage)); // writeln('Percent done: ' + IntToStr(GetPercentage));
end; end;
@ -117,9 +141,13 @@ var
f: TFileStream; f: TFileStream;
begin begin
Result := False;
HTTPSend := THTTPSend.Create; HTTPSend := THTTPSend.Create;
HTTPSend.Sock.OnMonitor:=@Self.OnMonitor; HTTPSend.Sock.OnMonitor:=@Self.OnMonitor;
HTTPSend.Sock.OnStatus:=@Self.OnStatus; HTTPSend.Sock.OnStatus:=@Self.OnStatus;
HTTPSend.Sock.OnHeartbeat:=@Self.OnHeartBeat;
HTTPSend.Sock.HeartbeatRate:=50;
if FReplacementFile = '' then if FReplacementFile = '' then
raise Exception.Create('ReplacementFile not set'); raise Exception.Create('ReplacementFile not set');
if FileURL = '' then if FileURL = '' then
@ -135,7 +163,8 @@ begin
Response.CopyFrom(HTTPSend.Document, 0); Response.CopyFrom(HTTPSend.Document, 0);
end; end;
FDownloaded := True; FDownloaded := True;
finally except
writeln('DownloadAndSave: Exception Occured');
HTTPSend.Free; HTTPSend.Free;
Response.Free; Response.Free;
end; end;