mirror of
https://github.com/reactos/reactos.git
synced 2024-12-29 10:35:28 +00:00
[SHELL32] Deduplicate MAX_PROPERTY_SHEET_PAGE and AddPropSheetPageCallback(). #179
This commit is contained in:
parent
0d35ee7ade
commit
a3797dba7a
6 changed files with 18 additions and 35 deletions
|
@ -144,7 +144,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(shell);
|
|||
|
||||
#define SHLINK_LOCAL 0
|
||||
#define SHLINK_REMOTE 1
|
||||
#define MAX_PROPERTY_SHEET_PAGE 32
|
||||
|
||||
/* link file formats */
|
||||
|
||||
|
|
|
@ -21,8 +21,6 @@
|
|||
|
||||
#include "precomp.h"
|
||||
|
||||
#define MAX_PROPERTY_SHEET_PAGE 32
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(shell);
|
||||
|
||||
typedef struct
|
||||
|
@ -109,18 +107,6 @@ GetDefaultClusterSize(LPWSTR szFs, PDWORD pClusterSize, PULARGE_INTEGER TotalNum
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
static BOOL CALLBACK
|
||||
AddPropSheetPageCallback(HPROPSHEETPAGE hPage, LPARAM lParam)
|
||||
{
|
||||
PROPSHEETHEADER *ppsh = (PROPSHEETHEADER *)lParam;
|
||||
if (ppsh->nPages < MAX_PROPERTY_SHEET_PAGE)
|
||||
{
|
||||
ppsh->phpage[ppsh->nPages++] = hPage;
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
typedef struct _DRIVE_PROP_PAGE
|
||||
{
|
||||
LPCSTR resname;
|
||||
|
|
|
@ -23,8 +23,6 @@
|
|||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL (fprop);
|
||||
|
||||
#define MAX_PROPERTY_SHEET_PAGE (32)
|
||||
|
||||
/// Folder Options:
|
||||
/// CLASSKEY = HKEY_CLASSES_ROOT\CLSID\{6DFD7C5C-2451-11d3-A299-00C04F8EF6AF}
|
||||
/// DefaultIcon = %SystemRoot%\system32\SHELL32.dll,-210
|
||||
|
|
|
@ -22,26 +22,10 @@
|
|||
|
||||
#include "precomp.h"
|
||||
|
||||
#define MAX_PROPERTY_SHEET_PAGE 32
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(shell);
|
||||
|
||||
EXTERN_C HPSXA WINAPI SHCreatePropSheetExtArrayEx(HKEY hKey, LPCWSTR pszSubKey, UINT max_iface, IDataObject *pDataObj);
|
||||
|
||||
static BOOL CALLBACK
|
||||
AddPropSheetPageCallback(HPROPSHEETPAGE hPage, LPARAM lParam)
|
||||
{
|
||||
PROPSHEETHEADERW *pHeader = (PROPSHEETHEADERW *)lParam;
|
||||
|
||||
if (pHeader->nPages < MAX_PROPERTY_SHEET_PAGE)
|
||||
{
|
||||
pHeader->phpage[pHeader->nPages++] = hPage;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static UINT
|
||||
LoadPropSheetHandlers(LPCWSTR pwszPath, PROPSHEETHEADERW *pHeader, UINT cMaxPages, HPSXA *phpsxa, IDataObject *pDataObj)
|
||||
{
|
||||
|
|
|
@ -24,8 +24,6 @@
|
|||
#include <mmsystem.h>
|
||||
#include <ntquery.h>
|
||||
|
||||
#define MAX_PROPERTY_SHEET_PAGE 32
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(CRecycleBin);
|
||||
|
||||
typedef struct
|
||||
|
|
|
@ -93,4 +93,22 @@ extern const GUID CLSID_UnixDosFolder;
|
|||
extern const GUID SHELL32_AdvtShortcutProduct;
|
||||
extern const GUID SHELL32_AdvtShortcutComponent;
|
||||
|
||||
#define MAX_PROPERTY_SHEET_PAGE 32
|
||||
|
||||
extern inline
|
||||
BOOL
|
||||
CALLBACK
|
||||
AddPropSheetPageCallback(HPROPSHEETPAGE hPage, LPARAM lParam)
|
||||
{
|
||||
PROPSHEETHEADERW *pHeader = (PROPSHEETHEADERW *)lParam;
|
||||
|
||||
if (pHeader->nPages < MAX_PROPERTY_SHEET_PAGE)
|
||||
{
|
||||
pHeader->phpage[pHeader->nPages++] = hPage;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
#endif /* _PRECOMP_H__ */
|
||||
|
|
Loading…
Reference in a new issue