tvplanit: Fix contact form crashing when trying to add a new contact (ok for Win, workaround for other OS)

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4693 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2016-06-08 17:21:06 +00:00
parent 462c767aad
commit 4308a684f9

View File

@@ -33,10 +33,11 @@ unit VpLocalize;
interface
uses
{$IFDEF WINDOWS}
Windows, // Needed for LCIDs
{$ENDIF}
{$IFDEF LCL}
LMessages,LCLProc,LCLType,LCLIntf,
{$ELSE}
Windows,
{$ENDIF}
Classes,
Dialogs,
@@ -526,6 +527,7 @@ begin
AStrings.Add (FCountries.Items[i].Name);
end;
{$IFDEF WINDOWS}
function TVpLocalization.GetCurrentCountry : Integer;
function SubLangID (LanguageID : Word) : Word;
@@ -544,8 +546,6 @@ var
Secondary : Word;
begin
//TODO:
{
LangId := GetUserDefaultLangID;
Primary := PrimaryLangID (LangID);
Secondary := SubLangID (LangID);
@@ -553,8 +553,13 @@ begin
Result := Self.GetCountryBySubLanguage (Primary, Secondary)
else
Result := Self.GetCountryByLanguage (Primary);
}
end;
{$ELSE}
function TVpLocalization.GetCurrentCountry: Integer;
begin
Result := -1;
end;
{$ENDIF}
function TVpLocalization.GetCountryByLanguage (ALanguage : Integer) : Integer;
var