[tuxdroid-svn] r5145 - 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-23 12:54:55
|
Author: jerome
Date: 2009-07-23 14:54:43 +0200 (Thu, 23 Jul 2009)
New Revision: 5145
Modified:
software_suite_v3/software/tool/tux_droid_browser/windows/trunk/tux_droid_browser/TuxUtils.dcu
software_suite_v3/software/tool/tux_droid_browser/windows/trunk/tux_droid_browser/TuxUtils.pas
software_suite_v3/software/tool/tux_droid_browser/windows/trunk/tux_droid_browser/Unit1.dcu
software_suite_v3/software/tool/tux_droid_browser/windows/trunk/tux_droid_browser/Unit1.pas
Log:
* Added all dynamic icons except 'Activity'.
Modified: software_suite_v3/software/tool/tux_droid_browser/windows/trunk/tux_droid_browser/TuxUtils.dcu
===================================================================
(Binary files differ)
Modified: software_suite_v3/software/tool/tux_droid_browser/windows/trunk/tux_droid_browser/TuxUtils.pas
===================================================================
--- software_suite_v3/software/tool/tux_droid_browser/windows/trunk/tux_droid_browser/TuxUtils.pas 2009-07-23 12:30:05 UTC (rev 5144)
+++ software_suite_v3/software/tool/tux_droid_browser/windows/trunk/tux_droid_browser/TuxUtils.pas 2009-07-23 12:54:43 UTC (rev 5145)
@@ -175,7 +175,7 @@
function isDongleConnected(states : TStringList) : boolean;
begin
if states <> nil then
- if states[1] = 'on' then
+ if states[0] = 'on' then
result := true
else
result := false
@@ -188,7 +188,7 @@
function isSoundOn(states : TStringList) : boolean;
begin
if states <> nil then
- if states[3] = 'on' then
+ if states[2] = 'on' then
result := true
else
result := false
@@ -201,7 +201,7 @@
function isRadioConnected(states : TStringList) : boolean;
begin
if states <> nil then
- if states[2] = 'on' then
+ if states[1] = 'on' then
result := true
else
result := false
@@ -213,6 +213,7 @@
{#### Return true if a gadget is in activity ####}
function isOnActivity(states : TStringList) : boolean;
begin
+ //3
if states <> nil then
result := false
else
Modified: software_suite_v3/software/tool/tux_droid_browser/windows/trunk/tux_droid_browser/Unit1.dcu
===================================================================
(Binary files differ)
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-23 12:30:05 UTC (rev 5144)
+++ software_suite_v3/software/tool/tux_droid_browser/windows/trunk/tux_droid_browser/Unit1.pas 2009-07-23 12:54:43 UTC (rev 5145)
@@ -273,27 +273,37 @@
{#### Check server and dongle state every 3000 ms ####}
procedure TForm1.ConnectionCheckerTimer(Sender: TObject);
var
- server, dongle : boolean;
+ server, dongle , sound, radio : boolean;
temp : TStringList;
-
+
begin
try
TuxUtils.getStates(temp);
dongle := TuxUtils.isDongleConnected(temp);
+ sound := TuxUtils.isSoundOn(temp);
+ radio := TuxUtils.isRadioConnected(temp);
except
dongle := false;
+ sound := true;
+ radio := false;
end;
temp.Free;
server := TuxUtils.isTuxDroidServerStarted();
//Changing tray icon if server isn't started or no radio detected.
- if ( server and dongle ) then
+ if ( server and dongle and radio and sound ) then
begin
ImageList1.GetIcon(0, AppIcon);
Tray.hIcon := AppIcon.Handle;
Shell_NotifyIcon(Nim_Modify, @tray);
end
+ else if (not sound) and (server and dongle and radio) then
+ begin
+ ImageList1.GetIcon(4, AppIcon);
+ Tray.hIcon := AppIcon.Handle;
+ Shell_NotifyIcon(Nim_Modify, @tray);
+ end
else
begin
ImageList1.GetIcon(1, AppIcon);
|