Author: jerome
Date: 2009-09-15 10:17:07 +0200 (Tue, 15 Sep 2009)
New Revision: 5385
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/Unit1.dfm
software_suite_v3/software/tool/tux_droid_browser/windows/trunk/tux_droid_browser/Unit1.pas
Log:
* Fixed language selection bug.
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-09-15 08:01:54 UTC (rev 5384)
+++
software_suite_v3/software/tool/tux_droid_browser/windows/trunk/tux_droid_browser/TuxUtils.pas
2009-09-15 08:17:07 UTC (rev 5385)
@@ -24,6 +24,7 @@
procedure initKnowedVars();
procedure parseStates(aString : string; var values : TStringList);
function getResult(request : string) : boolean;
+ function getRegisteryLanguage(): string;
var
XmlScanner1 : TXmlScanner;
@@ -411,4 +412,34 @@
end;
+
+function getRegisteryLanguage(): string;
+const
+ TUXDROID_REGISTRY_PATH = 'SOFTWARE\Tux Droid\Installation';
+begin
+ with TRegistry.Create do
+ try
+ RootKey := HKEY_LOCAL_MACHINE;
+
+ // From Tuxdroid setup
+ if OpenKey(TUXDROID_REGISTRY_PATH, False) then
+ begin
+ // Get tuxdroid installation language
+
+ result := ReadString('Language');
+
+ if ( result <> 'en' ) and (result <> 'en_US') and (result <> 'en_GB')
and (result <> 'fr')
+ and(result <> 'nl') and (result <> 'nl_BE') and (result <> 'it') and
(result <> 'es')
+ and(result <> 'de') and (result <> 'ar') and (result <> 'da') and
(result <> 'sv')
+ and(result <> 'no') and (result <> 'pt' ) then
+ result := 'en';
+
+ CloseKey;
+ end;
+ finally
+ Free;
+ end;
+end;
+
+
end.
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-09-15 08:01:54 UTC (rev 5384)
+++
software_suite_v3/software/tool/tux_droid_browser/windows/trunk/tux_droid_browser/Unit1.dfm
2009-09-15 08:17:07 UTC (rev 5385)
@@ -64,7 +64,6 @@
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-09-15 08:01:54 UTC (rev 5384)
+++
software_suite_v3/software/tool/tux_droid_browser/windows/trunk/tux_droid_browser/Unit1.pas
2009-09-15 08:17:07 UTC (rev 5385)
@@ -252,10 +252,10 @@
end
else
begin
- properties.CommaText := 'show_balloon=true, show_ready=true,
language=en';
+ properties.CommaText := 'show_balloon=true, show_ready=true';
end;
- language := properties.Values['language'];
+ language := TuxUtils.getRegisteryLanguage();
DelegateInit.Enabled := true;
end;
@@ -703,13 +703,6 @@
started := true;
end;
- //Checking for language change.
- if language <> TuxUtils.getUserLanguage then
- begin
- language := TuxUtils.getUserLanguage();
- gnugettext.UseLanguage(language);
- end;
-
Application.ProcessMessages;
ConnectionChecker.Enabled := true;
connCheckerFlag := false;
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn