1
0
mirror of https://github.com/moparisthebest/Simba synced 2024-12-23 07:48:50 -05:00

Added a TrayIcon.

git-svn-id: http://www.villavu.com/repositories/merlijn/mufasa@93 3f818213-9676-44b0-a9b4-5e4c4e03d09d
This commit is contained in:
Wizzup? 2009-09-25 19:29:03 +00:00
parent 5085ba40c8
commit 8ae45b0237
4 changed files with 699 additions and 609 deletions

View File

@ -7,7 +7,7 @@
<TargetFileExt Value=""/>
<Title Value="Mufasa Stand Alone"/>
<UseXPManifest Value="True"/>
<ActiveEditorIndexAtStart Value="6"/>
<ActiveEditorIndexAtStart Value="8"/>
</General>
<VersionInfo>
<ProjectVersion Value=""/>
@ -33,7 +33,7 @@
<PackageName Value="LCL"/>
</Item2>
</RequiredPackages>
<Units Count="122">
<Units Count="123">
<Unit0>
<Filename Value="project1.lpr"/>
<IsPartOfProject Value="True"/>
@ -41,7 +41,7 @@
<CursorPos X="17" Y="12"/>
<TopLine Value="1"/>
<EditorIndex Value="0"/>
<UsageCount Value="139"/>
<UsageCount Value="141"/>
<Loaded Value="True"/>
</Unit0>
<Unit1>
@ -170,10 +170,10 @@
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="TestUnit"/>
<CursorPos X="30" Y="13"/>
<TopLine Value="1"/>
<EditorIndex Value="6"/>
<UsageCount Value="105"/>
<CursorPos X="51" Y="133"/>
<TopLine Value="110"/>
<EditorIndex Value="8"/>
<UsageCount Value="107"/>
<Loaded Value="True"/>
</Unit18>
<Unit19>
@ -305,7 +305,7 @@
<CursorPos X="25" Y="17"/>
<TopLine Value="1"/>
<EditorIndex Value="4"/>
<UsageCount Value="104"/>
<UsageCount Value="106"/>
<Loaded Value="True"/>
</Unit37>
<Unit38>
@ -315,7 +315,7 @@
<CursorPos X="69" Y="25"/>
<TopLine Value="1"/>
<EditorIndex Value="3"/>
<UsageCount Value="104"/>
<UsageCount Value="106"/>
<Loaded Value="True"/>
</Unit38>
<Unit39>
@ -331,7 +331,7 @@
<UnitName Value="files"/>
<CursorPos X="37" Y="42"/>
<TopLine Value="271"/>
<UsageCount Value="105"/>
<UsageCount Value="107"/>
</Unit40>
<Unit41>
<Filename Value="../../Units/MMLCore/window.pas"/>
@ -339,8 +339,8 @@
<UnitName Value="Window"/>
<CursorPos X="24" Y="84"/>
<TopLine Value="75"/>
<EditorIndex Value="10"/>
<UsageCount Value="104"/>
<EditorIndex Value="9"/>
<UsageCount Value="106"/>
<Loaded Value="True"/>
</Unit41>
<Unit42>
@ -355,8 +355,8 @@
<UnitName Value="CompTypes"/>
<CursorPos X="59" Y="545"/>
<TopLine Value="524"/>
<EditorIndex Value="15"/>
<UsageCount Value="16"/>
<EditorIndex Value="14"/>
<UsageCount Value="17"/>
<Loaded Value="True"/>
</Unit43>
<Unit44>
@ -364,8 +364,8 @@
<UnitName Value="windowutil"/>
<CursorPos X="86" Y="19"/>
<TopLine Value="1"/>
<EditorIndex Value="11"/>
<UsageCount Value="34"/>
<EditorIndex Value="10"/>
<UsageCount Value="35"/>
<Loaded Value="True"/>
</Unit44>
<Unit45>
@ -374,7 +374,7 @@
<CursorPos X="32" Y="251"/>
<TopLine Value="220"/>
<EditorIndex Value="5"/>
<UsageCount Value="14"/>
<UsageCount Value="15"/>
<Loaded Value="True"/>
</Unit45>
<Unit46>
@ -384,7 +384,7 @@
<CursorPos X="57" Y="15"/>
<TopLine Value="2"/>
<EditorIndex Value="1"/>
<UsageCount Value="97"/>
<UsageCount Value="99"/>
<Loaded Value="True"/>
</Unit46>
<Unit47>
@ -400,7 +400,7 @@
<UnitName Value="MMLThread"/>
<CursorPos X="132" Y="5"/>
<TopLine Value="1"/>
<UsageCount Value="95"/>
<UsageCount Value="97"/>
</Unit48>
<Unit49>
<Filename Value="../../../Documents/fpc/rtl/objpas/classes/classesh.inc"/>
@ -414,8 +414,8 @@
<UnitName Value="mmlpsthread"/>
<CursorPos X="66" Y="1"/>
<TopLine Value="1"/>
<EditorIndex Value="9"/>
<UsageCount Value="93"/>
<EditorIndex Value="7"/>
<UsageCount Value="95"/>
<Loaded Value="True"/>
</Unit50>
<Unit51>
@ -545,7 +545,7 @@
<UnitName Value="bitmaps"/>
<CursorPos X="63" Y="428"/>
<TopLine Value="387"/>
<UsageCount Value="83"/>
<UsageCount Value="85"/>
</Unit69>
<Unit70>
<Filename Value="../../../FPC/FPCCheckout/packages/fcl-image/src/fpcanvas.pp"/>
@ -565,7 +565,7 @@
<IsPartOfProject Value="True"/>
<CursorPos X="30" Y="34"/>
<TopLine Value="22"/>
<UsageCount Value="82"/>
<UsageCount Value="84"/>
</Unit72>
<Unit73>
<Filename Value="../../../FPC/FPCCheckout/packages/fcl-image/src/fpcanvas.inc"/>
@ -698,7 +698,7 @@
<CursorPos X="53" Y="27"/>
<TopLine Value="9"/>
<EditorIndex Value="2"/>
<UsageCount Value="65"/>
<UsageCount Value="67"/>
<Loaded Value="True"/>
</Unit92>
<Unit93>
@ -758,7 +758,7 @@
<UnitName Value="plugins"/>
<CursorPos X="86" Y="128"/>
<TopLine Value="128"/>
<UsageCount Value="59"/>
<UsageCount Value="61"/>
</Unit101>
<Unit102>
<Filename Value="../../../Compilertje/Units/CogatUnits/compfiles.pas"/>
@ -850,7 +850,7 @@
<UnitName Value="dtm"/>
<CursorPos X="52" Y="15"/>
<TopLine Value="1"/>
<UsageCount Value="40"/>
<UsageCount Value="42"/>
</Unit115>
<Unit116>
<Filename Value="../../../cogat/Units/CogatUnits/comppicker.pas"/>
@ -865,8 +865,8 @@
<UnitName Value="colourpicker"/>
<CursorPos X="27" Y="34"/>
<TopLine Value="13"/>
<EditorIndex Value="7"/>
<UsageCount Value="36"/>
<EditorIndex Value="6"/>
<UsageCount Value="38"/>
<Loaded Value="True"/>
</Unit117>
<Unit118>
@ -874,8 +874,8 @@
<UnitName Value="CompDragger"/>
<CursorPos X="101" Y="26"/>
<TopLine Value="26"/>
<EditorIndex Value="12"/>
<UsageCount Value="15"/>
<EditorIndex Value="11"/>
<UsageCount Value="16"/>
<Loaded Value="True"/>
</Unit118>
<Unit119>
@ -884,10 +884,10 @@
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="MainForm"/>
<CursorPos X="40" Y="610"/>
<TopLine Value="589"/>
<EditorIndex Value="13"/>
<UsageCount Value="15"/>
<CursorPos X="48" Y="1180"/>
<TopLine Value="1161"/>
<EditorIndex Value="12"/>
<UsageCount Value="16"/>
<Loaded Value="True"/>
</Unit119>
<Unit120>
@ -896,136 +896,137 @@
<UnitName Value="windowselector"/>
<CursorPos X="76" Y="83"/>
<TopLine Value="65"/>
<EditorIndex Value="14"/>
<UsageCount Value="26"/>
<EditorIndex Value="13"/>
<UsageCount Value="28"/>
<Loaded Value="True"/>
</Unit120>
<Unit121>
<Filename Value="../../../../../../usr/lib64/fpc/2.2.4/source/rtl/objpas/classes/classesh.inc"/>
<CursorPos X="3" Y="319"/>
<TopLine Value="319"/>
<EditorIndex Value="8"/>
<UsageCount Value="11"/>
<Loaded Value="True"/>
</Unit121>
<Unit122>
<Filename Value="../../../lazarus/lcl/forms.pp"/>
<UnitName Value="Forms"/>
<CursorPos X="3" Y="357"/>
<TopLine Value="338"/>
<UsageCount Value="10"/>
</Unit122>
</Units>
<JumpHistory Count="29" HistoryIndex="28">
<JumpHistory Count="28" HistoryIndex="27">
<Position1>
<Filename Value="testunit.pas"/>
<Caret Line="49" Column="48" TopLine="49"/>
<Filename Value="../../Units/MMLAddon/windowselector.pas"/>
<Caret Line="40" Column="26" TopLine="25"/>
</Position1>
<Position2>
<Filename Value="testunit.pas"/>
<Caret Line="118" Column="42" TopLine="88"/>
<Caret Line="96" Column="43" TopLine="85"/>
</Position2>
<Position3>
<Filename Value="../../Units/MMLAddon/colourpicker.pas"/>
<Caret Line="67" Column="6" TopLine="55"/>
</Position3>
<Position4>
<Filename Value="../../Units/MMLAddon/colourpicker.pas"/>
<Caret Line="27" Column="24" TopLine="8"/>
</Position4>
<Position5>
<Filename Value="../../Units/MMLCore/window.pas"/>
<Caret Line="193" Column="17" TopLine="174"/>
</Position5>
<Position6>
<Filename Value="../../Units/MMLCore/window.pas"/>
<Caret Line="205" Column="16" TopLine="174"/>
</Position6>
<Position7>
<Filename Value="../../Units/MMLCore/window.pas"/>
<Caret Line="270" Column="16" TopLine="251"/>
</Position7>
<Position8>
<Filename Value="../../Units/MMLCore/window.pas"/>
<Caret Line="271" Column="16" TopLine="251"/>
</Position8>
<Position9>
<Filename Value="../../Units/MMLCore/window.pas"/>
<Caret Line="279" Column="16" TopLine="251"/>
</Position9>
<Position10>
<Filename Value="../../Units/MMLCore/window.pas"/>
<Caret Line="125" Column="11" TopLine="109"/>
</Position10>
<Position11>
<Filename Value="../../../cogat/Units/CogatUnits/comptypes.pas"/>
<Caret Line="32" Column="75" TopLine="9"/>
</Position11>
<Position12>
<Filename Value="../../../cogat/mainform.pas"/>
<Caret Line="15" Column="66" TopLine="1"/>
</Position12>
<Position13>
<Filename Value="../../Units/MMLCore/window.pas"/>
<Caret Line="5" Column="100" TopLine="1"/>
</Position13>
<Position14>
<Filename Value="../../Units/MMLCore/window.pas"/>
<Caret Line="39" Column="32" TopLine="20"/>
</Position14>
<Position15>
<Filename Value="../../Units/MMLAddon/windowselector.pas"/>
<Caret Line="54" Column="26" TopLine="16"/>
</Position15>
<Position16>
<Filename Value="../../Units/MMLCore/windowutil.pas"/>
<Caret Line="119" Column="75" TopLine="92"/>
</Position16>
<Position17>
<Filename Value="../../Units/MMLAddon/windowselector.pas"/>
<Caret Line="40" Column="26" TopLine="25"/>
</Position17>
<Position18>
<Filename Value="testunit.pas"/>
<Caret Line="96" Column="43" TopLine="85"/>
</Position18>
<Position19>
<Filename Value="../../Units/MMLAddon/windowselector.pas"/>
<Caret Line="77" Column="14" TopLine="49"/>
</Position19>
<Position20>
</Position3>
<Position4>
<Filename Value="../../Units/MMLAddon/windowselector.pas"/>
<Caret Line="11" Column="29" TopLine="1"/>
</Position20>
<Position21>
</Position4>
<Position5>
<Filename Value="../../Units/MMLAddon/windowselector.pas"/>
<Caret Line="9" Column="10" TopLine="1"/>
</Position21>
<Position22>
</Position5>
<Position6>
<Filename Value="testunit.pas"/>
<Caret Line="52" Column="43" TopLine="52"/>
</Position6>
<Position7>
<Filename Value="testunit.pas"/>
<Caret Line="54" Column="45" TopLine="54"/>
</Position7>
<Position8>
<Filename Value="../../Units/MMLAddon/windowselector.pas"/>
<Caret Line="72" Column="74" TopLine="59"/>
</Position8>
<Position9>
<Filename Value="../../Units/MMLCore/client.pas"/>
<Caret Line="17" Column="25" TopLine="1"/>
</Position9>
<Position10>
<Filename Value="../../Units/MMLAddon/windowselector.pas"/>
<Caret Line="79" Column="32" TopLine="65"/>
</Position10>
<Position11>
<Filename Value="../../Units/MMLAddon/colourpicker.pas"/>
<Caret Line="56" Column="47" TopLine="37"/>
</Position11>
<Position12>
<Filename Value="../../Units/MMLAddon/colourpicker.pas"/>
<Caret Line="74" Column="19" TopLine="49"/>
</Position12>
<Position13>
<Filename Value="../../Units/MMLAddon/colourpicker.pas"/>
<Caret Line="34" Column="27" TopLine="13"/>
</Position13>
<Position14>
<Filename Value="../../../cogat/mainform.pas"/>
<Caret Line="7" Column="90" TopLine="1"/>
</Position14>
<Position15>
<Filename Value="../../../cogat/mainform.pas"/>
<Caret Line="82" Column="17" TopLine="63"/>
</Position15>
<Position16>
<Filename Value="../../../cogat/mainform.pas"/>
<Caret Line="266" Column="51" TopLine="247"/>
</Position16>
<Position17>
<Filename Value="../../../cogat/mainform.pas"/>
<Caret Line="295" Column="55" TopLine="276"/>
</Position17>
<Position18>
<Filename Value="../../../cogat/mainform.pas"/>
<Caret Line="327" Column="53" TopLine="308"/>
</Position18>
<Position19>
<Filename Value="../../../cogat/mainform.pas"/>
<Caret Line="368" Column="53" TopLine="349"/>
</Position19>
<Position20>
<Filename Value="../../../cogat/mainform.pas"/>
<Caret Line="1004" Column="48" TopLine="985"/>
</Position20>
<Position21>
<Filename Value="../../../cogat/mainform.pas"/>
<Caret Line="1005" Column="43" TopLine="985"/>
</Position21>
<Position22>
<Filename Value="../../../cogat/mainform.pas"/>
<Caret Line="1008" Column="46" TopLine="985"/>
</Position22>
<Position23>
<Filename Value="testunit.pas"/>
<Caret Line="54" Column="45" TopLine="54"/>
<Caret Line="35" Column="78" TopLine="1"/>
</Position23>
<Position24>
<Filename Value="../../Units/MMLAddon/windowselector.pas"/>
<Caret Line="72" Column="74" TopLine="59"/>
<Filename Value="testunit.pas"/>
<Caret Line="25" Column="37" TopLine="25"/>
</Position24>
<Position25>
<Filename Value="../../Units/MMLCore/client.pas"/>
<Caret Line="17" Column="25" TopLine="1"/>
<Filename Value="testunit.pas"/>
<Caret Line="46" Column="25" TopLine="25"/>
</Position25>
<Position26>
<Filename Value="../../Units/MMLAddon/windowselector.pas"/>
<Caret Line="79" Column="32" TopLine="65"/>
<Filename Value="testunit.pas"/>
<Caret Line="47" Column="25" TopLine="25"/>
</Position26>
<Position27>
<Filename Value="../../Units/MMLAddon/colourpicker.pas"/>
<Caret Line="56" Column="47" TopLine="37"/>
<Filename Value="testunit.pas"/>
<Caret Line="136" Column="48" TopLine="108"/>
</Position27>
<Position28>
<Filename Value="../../Units/MMLAddon/colourpicker.pas"/>
<Caret Line="74" Column="19" TopLine="49"/>
<Filename Value="testunit.pas"/>
<Caret Line="139" Column="15" TopLine="117"/>
</Position28>
<Position29>
<Filename Value="../../Units/MMLAddon/colourpicker.pas"/>
<Caret Line="34" Column="27" TopLine="13"/>
</Position29>
</JumpHistory>
</ProjectOptions>
<CompilerOptions>

View File

@ -1,7 +1,7 @@
object Form1: TForm1
Left = 796
Left = 1147
Height = 541
Top = 165
Top = 148
Width = 763
ActiveControl = SynEdit1
Caption = 'Mufasa v2'
@ -818,24 +818,22 @@ object Form1: TForm1
Enabled = False
ImageIndex = 9
end
object TB_WAT: TToolButton
object TB_Tray: TToolButton
Left = 240
Top = 2
Caption = 'TB_WAT'
Enabled = False
Caption = 'TB_Tray'
ImageIndex = 10
OnClick = ToTray
end
end
object SynFreePascalSyn1: TSynFreePascalSyn
Enabled = False
CompilerMode = pcmObjFPC
NestedComments = True
left = 584
top = 8
left = 560
end
object MainMenu1: TMainMenu
left = 616
top = 8
left = 608
object MenuItemScript: TMenuItem
Caption = 'Script'
object MenuItemRun: TMenuItem
@ -846,8 +844,7 @@ object Form1: TForm1
end
end
object Mufasa_Image_List: TImageList
left = 560
top = 8
left = 512
Bitmap = {
4C690D000000100000001000000073FF9BFF7BFFA0FF80FFA4FF83FFA6FF85FF
A7FF83FFA6FF7FFFA3FF79FF9FFF70FF98FF64FF90FF58FF87FF4CFF7FFF3FFF
@ -1268,4 +1265,43 @@ object Form1: TForm1
00FF530400FF590400FF640500FF
}
end
object MTrayIcon: TTrayIcon
Icon.Data = {
F6030000000001000100100E000001002000E003000016000000280000001000
00001C0000000100200000000000000000000000000000000000000000000000
0000000000000000000000000000192A752A02238BFF02228BFF00238FFF011C
81FF021777FF011C7FFF001B7EFF00187AFF01116CFF010E69FF000B61FF0005
41FF0000000000000000000000000F2C8889012799FF012491FF002392FF0024
91FF001778FF02136FFF021A7CFF011B7EFF01197BFF011372FF011472FF0106
4FFF0000000000000000000000002860B98D2E8BFAFF2B86EFFF206DD4FF032C
95FF00197CFF011573FF001473FF021A7DFF001C81FF021876FF00177AFF0009
58FF0000000000000000000000003F93ECAC3294FFFF3091FEFF2F8FFCFF2B86
EFFF052688FF021571FF053090FF033C9EFF001D86FF021979FF001B7FFF000A
5AFF000000008190A405000000004C96E0A53794F8FF3493FAFF2F8EF9FF2F8D
F9FF1E87F8FF0276F1FF0071EBFF0161D3FF011C84FF011E85FF001B7FFF010C
5BFF7A86A524708BA9186E90BA1F4898E7C63591EEFF3A9BFFFF3495FBFF3286
E7FF2082F2FF0075F4FF0073EEFF006FE8FF021677FF01218BFF011A7DFF010B
56FF7C88B10B818AAA29798C9F27428FDEBD124DA1FF0E2F68FF3488E5FF379A
FFFF147AEBFF0377F6FF0373EEFF025DD1FF021574FF03218AFF021468FF010F
5BED747A8906706A642A78645728546482632180E5FF165CB3FF1961BBFF3395
F9FF0979F3FF0579F8FF0379FCFF04339EFF052992FF022176FF001462FF0314
5FC80000000073665B06756C691D676B7A210841B7EF137EECFF0C89FFFE1770
CFFF2A78C8FF0A7BF3FF054BBAFF002BA0FF042A83FF00196DFE021766FF111D
5F24000000007F7266000000000000099A010332ACE20F3A85F10B76EAFF0B7E
F0FF125CABFF0971E5FF032894FF002CA2FE00196DFF051B6BDD132666220000
0000000000000000000000000000000000000F369DBC01299AFF0330A6FF0425
91FE052889FF011775FF0131ABFE012791FF071E6AAB00000000031B6D000000
0000000000000000000000000000000000003C40681D19388ECF092E8EFD0135
B1FF042894FF022F9FFE0132ABFF06247C870000000000000000000000000000
00000000000000000000000000007B573D0077553E0DAB691B1A4B465B6D0636
ABDF0235ADFF0236B0FB062B8DA4000000002230630000000000000000000000
00007A5841077A553D067C563D047B573D067A5840257B5940277958420A0000
000040435F040000000000000000000000000000000000000000000000000000
0000F0000000E0000000E0000000E0000000E0000000E0000000E0000000F000
0000F0010000F0030000F0070000F80F0000FE1F0000FFFF0000
}
Visible = True
OnClick = NoTray
left = 464
end
end

File diff suppressed because it is too large Load Diff

View File

@ -6,7 +6,7 @@ interface
uses
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
StdCtrls, Menus, ComCtrls, SynEdit, SynHighlighterPas, SynMemo,
StdCtrls, Menus, ComCtrls, ExtCtrls, SynEdit, SynHighlighterPas, SynMemo,
//Client,
MufasaTypes,
mmlpsthread,
@ -34,7 +34,7 @@ type
TB_Stop: TToolButton;
ToolButton1: TToolButton;
TB_ReloadPlugins: TToolButton;
TB_WAT: TToolButton;
TB_Tray: TToolButton;
TB_NewTab: TToolButton;
TB_CloseTab: TToolButton;
ToolButton4: TToolButton;
@ -43,6 +43,7 @@ type
TB_SelectClient: TToolButton;
ToolButton8: TToolButton;
TB_Convert: TToolButton;
MTrayIcon: TTrayIcon;
procedure Button1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
@ -50,6 +51,8 @@ type
procedure PickColorEvent(Sender: TObject);
procedure Selector_DOWN(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure NoTray(Sender: TObject);
procedure ToTray(Sender: TObject);
private
{ private declarations }
public
@ -131,6 +134,19 @@ begin
writeln('New window: ' + IntToStr(Window.{$ifdef MSWindows}TargetHandle{$else}CurWindow{$ENDIF}));
end;
procedure TForm1.NoTray(Sender: TObject);
begin
if Not Form1.IsVisible then
Form1.Show
else
Form1.Hide;
end;
procedure TForm1.ToTray(Sender: TObject);
begin
Form1.Hide;
end;
initialization
{$I testunit.lrs}