mirror of
https://github.com/reactos/reactos.git
synced 2025-04-04 04:26:32 +00:00
Start working on the user profile page:
- Initialize the list view columns. - Disable the "Delete" and "Copy To" buttons if the user is not an admin. svn path=/trunk/; revision=30531
This commit is contained in:
parent
a7627d27fa
commit
15cceadaff
11 changed files with 121 additions and 4 deletions
|
@ -185,7 +185,7 @@ BEGIN
|
|||
LTEXT "Auslagerungsdatei (MB)", IDC_STATIC, 115, 5, 96, 9
|
||||
LISTBOX IDC_PAGEFILELIST, 10, 16, 204, 52, LBS_NOTIFY | LBS_USETABSTOPS
|
||||
GROUPBOX "Größe der Auslagerungsdatei für das gewählte Laufwerk", IDC_DRIVEGROUP, 10, 70, 204, 104
|
||||
LTEXT "Laufwerk:", IDC_STATIC, 20, 80, 40, 8
|
||||
LTEXT "Laufwerk:", IDC_STATIC, 20, 81, 40, 9
|
||||
LTEXT "", IDC_DRIVE, 105, 81, 100, 9
|
||||
LTEXT "Verfügbarer Speicherplatz:", IDC_STATIC, 20, 92, 130, 9
|
||||
LTEXT "", IDC_SPACEAVAIL, 105, 92, 104, 9
|
||||
|
@ -202,9 +202,9 @@ BEGIN
|
|||
LTEXT "Minimal zugelassen:", IDC_STATIC, 18, 188, 70, 9
|
||||
LTEXT "", IDC_MINIMUM, 88, 188, 100, 9
|
||||
LTEXT "Empfohlen:", IDC_STATIC, 18, 199, 52, 9
|
||||
LTEXT "", IDC_RECOMMENDED, 88, 197, 100, 9
|
||||
LTEXT "", IDC_RECOMMENDED, 88, 199, 100, 9
|
||||
LTEXT "Momentan zugeteilt:", IDC_STATIC, 18, 210, 66, 9
|
||||
LTEXT "", IDC_CURRENT, 88, 208, 100, 9
|
||||
LTEXT "", IDC_CURRENT, 88, 210, 100, 9
|
||||
|
||||
DEFPUSHBUTTON "OK", IDOK, 114, 232, 48, 14
|
||||
PUSHBUTTON "Abbrechen", IDCANCEL, 168, 232, 48, 14
|
||||
|
@ -273,4 +273,9 @@ BEGIN
|
|||
IDS_MINI_DUMP "Kleines Speicherabild (64KB)"
|
||||
IDS_KERNEL_DUMP "Kernelspeicherabild"
|
||||
IDS_FULL_DUMP "Vollständiges Speicherabild"
|
||||
IDS_USERPROFILE_NAME "Name"
|
||||
IDS_USERPROFILE_SIZE "Größe"
|
||||
IDS_USERPROFILE_TYPE "Typ"
|
||||
IDS_USERPROFILE_STATUS "Status"
|
||||
IDS_USERPROFILE_MODIFIED "Geändert"
|
||||
END
|
||||
|
|
|
@ -267,4 +267,9 @@ BEGIN
|
|||
IDS_MINI_DUMP "Minidump(64KB)"
|
||||
IDS_KERNEL_DUMP "Kernel dump"
|
||||
IDS_FULL_DUMP "Complete dump"
|
||||
IDS_USERPROFILE_NAME "Name"
|
||||
IDS_USERPROFILE_SIZE "Size"
|
||||
IDS_USERPROFILE_TYPE "Type"
|
||||
IDS_USERPROFILE_STATUS "Status"
|
||||
IDS_USERPROFILE_MODIFIED "Modified"
|
||||
END
|
||||
|
|
|
@ -272,4 +272,9 @@ BEGIN
|
|||
IDS_MINI_DUMP "Mini cliché(64Ko)"
|
||||
IDS_KERNEL_DUMP "Cliché du noyau"
|
||||
IDS_FULL_DUMP "Cliché complet"
|
||||
IDS_USERPROFILE_NAME "Name"
|
||||
IDS_USERPROFILE_SIZE "Size"
|
||||
IDS_USERPROFILE_TYPE "Type"
|
||||
IDS_USERPROFILE_STATUS "Status"
|
||||
IDS_USERPROFILE_MODIFIED "Modified"
|
||||
END
|
||||
|
|
|
@ -266,4 +266,9 @@ BEGIN
|
|||
IDS_MINI_DUMP "Minidump(64KB)"
|
||||
IDS_KERNEL_DUMP "Kernel dump"
|
||||
IDS_FULL_DUMP "Complete dump"
|
||||
IDS_USERPROFILE_NAME "Name"
|
||||
IDS_USERPROFILE_SIZE "Size"
|
||||
IDS_USERPROFILE_TYPE "Type"
|
||||
IDS_USERPROFILE_STATUS "Status"
|
||||
IDS_USERPROFILE_MODIFIED "Modified"
|
||||
END
|
||||
|
|
|
@ -267,4 +267,9 @@ BEGIN
|
|||
IDS_MINI_DUMP "Minidump(64KB)"
|
||||
IDS_KERNEL_DUMP "Kernel dump"
|
||||
IDS_FULL_DUMP "Complete dump"
|
||||
IDS_USERPROFILE_NAME "Name"
|
||||
IDS_USERPROFILE_SIZE "Size"
|
||||
IDS_USERPROFILE_TYPE "Type"
|
||||
IDS_USERPROFILE_STATUS "Status"
|
||||
IDS_USERPROFILE_MODIFIED "Modified"
|
||||
END
|
||||
|
|
|
@ -271,4 +271,9 @@ BEGIN
|
|||
IDS_MINI_DUMP "Minidump(64KB)"
|
||||
IDS_KERNEL_DUMP "Kernel dump"
|
||||
IDS_FULL_DUMP "Complete dump"
|
||||
IDS_USERPROFILE_NAME "Name"
|
||||
IDS_USERPROFILE_SIZE "Size"
|
||||
IDS_USERPROFILE_TYPE "Type"
|
||||
IDS_USERPROFILE_STATUS "Status"
|
||||
IDS_USERPROFILE_MODIFIED "Modified"
|
||||
END
|
||||
|
|
|
@ -267,4 +267,9 @@ BEGIN
|
|||
IDS_MINI_DUMP "Minidump(64KB)"
|
||||
IDS_KERNEL_DUMP "Kernel dump"
|
||||
IDS_FULL_DUMP "Complete dump"
|
||||
IDS_USERPROFILE_NAME "Name"
|
||||
IDS_USERPROFILE_SIZE "Size"
|
||||
IDS_USERPROFILE_TYPE "Type"
|
||||
IDS_USERPROFILE_STATUS "Status"
|
||||
IDS_USERPROFILE_MODIFIED "Modified"
|
||||
END
|
||||
|
|
|
@ -276,4 +276,9 @@ BEGIN
|
|||
IDS_MINI_DUMP "Malý výpis pamäte (64 kB)"
|
||||
IDS_KERNEL_DUMP "Výpis pamäte jadra"
|
||||
IDS_FULL_DUMP "Úplný výpis pamäte"
|
||||
IDS_USERPROFILE_NAME "Name"
|
||||
IDS_USERPROFILE_SIZE "Size"
|
||||
IDS_USERPROFILE_TYPE "Type"
|
||||
IDS_USERPROFILE_STATUS "Status"
|
||||
IDS_USERPROFILE_MODIFIED "Modified"
|
||||
END
|
||||
|
|
|
@ -275,5 +275,9 @@ BEGIN
|
|||
IDS_MINI_DUMP "<22>³ם³האלן(64<36>ב)"
|
||||
IDS_KERNEL_DUMP "<22>אלן <20>הנא"
|
||||
IDS_FULL_DUMP "<22>מגםטי האלן"
|
||||
|
||||
IDS_USERPROFILE_NAME "Name"
|
||||
IDS_USERPROFILE_SIZE "Size"
|
||||
IDS_USERPROFILE_TYPE "Type"
|
||||
IDS_USERPROFILE_STATUS "Status"
|
||||
IDS_USERPROFILE_MODIFIED "Modified"
|
||||
END
|
||||
|
|
|
@ -25,6 +25,12 @@
|
|||
#define IDS_KERNEL_DUMP 70
|
||||
#define IDS_FULL_DUMP 71
|
||||
|
||||
#define IDS_USERPROFILE_NAME 72
|
||||
#define IDS_USERPROFILE_SIZE 73
|
||||
#define IDS_USERPROFILE_TYPE 74
|
||||
#define IDS_USERPROFILE_STATUS 75
|
||||
#define IDS_USERPROFILE_MODIFIED 76
|
||||
|
||||
|
||||
/* propsheet - general */
|
||||
#define IDD_PROPPAGEGENERAL 100
|
||||
|
|
|
@ -10,6 +10,72 @@
|
|||
|
||||
#include "precomp.h"
|
||||
|
||||
|
||||
static VOID
|
||||
SetListViewColumns(HWND hwndListView)
|
||||
{
|
||||
LV_COLUMN column;
|
||||
RECT rect;
|
||||
TCHAR szStr[32];
|
||||
|
||||
GetClientRect(hwndListView, &rect);
|
||||
|
||||
SendMessage(hwndListView, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, LVS_EX_FULLROWSELECT);
|
||||
|
||||
memset(&column, 0x00, sizeof(column));
|
||||
column.mask = LVCF_FMT | LVCF_WIDTH | LVCF_SUBITEM | LVCF_TEXT;
|
||||
column.fmt = LVCFMT_LEFT;
|
||||
column.cx = (INT)((rect.right - rect.left) * 0.40);
|
||||
column.iSubItem = 0;
|
||||
LoadString(hApplet, IDS_USERPROFILE_NAME, szStr, 32);
|
||||
column.pszText = szStr;
|
||||
(void)ListView_InsertColumn(hwndListView, 0, &column);
|
||||
|
||||
column.fmt = LVCFMT_RIGHT;
|
||||
column.cx = (INT)((rect.right - rect.left) * 0.15);
|
||||
column.iSubItem = 1;
|
||||
LoadString(hApplet, IDS_USERPROFILE_SIZE, szStr, 32);
|
||||
column.pszText = szStr;
|
||||
(void)ListView_InsertColumn(hwndListView, 1, &column);
|
||||
|
||||
column.fmt = LVCFMT_LEFT;
|
||||
column.cx = (INT)((rect.right - rect.left) * 0.15);
|
||||
column.iSubItem = 2;
|
||||
LoadString(hApplet, IDS_USERPROFILE_TYPE, szStr, 32);
|
||||
column.pszText = szStr;
|
||||
(void)ListView_InsertColumn(hwndListView, 2, &column);
|
||||
|
||||
column.fmt = LVCFMT_LEFT;
|
||||
column.cx = (INT)((rect.right - rect.left) * 0.15);
|
||||
column.iSubItem = 3;
|
||||
LoadString(hApplet, IDS_USERPROFILE_STATUS, szStr, 32);
|
||||
column.pszText = szStr;
|
||||
(void)ListView_InsertColumn(hwndListView, 3, &column);
|
||||
|
||||
column.fmt = LVCFMT_LEFT;
|
||||
column.cx = (INT)((rect.right - rect.left) * 0.15) - GetSystemMetrics(SM_CYHSCROLL);
|
||||
column.iSubItem = 4;
|
||||
LoadString(hApplet, IDS_USERPROFILE_MODIFIED, szStr, 32);
|
||||
column.pszText = szStr;
|
||||
(void)ListView_InsertColumn(hwndListView, 4, &column);
|
||||
}
|
||||
|
||||
|
||||
static VOID
|
||||
OnInitDialog(HWND hwndDlg)
|
||||
{
|
||||
/* Initialize the list view control */
|
||||
SetListViewColumns(GetDlgItem(hwndDlg, IDC_USERPROFILE_LIST));
|
||||
|
||||
/* Disable the "Delete" and "Copy To" buttons if the user is not an admin */
|
||||
if (!IsUserAdmin())
|
||||
{
|
||||
EnableWindow(GetDlgItem(hwndDlg, IDC_USERPROFILE_DELETE), FALSE);
|
||||
EnableWindow(GetDlgItem(hwndDlg, IDC_USERPROFILE_COPY), FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Property page dialog callback */
|
||||
INT_PTR CALLBACK
|
||||
UserProfileDlgProc(HWND hwndDlg,
|
||||
|
@ -21,6 +87,7 @@ UserProfileDlgProc(HWND hwndDlg,
|
|||
{
|
||||
case WM_INITDIALOG:
|
||||
MessageBox(hwndDlg, _T("Dialog not yet implemented!"), NULL, 0);
|
||||
OnInitDialog(hwndDlg);
|
||||
break;
|
||||
|
||||
case WM_COMMAND:
|
||||
|
|
Loading…
Reference in a new issue