Christoph von Wittich <Christoph(a)ApiViewer.de>
- Extract hard-coded english sentences from settings.c and put them into
resources
- Add corresponding german translations
- Correct some control locations in german and english resource files
- Show only resolutions >= 640x480
Modified: trunk/reactos/lib/cpl/desk/de.rc
Modified: trunk/reactos/lib/cpl/desk/en.rc
Modified: trunk/reactos/lib/cpl/desk/resource.h
Modified: trunk/reactos/lib/cpl/desk/settings.c
_____
Modified: trunk/reactos/lib/cpl/desk/de.rc
--- trunk/reactos/lib/cpl/desk/de.rc 2005-03-22 19:32:17 UTC (rev
14270)
+++ trunk/reactos/lib/cpl/desk/de.rc 2005-03-22 20:16:41 UTC (rev
14271)
@@ -1,4 +1,4 @@
-LANGUAGE LANG_GERMAN, SUBLANG_DEFAULT
+LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL
IDD_BACKGROUND DIALOGEX DISCARDABLE 0, 0, 246, 228
STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
@@ -9,13 +9,13 @@
150,105,WS_EX_STATICEDGE
CONTROL "",IDC_BACKGROUND_LIST,"SysListView32",LVS_REPORT
|
LVS_SINGLESEL | LVS_NOCOLUMNHEADER |
LVS_SHAREIMAGELISTS |
- WS_BORDER | WS_TABSTOP,7,139,173,71
- LTEXT "Wõhle ein Bild um es als Desktop Hintergrund zu
nutzen:",
+ WS_BORDER | WS_TABSTOP,7,139,170,71
+ LTEXT "Hintergrundbild:",
IDC_STATIC,8,127,180,8
- PUSHBUTTON "&Durchsuchen...",IDC_BROWSE_BUTTON,187,175,50,14
- PUSHBUTTON "&Farbe...",IDC_COLOR_BUTTON,187,195,50,14
- LTEXT "Ausrichtung:",IDC_STATIC,187,138,36,8
- COMBOBOX IDC_PLACEMENT_COMBO,187,148,50,90,CBS_DROPDOWNLIST
|
+ PUSHBUTTON "&Durchsuchen...",IDC_BROWSE_BUTTON,181,175,60,14
+ PUSHBUTTON "&Farbe...",IDC_COLOR_BUTTON,181,195,60,14
+ LTEXT "Ausrichtung:",IDC_STATIC,181,138,45,8
+ COMBOBOX IDC_PLACEMENT_COMBO,181,148,60,90,CBS_DROPDOWNLIST
|
CBS_SORT | WS_VSCROLL | WS_TABSTOP
END
@@ -42,8 +42,20 @@
CAPTION "Einstellungen"
FONT 8, "MS Shell Dlg"
BEGIN
- LTEXT "This space is intentionally left
blank",IDC_STATIC,66,
- 110,112,8
+ LTEXT "&Anzeige:",1820,3,140,30,8
+ LTEXT "<kein>",IDC_SETTINGS_DEVICE,9,149,224,8
+ GROUPBOX "Bi&ldschirmaufl÷sung",1818,3,160,115,43
+ CONTROL
"",IDC_SETTINGS_RESOLUTION,"msctls_trackbar32",TBS_AUTOTICKS |
WS_TABSTOP,
+ 32,170,60,17
+ LTEXT "Niedrig",1815,9,170,25,8,NOT WS_GROUP
+ LTEXT "Hoch",1816,93,170,21,8,NOT WS_GROUP
+ LTEXT "",IDC_SETTINGS_RESOLUTION_TEXT,10,190,100,10,NOT
WS_GROUP | SS_CENTER
+ GROUPBOX "&Farbqualitõt",1817,125,160,115,43
+ COMBOBOX IDC_SETTINGS_BPP,131,170,103,80,CBS_DROPDOWNLIST |
CBS_AUTOHSCROLL |
+ WS_VSCROLL | WS_TABSTOP
+ CONTROL "",1813,"Static",SS_BITMAP | SS_CENTERIMAGE |
SS_SUNKEN,
+ 131,188,103,9
+ PUSHBUTTON "&Erweitert",IDC_SETTINGS_ADVANCED,306,205,56,14
END
STRINGTABLE
@@ -56,3 +68,13 @@
IDS_STRETCH "Gestreckt"
IDS_TILE "Nebeneinander"
END
+
+STRINGTABLE DISCARDABLE
+BEGIN
+ IDS_COLOR_4BIT "16 Farben"
+ IDS_COLOR_8BIT "256 Farben"
+ IDS_COLOR_16BIT "High Color (16 Bit)"
+ IDS_COLOR_32BIT "True Color (24 Bit)"
+ IDS_COLOR_32BIT "True Color (32 Bit)"
+ IDS_PIXEL "%lux%lu Pixel"
+END
_____
Modified: trunk/reactos/lib/cpl/desk/en.rc
--- trunk/reactos/lib/cpl/desk/en.rc 2005-03-22 19:32:17 UTC (rev
14270)
+++ trunk/reactos/lib/cpl/desk/en.rc 2005-03-22 20:16:41 UTC (rev
14271)
@@ -1,4 +1,4 @@
-LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
+LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL
IDD_BACKGROUND DIALOGEX DISCARDABLE 0, 0, 246, 228
STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
@@ -49,7 +49,7 @@
30,170,58,17
LTEXT "Less",1815,9,170,15,8,NOT WS_GROUP
LTEXT "More",1816,93,170,21,8,NOT WS_GROUP
- LTEXT "",IDC_SETTINGS_RESOLUTION_TEXT,10,190,100,10,NOT
WS_GROUP
+ LTEXT "",IDC_SETTINGS_RESOLUTION_TEXT,10,190,100,10,NOT
WS_GROUP | SS_CENTER
GROUPBOX "&Colors",1817,125,160,115,43
COMBOBOX IDC_SETTINGS_BPP,131,170,103,80,CBS_DROPDOWNLIST |
CBS_AUTOHSCROLL |
WS_VSCROLL | WS_TABSTOP
@@ -69,3 +69,12 @@
IDS_TILE "Tile"
END
+STRINGTABLE DISCARDABLE
+BEGIN
+ IDS_COLOR_4BIT "16 Colors"
+ IDS_COLOR_8BIT "256 Colors"
+ IDS_COLOR_16BIT "High Color (16 Bit)"
+ IDS_COLOR_32BIT "True Color (24 Bit)"
+ IDS_COLOR_32BIT "True Color (32 Bit)"
+ IDS_PIXEL "%lux%lu Pixel"
+END
_____
Modified: trunk/reactos/lib/cpl/desk/resource.h
--- trunk/reactos/lib/cpl/desk/resource.h 2005-03-22 19:32:17 UTC
(rev 14270)
+++ trunk/reactos/lib/cpl/desk/resource.h 2005-03-22 20:16:41 UTC
(rev 14271)
@@ -42,5 +42,14 @@
#define IDC_SETTINGS_RESOLUTION_TEXT 204
#define IDC_SETTINGS_ADVANCED 205
+/* Settings Page */
+
+#define IDS_PIXEL 2301
+
+#define IDS_COLOR_4BIT 2904
+#define IDS_COLOR_8BIT 2908
+#define IDS_COLOR_16BIT 2916
+#define IDS_COLOR_32BIT 2932
+
#endif /* __CPL_DESK_RESOURCE_H__ */
_____
Modified: trunk/reactos/lib/cpl/desk/settings.c
--- trunk/reactos/lib/cpl/desk/settings.c 2005-03-22 19:32:17 UTC
(rev 14270)
+++ trunk/reactos/lib/cpl/desk/settings.c 2005-03-22 20:16:41 UTC
(rev 14271)
@@ -13,8 +13,10 @@
#include <commctrl.h>
#include <stdio.h>
#include <tchar.h>
+#include <cpl.h>
#include "resource.h"
+#include "desk.h"
/* As slider control can't contain user data, we have to keep an
* array of RESOLUTION_INFO to have our own associated data.
@@ -54,9 +56,11 @@
UpdateDisplay(IN HWND hwndDlg)
{
TCHAR Buffer[64];
+ TCHAR Pixel[64];
DWORD index;
- _stprintf(Buffer, TEXT("%lux%lu"),
CurrentDisplayDevice->CurrentSettings->dmPelsWidth,
CurrentDisplayDevice->CurrentSettings->dmPelsHeight);
+ LoadString(hApplet, IDS_PIXEL, Pixel, sizeof(Pixel) /
sizeof(TCHAR));
+ _stprintf(Buffer, Pixel,
CurrentDisplayDevice->CurrentSettings->dmPelsWidth,
CurrentDisplayDevice->CurrentSettings->dmPelsHeight, Pixel);
SendDlgItemMessage(hwndDlg, IDC_SETTINGS_RESOLUTION_TEXT,
WM_SETTEXT, 0, (LPARAM)Buffer);
for (index = 0; index < CurrentDisplayDevice->ResolutionsCount;
index++)
@@ -66,8 +70,8 @@
SendDlgItemMessage(hwndDlg,
IDC_SETTINGS_RESOLUTION, TBM_SETPOS, TRUE, index);
break;
}
- _stprintf(Buffer, TEXT("%d bits"),
CurrentDisplayDevice->CurrentSettings->dmBitsPerPel);
- SendDlgItemMessage(hwndDlg, IDC_SETTINGS_BPP, CB_SELECTSTRING,
-1, (LPARAM)Buffer);
+ if (LoadString(hApplet, (2900 +
CurrentDisplayDevice->CurrentSettings->dmBitsPerPel), Buffer,
sizeof(Buffer) / sizeof(TCHAR)))
+ SendDlgItemMessage(hwndDlg, IDC_SETTINGS_BPP,
CB_SELECTSTRING, -1, (LPARAM)Buffer);
}
static PSETTINGS_ENTRY
@@ -94,8 +98,16 @@
/* List all settings */
devmode.dmSize = (WORD)sizeof(DEVMODE);
devmode.dmDriverExtra = 0;
- while (EnumDisplaySettingsEx(DeviceName, NbSettings, &devmode,
dwFlags))
+ while (EnumDisplaySettingsEx(DeviceName, iMode, &devmode,
dwFlags))
{
+
+ if (devmode.dmPelsWidth < 640 ||
+ devmode.dmPelsHeight < 480)
+ {
+ iMode++;
+ continue;
+ }
+
Current = HeapAlloc(GetProcessHeap(), 0,
sizeof(SETTINGS_ENTRY));
if (Current != NULL)
{
@@ -225,12 +237,14 @@
for (Current = pDeviceEntry->Settings; Current != NULL; Current
= Current->Flink)
{
TCHAR Buffer[64];
- _stprintf(Buffer, TEXT("%d bits"),
Current->dmBitsPerPel);
- index = SendDlgItemMessage(hwndDlg, IDC_SETTINGS_BPP,
CB_FINDSTRINGEXACT, (WPARAM)-1, (LPARAM)Buffer);
- if (index == CB_ERR)
+ if (LoadString(hApplet, (2900 + Current->dmBitsPerPel),
Buffer, sizeof(Buffer) / sizeof(TCHAR)))
{
- index = SendDlgItemMessage(hwndDlg,
IDC_SETTINGS_BPP, CB_ADDSTRING, 0, (LPARAM)Buffer);
- SendDlgItemMessage(hwndDlg, IDC_SETTINGS_BPP,
CB_SETITEMDATA, index, Current->dmBitsPerPel);
+ index = SendDlgItemMessage(hwndDlg,
IDC_SETTINGS_BPP, CB_FINDSTRINGEXACT, (WPARAM)-1, (LPARAM)Buffer);
+ if (index == CB_ERR)
+ {
+ index = SendDlgItemMessage(hwndDlg,
IDC_SETTINGS_BPP, CB_ADDSTRING, 0, (LPARAM)Buffer);
+ SendDlgItemMessage(hwndDlg,
IDC_SETTINGS_BPP, CB_SETITEMDATA, index, Current->dmBitsPerPel);
+ }
}
}