[tuxdroid-svn] r5249 - software_suite_v3/software/tool/tux_droid_browser/windows/trunk/tux_droid_br
Status: Beta
Brought to you by:
ks156
|
From: remi <c2m...@c2...> - 2009-07-30 18:33:15
|
Author: remi
Date: 2009-07-30 20:32:59 +0200 (Thu, 30 Jul 2009)
New Revision: 5249
Modified:
software_suite_v3/software/tool/tux_droid_browser/windows/trunk/tux_droid_browser/Unit1.dfm
software_suite_v3/software/tool/tux_droid_browser/windows/trunk/tux_droid_browser/Unit1.pas
Log:
* Fixed behavior on "set foreground" events from Desktop shortcut (Behavior when TuxBox is already started/initializing).
Modified: software_suite_v3/software/tool/tux_droid_browser/windows/trunk/tux_droid_browser/Unit1.dfm
===================================================================
--- software_suite_v3/software/tool/tux_droid_browser/windows/trunk/tux_droid_browser/Unit1.dfm 2009-07-30 18:06:40 UTC (rev 5248)
+++ software_suite_v3/software/tool/tux_droid_browser/windows/trunk/tux_droid_browser/Unit1.dfm 2009-07-30 18:32:59 UTC (rev 5249)
@@ -61,6 +61,7 @@
Width = 955
Height = 619
TabOrder = 0
+ Silent = False
RegisterAsBrowser = True
RegisterAsDropTarget = False
OnDocumentComplete = EmbeddedWB1DocumentComplete
@@ -122,7 +123,7 @@
Left = 40
Top = 8
Bitmap = {
- 494C010106000900040010001000FFFFFFFFFF00FFFFFFFFFFFFFFFF424D3600
+ 494C010106000900040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
0000000000003600000028000000400000003000000001002000000000000030
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
@@ -522,7 +523,8 @@
E00FF00FF00FF00FE007F007F007F007E003E003E003E003C003E001E001E001
C001C001C001C0018001C000C000C00080008000800080000000800080008000
0000800080008000000080008000800000008000800080000000800180018001
- 0003C21FC21FC21F861FFFFFFFFFFFFF}
+ 0003C21FC21FC21F861FFFFFFFFFFFFF00000000000000000000000000000000
+ 000000000000}
end
object EwbControl1: TEwbControl
InternetFeatures = [Behaviors, DisableMkProtocol, GetUrlDomFilePathUnencoded]
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 18:06:40 UTC (rev 5248)
+++ software_suite_v3/software/tool/tux_droid_browser/windows/trunk/tux_droid_browser/Unit1.pas 2009-07-30 18:32:59 UTC (rev 5249)
@@ -155,6 +155,8 @@
IconData: TNewNotifyIconData;
procedure WMAppelMessage(var msg : TMessage); message wm_AppelMessage;
procedure OpenUrl(const url : String);
+ procedure ShowSplashScreen;
+ procedure HideSplashScreen;
public
{ Darations publiques }
@@ -171,6 +173,7 @@
started : boolean;
smartcoreReady : boolean;
balloonShowed : boolean;
+ splashScreenMustBeShowed : boolean;
properties : TStringList;
reduce_balloon : boolean;
ready_balloon : boolean;
@@ -187,10 +190,37 @@
{####### Form1 properties and events ######}
{###############################################}
+//Show the splash screen
+procedure TForm1.ShowSplashScreen;
+begin
+ if not Form2.Visible then
+ begin
+ Form2.PmGauge1.Progress := 0;
+ Form2.Timer1.Enabled := true;
+ Form2.Visible := true;
+ Application.ProcessMessages;
+ end;
+end;
+//Hide the splash screen
+procedure TForm1.HideSplashScreen;
+begin
+ Form2.Timer1.Enabled := false;
+ Form2.PmGauge1.Progress := 100;
+ Sleep(500);
+ Form2.Visible := false;
+end;
+
+
//Form initialization.
procedure TForm1.FormCreate(Sender: TObject);
begin
+ //Get if the splash screen must be showed or not
+ splashScreenMustBeShowed := true;
+ if ParamCount > 0 then
+ if ParamStr(1) = '/NSS' then
+ splashScreenMustBeShowed := false;
+
MessageSys := RegisterWindowMessage('WindowForegroundRequest');
reduce_balloon := false;
@@ -220,25 +250,12 @@
//Delegate a part of the form initialization.
procedure TForm1.DelegateInitTimer(Sender: TObject);
-var
- splashScreenMustBeShowed : boolean;
begin
DelegateInit.Enabled := false;
- //Get if the splash screen must be showed or not
- splashScreenMustBeShowed := true;
- if ParamCount > 0 then
- if ParamStr(1) = '/NSS' then
- splashScreenMustBeShowed := false;
-
//Show Splash screen
if splashScreenMustBeShowed then
- begin
- Form2.PmGauge1.Progress := 0;
- Form2.Timer1.Enabled := true;
- Form2.Visible := true;
- Application.ProcessMessages;
- end;
+ ShowSplashScreen;
//Setting app icon.
AppIcon := TIcon.Create;
@@ -281,12 +298,7 @@
//Hide Splash screen
if splashScreenMustBeShowed then
- begin
- Form2.Timer1.Enabled := false;
- Form2.PmGauge1.Progress := 100;
- Sleep(500);
- Form2.Visible := false;
- end;
+ HideSplashScreen;
//Start the Connection checker
ConnectionChecker.Enabled := true;
@@ -794,6 +806,15 @@
inherited DefaultHandler(Msg);
if (TMessage(Msg).Msg = MessageSys) then
begin
+ if not smartcoreReady then
+ begin
+ if not splashScreenMustBeShowed then
+ begin
+ splashScreenMustBeShowed := true;
+ ShowSplashScreen;
+ end;
+ exit;
+ end;
EmbeddedWB1.Go(url);
Form1.Visible := true;
|