[tuxdroid-svn] r5177 - 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-28 07:37:10
|
Author: jerome
Date: 2009-07-28 09:36:52 +0200 (Tue, 28 Jul 2009)
New Revision: 5177
Modified:
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.dfm
software_suite_v3/software/tool/tux_droid_browser/windows/trunk/tux_droid_browser/Unit1.pas
Log:
* Fixed a bug quitting TuxBox 2.0
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.dfm
===================================================================
--- software_suite_v3/software/tool/tux_droid_browser/windows/trunk/tux_droid_browser/Unit1.dfm 2009-07-27 19:34:30 UTC (rev 5176)
+++ software_suite_v3/software/tool/tux_droid_browser/windows/trunk/tux_droid_browser/Unit1.dfm 2009-07-28 07:36:52 UTC (rev 5177)
@@ -60,6 +60,7 @@
Width = 955
Height = 619
TabOrder = 0
+ Silent = False
RegisterAsBrowser = True
RegisterAsDropTarget = False
OnDocumentComplete = EmbeddedWB1DocumentComplete
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-27 19:34:30 UTC (rev 5176)
+++ software_suite_v3/software/tool/tux_droid_browser/windows/trunk/tux_droid_browser/Unit1.pas 2009-07-28 07:36:52 UTC (rev 5177)
@@ -106,6 +106,7 @@
procedure Quit1Click(Sender: TObject);
procedure Help1Click(Sender: TObject);
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
+ procedure WMQueryEndSession(var Message: TWMQueryEndSession); message WM_QUERYENDSESSION;
procedure Mute1Click(Sender: TObject);
procedure EmbeddedWB1DocumentComplete(ASender: TObject;
const pDisp: IDispatch; var URL: OleVariant);
@@ -168,23 +169,41 @@
//states initialization
TuxUtils.initKnowedVars();
//Starting status pooling.
- EmbeddedWB1.Go(url);
+ EmbeddedWB1.Go('about:blank');
end;
//Avoiding close action.
procedure TForm1.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
begin
- if Form1.isBalloonCanShow() then
- Form1.ShowBalloonTips('TuxBox 2.0 is now hidden in the tray icon' + slinebreak +
- 'To open it again, please double-click the tray icon.' +
- slinebreak +
- 'Click here to make this message disappear.');
- CanClose := False;
- Form1.Hide;
+ if sender.ClassName = 'TForm1' then
+ begin
+ if Form1.isBalloonCanShow() then
+ begin
+ Form1.ShowBalloonTips('TuxBox 2.0 is now hidden in the tray icon' + slinebreak +
+ 'To open it again, please double-click the tray icon.' +
+ slinebreak + 'Click here to make this message disappear.');
+ end;
+ CanClose := False;
+ Form1.Hide;
+ EmbeddedWB1.Go('about:blank');
+ end
+ else
+ CanClose := true;
end;
+procedure TForm1.WMQueryEndSession(var Message: TWMQueryEndSession);
+begin
+ inherited;
+ ConnectionChecker.Enabled := false;
+ TuxUtils.stopServer();
+ Shell_NotifyIcon(Nim_DELETE, @IconData);
+ Application.Terminate;
+ Message.Result:=1;
+end;
+
+
{###############################################}
{####### Tray icon properties and events ######}
{###############################################}
@@ -194,11 +213,13 @@
begin
if Form1.Visible then
begin
+ EmbeddedWB1.Go('about:blank');
Form1.Visible := false;
SetForegroundWindow(Application.Handle);
end
else
begin
+ EmbeddedWB1.Go(url);
Form1.Visible := true;
end;
end;
@@ -256,6 +277,8 @@
begin
if TuxUtils.stopServer() then
begin
+ ConnectionChecker.Enabled := false;
+ ConnectionChecker.Free;
AppIcon.Free;
Form1.DeleteSysTrayIcon;
EmbeddedWB1.Free;
@@ -314,10 +337,12 @@
//Showing application.
if Form1.Visible then
begin
+ EmbeddedWB1.Go('about:blank');
Form1.Visible := false;
end
else
begin
+ EmbeddedWB1.Go(url);
Form1.Visible := true;
SetForegroundWindow(Application.Handle);
end;
|