Author: ekohl
Date: Sun Jan 10 21:12:23 2016
New Revision: 70571
URL:
http://svn.reactos.org/svn/reactos?rev=70571&view=rev
Log:
[INTL]
- Remove the Advanced page for non-admin users.
- Disable the 'complex script' and 'east asian language' checkboxes for
non-admin users.
Modified:
trunk/reactos/dll/cpl/intl/intl.c
trunk/reactos/dll/cpl/intl/intl.h
trunk/reactos/dll/cpl/intl/languages.c
Modified: trunk/reactos/dll/cpl/intl/intl.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/intl/intl.c?rev=70…
==============================================================================
--- trunk/reactos/dll/cpl/intl/intl.c [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/intl/intl.c [iso-8859-1] Sun Jan 10 21:12:23 2016
@@ -168,6 +168,7 @@
return FALSE;
pGlobalData->SystemLCID = GetSystemDefaultLCID();
+ pGlobalData->bIsUserAdmin = IsUserAdmin();
LoadString(hApplet, IDS_CPLNAME, Caption, sizeof(Caption) / sizeof(TCHAR));
@@ -178,13 +179,20 @@
psh.hInstance = hApplet;
psh.hIcon = LoadIcon(hApplet, MAKEINTRESOURCE(IDC_CPLICON));
psh.pszCaption = Caption;
- psh.nPages = sizeof(psp) / sizeof(PROPSHEETPAGE);
+ psh.nPages = 0; //sizeof(psp) / sizeof(PROPSHEETPAGE);
psh.nStartPage = 0;
psh.ppsp = psp;
InitPropSheetPage(&psp[0], IDD_GENERALPAGE, GeneralPageProc,
(LPARAM)pGlobalData);
+ psh.nPages++;
InitPropSheetPage(&psp[1], IDD_LANGUAGESPAGE, LanguagesPageProc,
(LPARAM)pGlobalData);
- InitPropSheetPage(&psp[2], IDD_ADVANCEDPAGE, AdvancedPageProc,
(LPARAM)pGlobalData);
+ psh.nPages++;
+
+ if (pGlobalData->bIsUserAdmin)
+ {
+ InitPropSheetPage(&psp[2], IDD_ADVANCEDPAGE, AdvancedPageProc,
(LPARAM)pGlobalData);
+ psh.nPages++;
+ }
ret = (LONG)(PropertySheet(&psh) != -1);
Modified: trunk/reactos/dll/cpl/intl/intl.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/intl/intl.h?rev=70…
==============================================================================
--- trunk/reactos/dll/cpl/intl/intl.h [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/intl/intl.h [iso-8859-1] Sun Jan 10 21:12:23 2016
@@ -116,6 +116,8 @@
GEOID geoid;
BOOL fGeoIdChanged;
+ /* Misc */
+ BOOL bIsUserAdmin;
} GLOBALDATA, *PGLOBALDATA;
typedef struct
Modified: trunk/reactos/dll/cpl/intl/languages.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/intl/languages.c?r…
==============================================================================
--- trunk/reactos/dll/cpl/intl/languages.c [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/intl/languages.c [iso-8859-1] Sun Jan 10 21:12:23 2016
@@ -10,10 +10,21 @@
LPARAM lParam)
{
SHELLEXECUTEINFOW shInputDll;
+ PGLOBALDATA pGlobalData;
+
+ pGlobalData = (PGLOBALDATA)GetWindowLongPtr(hwndDlg, DWLP_USER);
switch (uMsg)
{
case WM_INITDIALOG:
+ pGlobalData = (PGLOBALDATA)((LPPROPSHEETPAGE)lParam)->lParam;
+ SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)pGlobalData);
+
+ if (!pGlobalData->bIsUserAdmin)
+ {
+ EnableWindow(GetDlgItem(hwndDlg, IDC_INST_FILES_FOR_RTOL_LANG), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_INST_FILES_FOR_ASIAN), FALSE);
+ }
break;
case WM_COMMAND: