Add option not to show tray icon at all times

This commit is contained in:
Merlijn Wajer 2010-07-03 01:45:24 +02:00
parent 7a22f7a3fa
commit 855798e5b6
1 changed files with 8 additions and 0 deletions

View File

@ -1264,6 +1264,11 @@ begin
else else
ShowConsole(false); ShowConsole(false);
{$endif} {$endif}
if Lowercase(LoadSettingDef('Settings/Tray/AlwaysVisible', 'True')) <> 'true' then
begin
MTrayIcon.Hide;
writeln('Hiding tray.');
end;
self.EndFormUpdate; self.EndFormUpdate;
end; end;
@ -2436,6 +2441,8 @@ end;
procedure TSimbaForm.MTrayIconClick(Sender: TObject); procedure TSimbaForm.MTrayIconClick(Sender: TObject);
begin begin
self.Show; self.Show;
if Lowercase(LoadSettingDef('Settings/Tray/AlwaysVisible', 'True')) <> 'true' then
MTrayIcon.Hide;
if Self.CanFocus then if Self.CanFocus then
self.SetFocus; self.SetFocus;
end; end;
@ -2518,6 +2525,7 @@ end;
procedure TSimbaForm.ButtonTrayClick(Sender: TObject); procedure TSimbaForm.ButtonTrayClick(Sender: TObject);
begin begin
MTrayIcon.Show;
self.hide; self.hide;
end; end;