From 9c843a9ea8b9cd233bf1b6d1fbb6cbfc3b933eff Mon Sep 17 00:00:00 2001 From: ondrej Date: Wed, 2 Mar 2016 06:41:52 +0000 Subject: [PATCH] win32: clean up git-svn-id: trunk@51799 - --- lcl/interfaces/win32/win32wsdialogs.pp | 13 ++++--------- lcl/interfaces/win32/win32wsextdlgs.pp | 2 -- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/lcl/interfaces/win32/win32wsdialogs.pp b/lcl/interfaces/win32/win32wsdialogs.pp index 427d415a60..11942298fe 100644 --- a/lcl/interfaces/win32/win32wsdialogs.pp +++ b/lcl/interfaces/win32/win32wsdialogs.pp @@ -885,7 +885,6 @@ var Dialog: IFileOpenDialog; begin if CanUseVistaDialogs(TOpenDialog(ACommonDialog)) then - //if (WindowsVersion >= wvVista) and ThemeServices.ThemesEnabled then begin if Succeeded(CoCreateInstance(CLSID_FileOpenDialog, nil, CLSCTX_INPROC_SERVER, IFileOpenDialog, Dialog)) and Assigned(Dialog) then begin @@ -906,7 +905,6 @@ var begin if ACommonDialog.Handle <> 0 then if CanUseVistaDialogs(TOpenDialog(ACommonDialog)) then - //if (WindowsVersion >= wvVista) and ThemeServices.ThemesEnabled then begin Dialog := IFileDialog(ACommonDialog.Handle); Dialog._Release; @@ -928,9 +926,9 @@ begin lOldWorkingDir := GetCurrentDirUTF8; try lInitialDir := TOpenDialog(ACommonDialog).InitialDir; - if lInitialDir <> '' then SetCurrentDirUTF8(lInitialDir); + if lInitialDir <> '' then + SetCurrentDirUTF8(lInitialDir); if CanUseVistaDialogs(TOpenDialog(ACommonDialog)) then - //if (WindowsVersion >= wvVista) and ThemeServices.ThemesEnabled then begin Dialog := IFileOpenDialog(ACommonDialog.Handle); VistaDialogShowModal(Dialog, TOpenDialog(ACommonDialog)); @@ -954,7 +952,6 @@ var Dialog: IFileSaveDialog; begin if CanUseVistaDialogs(TOpenDialog(ACommonDialog)) then - //if (WindowsVersion >= wvVista) and ThemeServices.ThemesEnabled then begin if Succeeded(CoCreateInstance(CLSID_FileSaveDialog, nil, CLSCTX_INPROC_SERVER, IFileSaveDialog, Dialog)) and Assigned(Dialog) then @@ -976,7 +973,6 @@ var begin if ACommonDialog.Handle <> 0 then if CanUseVistaDialogs(TOpenDialog(ACommonDialog)) then - //if (WindowsVersion >= wvVista) and ThemeServices.ThemesEnabled then begin Dialog := IFileDialog(ACommonDialog.Handle); Dialog._Release; @@ -998,9 +994,9 @@ begin lOldWorkingDir := GetCurrentDirUTF8; try lInitialDir := TSaveDialog(ACommonDialog).InitialDir; - if lInitialDir <> '' then SetCurrentDirUTF8(lInitialDir); + if lInitialDir <> '' then + SetCurrentDirUTF8(lInitialDir); if CanUseVistaDialogs(TOpenDialog(ACommonDialog)) then - //if (WindowsVersion >= wvVista) and ThemeServices.ThemesEnabled then begin Dialog := IFileSaveDialog(ACommonDialog.Handle); TWin32WSOpenDialog.VistaDialogShowModal(Dialog, TOpenDialog(ACommonDialog)); @@ -1134,7 +1130,6 @@ var Dialog: IFileOpenDialog; begin if CanUseVistaDialogs(TOpenDialog(ACommonDialog)) then - //if (WindowsVersion >= wvVista) and ThemeServices.ThemesEnabled then begin if Succeeded(CoCreateInstance(CLSID_FileOpenDialog, nil, CLSCTX_INPROC_SERVER, IFileOpenDialog, Dialog)) and Assigned(Dialog) then begin diff --git a/lcl/interfaces/win32/win32wsextdlgs.pp b/lcl/interfaces/win32/win32wsextdlgs.pp index c4a69b6214..5a7841cccc 100644 --- a/lcl/interfaces/win32/win32wsextdlgs.pp +++ b/lcl/interfaces/win32/win32wsextdlgs.pp @@ -158,7 +158,6 @@ var fos: FILEOPENDIALOGOPTIONS; begin Result := inherited CreateHandle(ACommonDialog); - //if (WindowsVersion >= wvVista) and ThemeServices.ThemesEnabled then if CanUseVistaDialogs(TOpenDialog(ACommonDialog)) then begin Dialog := IFileOpenDialog(Result); @@ -201,7 +200,6 @@ var fos: FILEOPENDIALOGOPTIONS; begin Result := inherited CreateHandle(ACommonDialog); - //if (WindowsVersion >= wvVista) and ThemeServices.ThemesEnabled then if CanUseVistaDialogs(TOpenDialog(ACommonDialog)) then begin Dialog := IFileSaveDialog(Result);