lcl, win32: update format settings if UpdateFormatSettings = True (feature #0020517)

git-svn-id: trunk@35168 -
This commit is contained in:
paul 2012-02-06 03:52:31 +00:00
parent 09018556e6
commit 9550f573ca
3 changed files with 12 additions and 0 deletions

View File

@ -1301,6 +1301,7 @@ type
FBidiMode: TBiDiMode;
FRestoreStayOnTop: TList;
FTaskBarBehavior: TTaskBarBehavior;
FUpdateFormatSettings: Boolean;
procedure DoOnIdleEnd;
function GetActive: boolean;
function GetCurrentHelpFile: string;
@ -1455,6 +1456,7 @@ type
procedure IntfAppMinimize;
procedure IntfAppRestore;
procedure IntfDropFiles(const FileNames: Array of String);
procedure IntfSettingsChange;
procedure IntfThemeOptionChange(AThemeServices: TThemeServices; AOption: TThemeOption);
function IsRTLLang(ALang: String): Boolean;
@ -1492,6 +1494,7 @@ type
property MoveFormFocusToChildren: Boolean read FMoveFormFocusToChildren write FMoveFormFocusToChildren default True;
property MouseControl: TControl read FMouseControl;
property TaskBarBehavior: TTaskBarBehavior read FTaskBarBehavior write SetTaskBarBehavior;
property UpdateFormatSettings: Boolean read FUpdateFormatSettings write FUpdateFormatSettings; platform;
property OnActionExecute: TActionEvent read FOnActionExecute write FOnActionExecute;
property OnActionUpdate: TActionEvent read FOnActionUpdate write FOnActionUpdate;
property OnActivate: TNotifyEvent read FOnActivate write FOnActivate;

View File

@ -117,6 +117,7 @@ begin
FIcon.OnChange := @IconChanged;
FNavigation := [anoTabToSelectNext,anoReturnForDefaultControl,
anoEscapeForCancelControl,anoF1ForHelp,anoArrowToSelectNextInParent];
FUpdateFormatSettings := True;
ApplicationActionComponent:=Self;
OnMenuPopupHandler:=@MenuPopupHandler;
System.InitCriticalSection(FAsyncCall.CritSec);
@ -1987,6 +1988,12 @@ begin
TDropFilesEvent(FApplicationHandlers[ahtDropFiles][i])(Self,Filenames);
end;
procedure TApplication.IntfSettingsChange;
begin
if FUpdateFormatSettings then
GetFormatSettings;
end;
procedure TApplication.IntfThemeOptionChange(AThemeServices: TThemeServices;
AOption: TThemeOption);
begin

View File

@ -2165,6 +2165,8 @@ begin
end;
end;
end;
WM_SETTINGCHANGE:
Application.IntfSettingsChange;
WM_THEMECHANGED:
begin
// winxp theme changed, recheck whether themes are enabled