[tuxdroid-svn] r5237 - software_suite_v3/software/tool/tux_droid_browser/windows/trunk/tux_droid_br
Status: Beta
Brought to you by:
ks156
|
From: jerome <c2m...@c2...> - 2009-07-30 08:47:49
|
Author: jerome
Date: 2009-07-30 10:47:37 +0200 (Thu, 30 Jul 2009)
New Revision: 5237
Modified:
software_suite_v3/software/tool/tux_droid_browser/windows/trunk/tux_droid_browser/Unit1.pas
Log:
* Added the possibility for user to do not show the 'TuxBox ready' balloon.
Modified: software_suite_v3/software/tool/tux_droid_browser/windows/trunk/tux_droid_browser/Unit1.pas
===================================================================
--- software_suite_v3/software/tool/tux_droid_browser/windows/trunk/tux_droid_browser/Unit1.pas 2009-07-30 08:46:50 UTC (rev 5236)
+++ software_suite_v3/software/tool/tux_droid_browser/windows/trunk/tux_droid_browser/Unit1.pas 2009-07-30 08:47:37 UTC (rev 5237)
@@ -137,10 +137,13 @@
procedure DeleteSysTrayIcon();
procedure HideBalloonTips();
procedure setBalloonCanShow(showable : string);
+ procedure setBalloonReadyCanShow(showable : string);
procedure updateCaptions();
function isBalloonCanShow() : string;
function GetAllUsersDir() : string;
+ function isShowReadyCanShow() : string;
+
function GetTuxDroidDataBaseDirectory() : string;
procedure saveProperties();
procedure DefaultHandler(var Msg); override;
@@ -169,6 +172,7 @@
balloonShowed : boolean;
properties : TStringList;
reduce_balloon : boolean;
+ ready_balloon : boolean;
MessageSys : UInt;
implementation
@@ -202,7 +206,7 @@
end
else
begin
- properties.CommaText := 'show_balloon=true, language=en';
+ properties.CommaText := 'show_balloon=true, show_ready=true, language=en';
end;
language := properties.Values['language'];
@@ -241,14 +245,20 @@
//Starting server if not started yet.
if not TuxUtils.isTuxDroidServerStarted() then
begin
- //Form1.ShowBalloonTips(gettext(SERVER_INITIALIZATION));
TuxUtils.startServer(Application);
end;
//Show the systray icon
Form1.AddSysTrayIcon;
- Form1.ShowBalloonTips(gettext(SERVER_READY));
+ if Form1.isShowReadyCanShow() = 'true' then
+ begin
+ ready_balloon := true;
+ Form1.ShowBalloonTips(gettext(SERVER_READY)
+ + slinebreak
+ + gettext(TUX_BOX_HIDDEN_2));
+ end;
+
//Smart-Core is ready
smartcoreReady := true;
@@ -477,10 +487,18 @@
PostMessage(Handle, WM_NULL, 0, 0);
end
- else if (msg.LParam = NIN_BALLOONUSERCLICK) and (reduce_balloon) then
+ else if (msg.LParam = NIN_BALLOONUSERCLICK) and (reduce_balloon or ready_balloon) then
begin
- setBalloonCanShow('false');
- reduce_balloon := false;
+ if reduce_balloon then
+ begin
+ setBalloonCanShow('false');
+ reduce_balloon := false;
+ end
+ else if ready_balloon then
+ begin
+ setBalloonReadyCanShow('false');
+ ready_balloon := false;
+ end;
end
end;
@@ -721,6 +739,13 @@
end;
+{#### Return true is the 'ready' balloon can be showed. ####}
+function TForm1.isShowReadyCanShow() : string;
+begin
+ result := properties.Values['show_ready'];
+end;
+
+
{ Set the balloon visible or not }
procedure TForm1.setBalloonCanShow(showable : string);
begin
@@ -729,6 +754,14 @@
end;
+{ Set the balloon visible or not }
+procedure TForm1.setBalloonReadyCanShow(showable : string);
+begin
+ properties.Values['show_ready'] := showable;
+ saveProperties;
+end;
+
+
{#### Saving properties to the conf file ####}
procedure TForm1.saveProperties();
begin
|