Author: ekohl
Date: Sun Nov 18 01:24:29 2007
New Revision: 30531
URL:
http://svn.reactos.org/svn/reactos?rev=30531&view=rev
Log:
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.
Modified:
trunk/reactos/dll/cpl/sysdm/lang/de-DE.rc
trunk/reactos/dll/cpl/sysdm/lang/en-US.rc
trunk/reactos/dll/cpl/sysdm/lang/fr-FR.rc
trunk/reactos/dll/cpl/sysdm/lang/id-ID.rc
trunk/reactos/dll/cpl/sysdm/lang/it-IT.rc
trunk/reactos/dll/cpl/sysdm/lang/pl-PL.rc
trunk/reactos/dll/cpl/sysdm/lang/ru-RU.rc
trunk/reactos/dll/cpl/sysdm/lang/sk-SK.rc
trunk/reactos/dll/cpl/sysdm/lang/uk-UA.rc
trunk/reactos/dll/cpl/sysdm/resource.h
trunk/reactos/dll/cpl/sysdm/userprofile.c
Modified: trunk/reactos/dll/cpl/sysdm/lang/de-DE.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/sysdm/lang/de-DE.r…
==============================================================================
--- trunk/reactos/dll/cpl/sysdm/lang/de-DE.rc (original)
+++ trunk/reactos/dll/cpl/sysdm/lang/de-DE.rc Sun Nov 18 01:24:29 2007
@@ -185,7 +185,7 @@
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 @@
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 @@
IDS_MINI_DUMP "Kleines Speicherabild (64KB)"
IDS_KERNEL_DUMP "Kernelspeicherabild"
IDS_FULL_DUMP "Vollständiges Speicherabild"
-END
+ IDS_USERPROFILE_NAME "Name"
+ IDS_USERPROFILE_SIZE "Größe"
+ IDS_USERPROFILE_TYPE "Typ"
+ IDS_USERPROFILE_STATUS "Status"
+ IDS_USERPROFILE_MODIFIED "Geändert"
+END
Modified: trunk/reactos/dll/cpl/sysdm/lang/en-US.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/sysdm/lang/en-US.r…
==============================================================================
--- trunk/reactos/dll/cpl/sysdm/lang/en-US.rc (original)
+++ trunk/reactos/dll/cpl/sysdm/lang/en-US.rc Sun Nov 18 01:24:29 2007
@@ -267,4 +267,9 @@
IDS_MINI_DUMP "Minidump(64KB)"
IDS_KERNEL_DUMP "Kernel dump"
IDS_FULL_DUMP "Complete dump"
-END
+ IDS_USERPROFILE_NAME "Name"
+ IDS_USERPROFILE_SIZE "Size"
+ IDS_USERPROFILE_TYPE "Type"
+ IDS_USERPROFILE_STATUS "Status"
+ IDS_USERPROFILE_MODIFIED "Modified"
+END
Modified: trunk/reactos/dll/cpl/sysdm/lang/fr-FR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/sysdm/lang/fr-FR.r…
==============================================================================
--- trunk/reactos/dll/cpl/sysdm/lang/fr-FR.rc (original)
+++ trunk/reactos/dll/cpl/sysdm/lang/fr-FR.rc Sun Nov 18 01:24:29 2007
@@ -272,4 +272,9 @@
IDS_MINI_DUMP "Mini cliché(64Ko)"
IDS_KERNEL_DUMP "Cliché du noyau"
IDS_FULL_DUMP "Cliché complet"
-END
+ IDS_USERPROFILE_NAME "Name"
+ IDS_USERPROFILE_SIZE "Size"
+ IDS_USERPROFILE_TYPE "Type"
+ IDS_USERPROFILE_STATUS "Status"
+ IDS_USERPROFILE_MODIFIED "Modified"
+END
Modified: trunk/reactos/dll/cpl/sysdm/lang/id-ID.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/sysdm/lang/id-ID.r…
==============================================================================
--- trunk/reactos/dll/cpl/sysdm/lang/id-ID.rc (original)
+++ trunk/reactos/dll/cpl/sysdm/lang/id-ID.rc Sun Nov 18 01:24:29 2007
@@ -266,4 +266,9 @@
IDS_MINI_DUMP "Minidump(64KB)"
IDS_KERNEL_DUMP "Kernel dump"
IDS_FULL_DUMP "Complete dump"
-END
+ IDS_USERPROFILE_NAME "Name"
+ IDS_USERPROFILE_SIZE "Size"
+ IDS_USERPROFILE_TYPE "Type"
+ IDS_USERPROFILE_STATUS "Status"
+ IDS_USERPROFILE_MODIFIED "Modified"
+END
Modified: trunk/reactos/dll/cpl/sysdm/lang/it-IT.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/sysdm/lang/it-IT.r…
==============================================================================
--- trunk/reactos/dll/cpl/sysdm/lang/it-IT.rc (original)
+++ trunk/reactos/dll/cpl/sysdm/lang/it-IT.rc Sun Nov 18 01:24:29 2007
@@ -267,4 +267,9 @@
IDS_MINI_DUMP "Minidump(64KB)"
IDS_KERNEL_DUMP "Kernel dump"
IDS_FULL_DUMP "Complete dump"
-END
+ IDS_USERPROFILE_NAME "Name"
+ IDS_USERPROFILE_SIZE "Size"
+ IDS_USERPROFILE_TYPE "Type"
+ IDS_USERPROFILE_STATUS "Status"
+ IDS_USERPROFILE_MODIFIED "Modified"
+END
Modified: trunk/reactos/dll/cpl/sysdm/lang/pl-PL.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/sysdm/lang/pl-PL.r…
==============================================================================
--- trunk/reactos/dll/cpl/sysdm/lang/pl-PL.rc (original)
+++ trunk/reactos/dll/cpl/sysdm/lang/pl-PL.rc Sun Nov 18 01:24:29 2007
@@ -271,4 +271,9 @@
IDS_MINI_DUMP "Minidump(64KB)"
IDS_KERNEL_DUMP "Kernel dump"
IDS_FULL_DUMP "Complete dump"
-END
+ IDS_USERPROFILE_NAME "Name"
+ IDS_USERPROFILE_SIZE "Size"
+ IDS_USERPROFILE_TYPE "Type"
+ IDS_USERPROFILE_STATUS "Status"
+ IDS_USERPROFILE_MODIFIED "Modified"
+END
Modified: trunk/reactos/dll/cpl/sysdm/lang/ru-RU.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/sysdm/lang/ru-RU.r…
==============================================================================
--- trunk/reactos/dll/cpl/sysdm/lang/ru-RU.rc (original)
+++ trunk/reactos/dll/cpl/sysdm/lang/ru-RU.rc Sun Nov 18 01:24:29 2007
@@ -267,4 +267,9 @@
IDS_MINI_DUMP "Minidump(64KB)"
IDS_KERNEL_DUMP "Kernel dump"
IDS_FULL_DUMP "Complete dump"
-END
+ IDS_USERPROFILE_NAME "Name"
+ IDS_USERPROFILE_SIZE "Size"
+ IDS_USERPROFILE_TYPE "Type"
+ IDS_USERPROFILE_STATUS "Status"
+ IDS_USERPROFILE_MODIFIED "Modified"
+END
Modified: trunk/reactos/dll/cpl/sysdm/lang/sk-SK.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/sysdm/lang/sk-SK.r…
==============================================================================
--- trunk/reactos/dll/cpl/sysdm/lang/sk-SK.rc (original)
+++ trunk/reactos/dll/cpl/sysdm/lang/sk-SK.rc Sun Nov 18 01:24:29 2007
@@ -276,4 +276,9 @@
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"
-END
+ IDS_USERPROFILE_NAME "Name"
+ IDS_USERPROFILE_SIZE "Size"
+ IDS_USERPROFILE_TYPE "Type"
+ IDS_USERPROFILE_STATUS "Status"
+ IDS_USERPROFILE_MODIFIED "Modified"
+END
Modified: trunk/reactos/dll/cpl/sysdm/lang/uk-UA.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/sysdm/lang/uk-UA.r…
==============================================================================
--- trunk/reactos/dll/cpl/sysdm/lang/uk-UA.rc (original)
+++ trunk/reactos/dll/cpl/sysdm/lang/uk-UA.rc Sun Nov 18 01:24:29 2007
@@ -275,5 +275,9 @@
IDS_MINI_DUMP "̳í³äàìï(64Êá)"
IDS_KERNEL_DUMP "Äàìï ÿäðà"
IDS_FULL_DUMP "Ïîâíèé äàìï"
-
-END
+ IDS_USERPROFILE_NAME "Name"
+ IDS_USERPROFILE_SIZE "Size"
+ IDS_USERPROFILE_TYPE "Type"
+ IDS_USERPROFILE_STATUS "Status"
+ IDS_USERPROFILE_MODIFIED "Modified"
+END
Modified: trunk/reactos/dll/cpl/sysdm/resource.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/sysdm/resource.h?r…
==============================================================================
--- trunk/reactos/dll/cpl/sysdm/resource.h (original)
+++ trunk/reactos/dll/cpl/sysdm/resource.h Sun Nov 18 01:24:29 2007
@@ -24,6 +24,12 @@
#define IDS_MINI_DUMP 69
#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 */
Modified: trunk/reactos/dll/cpl/sysdm/userprofile.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/sysdm/userprofile.…
==============================================================================
--- trunk/reactos/dll/cpl/sysdm/userprofile.c (original)
+++ trunk/reactos/dll/cpl/sysdm/userprofile.c Sun Nov 18 01:24:29 2007
@@ -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 @@
{
case WM_INITDIALOG:
MessageBox(hwndDlg, _T("Dialog not yet implemented!"), NULL, 0);
+ OnInitDialog(hwndDlg);
break;
case WM_COMMAND: