8 modified files
reactos/subsys/system/regedit
diff -u -r1.7 -r1.8
--- En.rc 20 Jun 2004 12:21:47 -0000 1.7
+++ En.rc 21 Jun 2004 07:48:11 -0000 1.8
@@ -260,6 +260,27 @@
IDS_MULTI_SZ_EMPTY_STRING "Data of type REG_MULTI_SZ cannot contain empty strings.\nThe empty strings have been removed from the list."
END
+STRINGTABLE DISCARDABLE
+BEGIN
+ IDS_BINARY_EMPTY "(zero-length binary value)"
+ IDS_DEFAULT_VALUE_NAME "(Default)"
+ IDS_VALUE_NOT_SET "(value not set)"
+ IDS_UNKNOWN_TYPE "Unknown type: (0x%lx)"
+ IDS_MY_COMPUTER "My Computer"
+ IDS_IMPORT_REG_FILE "Import Registry File"
+ IDS_EXPORT_REG_FILE "Export Registry File"
+END
+
+STRINGTABLE DISCARDABLE
+BEGIN
+ IDS_FLT_REGFILES "Registration Files"
+ IDS_FLT_REGFILES_FLT "*.reg"
+ IDS_FLT_REGEDIT4 "Win9x/NT4 Registration Files (REGEDIT4)"
+ IDS_FLT_REGEDIT4_FLT "*.reg"
+ IDS_FLT_ALLFILES "All Files (*.*)"
+ IDS_FLT_ALLFILES_FLT "*.*"
+END
+
/*****************************************************************/
reactos/subsys/system/regedit
diff -u -r1.2 -r1.3
--- about.c 1 Jan 2004 15:12:11 -0000 1.2
+++ about.c 21 Jun 2004 07:48:11 -0000 1.3
@@ -31,5 +31,7 @@
void ShowAboutBox(HWND hWnd)
{
- ShellAbout(hWnd, _T("Registry Explorer"), _T(""), LoadIcon(hInst, MAKEINTRESOURCE(IDI_REGEDIT)));
+ TCHAR AppStr[255];
+ LoadString(hInst, IDS_APP_TITLE, AppStr, sizeof(AppStr)/sizeof(TCHAR));
+ ShellAbout(hWnd, AppStr, _T(""), LoadIcon(hInst, MAKEINTRESOURCE(IDI_REGEDIT)));
}
reactos/subsys/system/regedit
diff -u -r1.7 -r1.8
--- childwnd.c 20 Jun 2004 02:22:44 -0000 1.7
+++ childwnd.c 21 Jun 2004 07:48:11 -0000 1.8
@@ -134,15 +134,21 @@
switch (message) {
case WM_CREATE:
- g_pChildWnd = pChildWnd = HeapAlloc(GetProcessHeap(), 0, sizeof(ChildWnd));
+ {
+ TCHAR buffer[MAX_PATH];
+ /* load "My Computer" string */
+ LoadString(hInst, IDS_MY_COMPUTER, buffer, sizeof(buffer)/sizeof(TCHAR));
+
+ g_pChildWnd = pChildWnd = HeapAlloc(GetProcessHeap(), 0, sizeof(ChildWnd));
if (!pChildWnd) return 0;
- _tcsncpy(pChildWnd->szPath, _T("My Computer"), MAX_PATH);
+ _tcsncpy(pChildWnd->szPath, buffer, MAX_PATH);
pChildWnd->nSplitPos = 250;
pChildWnd->hWnd = hWnd;
pChildWnd->hTreeWnd = CreateTreeView(hWnd, pChildWnd->szPath, TREE_WINDOW);
pChildWnd->hListWnd = CreateListView(hWnd, LIST_WINDOW/*, pChildWnd->szPath*/);
SetFocus(pChildWnd->hTreeWnd);
break;
+ }
case WM_COMMAND:
if (!_CmdWndProc(hWnd, message, wParam, lParam)) {
goto def;
reactos/subsys/system/regedit
diff -u -r1.11 -r1.12
--- edit.c 20 Jun 2004 19:26:59 -0000 1.11
+++ edit.c 21 Jun 2004 07:48:11 -0000 1.12
@@ -111,7 +111,9 @@
}
else
{
- SetDlgItemText(hwndDlg, IDC_VALUE_NAME, _T("(Default)"));
+ TCHAR buffer[255];
+ LoadString(hInst, IDS_DEFAULT_VALUE_NAME, buffer, sizeof(buffer)/sizeof(TCHAR));
+ SetDlgItemText(hwndDlg, IDC_VALUE_NAME, buffer);
}
SetDlgItemText(hwndDlg, IDC_VALUE_DATA, stringValueData);
SetFocus(GetDlgItem(hwndDlg, IDC_VALUE_DATA));
@@ -174,7 +176,9 @@
}
else
{
- SetDlgItemText(hwndDlg, IDC_VALUE_NAME, _T("(Default)"));
+ TCHAR buffer[255];
+ LoadString(hInst, IDS_DEFAULT_VALUE_NAME, buffer, sizeof(buffer)/sizeof(TCHAR));
+ SetDlgItemText(hwndDlg, IDC_VALUE_NAME, buffer);
}
SetDlgItemText(hwndDlg, IDC_VALUE_DATA, stringValueData);
SetFocus(GetDlgItem(hwndDlg, IDC_VALUE_DATA));
@@ -291,7 +295,9 @@
}
else
{
- SetDlgItemText(hwndDlg, IDC_VALUE_NAME, _T("(Default)"));
+ TCHAR buffer[255];
+ LoadString(hInst, IDS_DEFAULT_VALUE_NAME, buffer, sizeof(buffer)/sizeof(TCHAR));
+ SetDlgItemText(hwndDlg, IDC_VALUE_NAME, buffer);
}
CheckRadioButton (hwndDlg, IDC_FORMAT_HEX, IDC_FORMAT_DEC, IDC_FORMAT_HEX);
_stprintf (ValueString, _T("%lx"), dwordValueData);
@@ -404,7 +410,9 @@
}
else
{
- SetDlgItemText(hwndDlg, IDC_VALUE_NAME, _T("(Default)"));
+ TCHAR buffer[255];
+ LoadString(hInst, IDS_DEFAULT_VALUE_NAME, buffer, sizeof(buffer)/sizeof(TCHAR));
+ SetDlgItemText(hwndDlg, IDC_VALUE_NAME, buffer);
}
hwndValue = GetDlgItem(hwndDlg, IDC_VALUE_DATA);
HexEdit_LoadBuffer(hwndValue, binValueData, valueDataLen);
reactos/subsys/system/regedit
diff -u -r1.6 -r1.7
--- framewnd.c 20 Jun 2004 02:22:44 -0000 1.6
+++ framewnd.c 21 Jun 2004 07:48:11 -0000 1.7
@@ -207,14 +207,48 @@
TCHAR FileNameBuffer[_MAX_PATH];
TCHAR FileTitleBuffer[_MAX_PATH];
+typedef struct
+{
+ UINT DisplayID;
+ UINT FilterID;
+} FILTERPAIR, *PFILTERPAIR;
+
+void
+BuildFilterStrings(TCHAR *Filter, PFILTERPAIR Pairs, int PairCount)
+{
+ int i, c;
+
+ c = 0;
+ for(i = 0; i < PairCount; i++)
+ {
+ c += LoadString(hInst, Pairs[i].DisplayID, &Filter[c], 255 * sizeof(TCHAR));
+ Filter[++c] = '\0';
+ c += LoadString(hInst, Pairs[i].FilterID, &Filter[c], 255 * sizeof(TCHAR));
+ Filter[++c] = '\0';
+ }
+ Filter[++c] = '\0';
+}
+
static BOOL InitOpenFileName(HWND hWnd, OPENFILENAME* pofn)
{
+ FILTERPAIR FilterPairs[3];
+ static TCHAR Filter[1024];
+
memset(pofn, 0, sizeof(OPENFILENAME));
pofn->lStructSize = sizeof(OPENFILENAME);
pofn->hwndOwner = hWnd;
pofn->hInstance = hInst;
-
- pofn->lpstrFilter = _T("Registration Files\0*.reg\0Win9x/NT4 Registration Files (REGEDIT4)\0*.reg\0All Files (*.*)\0*.*\0\0");
+
+ /* create filter string */
+ FilterPairs[0].DisplayID = IDS_FLT_REGFILES;
+ FilterPairs[0].FilterID = IDS_FLT_REGFILES_FLT;
+ FilterPairs[1].DisplayID = IDS_FLT_REGEDIT4;
+ FilterPairs[1].FilterID = IDS_FLT_REGEDIT4_FLT;
+ FilterPairs[2].DisplayID = IDS_FLT_ALLFILES;
+ FilterPairs[2].FilterID = IDS_FLT_ALLFILES_FLT;
+ BuildFilterStrings(Filter, FilterPairs, sizeof(FilterPairs) / sizeof(FILTERPAIR));
+
+ pofn->lpstrFilter = Filter;
pofn->lpstrCustomFilter = CustomFilterBuffer;
pofn->nMaxCustFilter = MAX_CUSTOM_FILTER_SIZE;
pofn->nFilterIndex = 0;
@@ -240,9 +274,11 @@
static BOOL ImportRegistryFile(HWND hWnd)
{
OPENFILENAME ofn;
+ TCHAR Caption[128];
InitOpenFileName(hWnd, &ofn);
- ofn.lpstrTitle = _T("Import Registry File");
+ LoadString(hInst, IDS_IMPORT_REG_FILE, Caption, sizeof(Caption)/sizeof(TCHAR));
+ ofn.lpstrTitle = Caption;
/* ofn.lCustData = ;*/
if (GetOpenFileName(&ofn)) {
/* FIXME - convert to ascii */
@@ -279,10 +315,12 @@
{
OPENFILENAME ofn;
TCHAR ExportKeyPath[_MAX_PATH];
+ TCHAR Caption[128];
ExportKeyPath[0] = _T('\0');
InitOpenFileName(hWnd, &ofn);
- ofn.lpstrTitle = _T("Export Registry File");
+ LoadString(hInst, IDS_EXPORT_REG_FILE, Caption, sizeof(Caption)/sizeof(TCHAR));
+ ofn.lpstrTitle = Caption;
/* ofn.lCustData = ;*/
ofn.Flags = OFN_ENABLETEMPLATE + OFN_EXPLORER;
ofn.lpfnHook = ImportRegistryFile_OFNHookProc;
@@ -557,7 +595,7 @@
{
switch (message) {
case WM_CREATE:
- CreateWindowEx(0, szChildClass, _T("regedit child window"), WS_CHILD | WS_VISIBLE,
+ CreateWindowEx(0, szChildClass, NULL, WS_CHILD | WS_VISIBLE,
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
hWnd, (HMENU)0, hInst, 0);
break;
reactos/subsys/system/regedit
diff -u -r1.11 -r1.12
--- listview.c 20 Jun 2004 02:22:44 -0000 1.11
+++ listview.c 21 Jun 2004 07:48:11 -0000 1.12
@@ -201,21 +201,30 @@
}
/* lpsRes = convertHexToDWORDStr(lpbData, dwLen); */
break;
- case REG_NONE:
- case REG_BINARY: {
+ default:
+ {
unsigned int i;
LPBYTE pData = (LPBYTE)ValBuf;
- LPTSTR strBinary = HeapAlloc(GetProcessHeap(), 0, dwCount * sizeof(TCHAR) * 3 + 1);
- for (i = 0; i < dwCount; i++)
- wsprintf( strBinary + i*3, _T("%02X "), pData[i] );
- strBinary[dwCount * 3] = 0;
- ListView_SetItemText(hwndLV, index, 2, strBinary);
- HeapFree(GetProcessHeap(), 0, strBinary);
+ LPTSTR strBinary;
+ if(dwCount > 0)
+ {
+ strBinary = HeapAlloc(GetProcessHeap(), 0, (dwCount * sizeof(TCHAR) * 3) + 1);
+ for (i = 0; i < dwCount; i++)
+ {
+ wsprintf( strBinary + i*3, _T("%02X "), pData[i] );
+ }
+ strBinary[dwCount * 3] = 0;
+ ListView_SetItemText(hwndLV, index, 2, strBinary);
+ HeapFree(GetProcessHeap(), 0, strBinary);
+ }
+ else
+ {
+ TCHAR szText[128];
+ LoadString(hInst, IDS_BINARY_EMPTY, szText, sizeof(szText)/sizeof(TCHAR));
+ ListView_SetItemText(hwndLV, index, 2, szText);
+ }
}
break;
- default:
- ListView_SetItemText(hwndLV, index, 2, _T("(value)"));
- break;
}
}
}
@@ -281,7 +290,8 @@
switch (plvdi->item.iSubItem) {
case 0:
- plvdi->item.pszText = _T("(Default)");
+ LoadString(hInst, IDS_DEFAULT_VALUE_NAME, buffer, sizeof(buffer)/sizeof(TCHAR));
+ plvdi->item.pszText = buffer;
break;
case 1:
switch (((LINE_INFO*)plvdi->item.lParam)->dwValType) {
@@ -318,14 +328,18 @@
case REG_NONE:
plvdi->item.pszText = _T("REG_NONE");
break;
- default:
- wsprintf(buffer, _T("unknown(0x%lx)"), ((LINE_INFO*)plvdi->item.lParam)->dwValType);
+ default: {
+ TCHAR buf2[200];
+ LoadString(hInst, IDS_UNKNOWN_TYPE, buf2, sizeof(buf2)/sizeof(TCHAR));
+ wsprintf(buffer, buf2, ((LINE_INFO*)plvdi->item.lParam)->dwValType);
plvdi->item.pszText = buffer;
break;
+ }
}
break;
case 2:
- plvdi->item.pszText = _T("(value not set)");
+ LoadString(hInst, IDS_VALUE_NOT_SET, buffer, sizeof(buffer)/sizeof(TCHAR));
+ plvdi->item.pszText = buffer;
break;
case 3:
plvdi->item.pszText = _T("");
reactos/subsys/system/regedit
diff -u -r1.6 -r1.7
--- resource.h 20 Jun 2004 12:21:47 -0000 1.6
+++ resource.h 21 Jun 2004 07:48:11 -0000 1.7
@@ -111,6 +111,20 @@
#define ID_EDIT_MODIFY_BIN 32840
#define IDS_WARNING 32841
#define IDS_MULTI_SZ_EMPTY_STRING 32842
+#define IDS_BINARY_EMPTY 32843
+#define IDS_DEFAULT_VALUE_NAME 32844
+#define IDS_VALUE_NOT_SET 32845
+#define IDS_UNKNOWN_TYPE 32846
+#define IDS_MY_COMPUTER 32847
+#define IDS_IMPORT_REG_FILE 32848
+#define IDS_EXPORT_REG_FILE 32849
+
+#define IDS_FLT_REGFILES 31001
+#define IDS_FLT_REGFILES_FLT 31002
+#define IDS_FLT_REGEDIT4 31003
+#define IDS_FLT_REGEDIT4_FLT 31004
+#define IDS_FLT_ALLFILES 31005
+#define IDS_FLT_ALLFILES_FLT 31006
#define IDD_EDIT_STRING 2000
#define IDC_VALUE_NAME 2001
reactos/subsys/system/regedit
diff -u -r1.6 -r1.7
--- treeview.c 20 Jun 2004 02:22:44 -0000 1.6
+++ treeview.c 21 Jun 2004 07:48:11 -0000 1.7
@@ -267,7 +267,7 @@
/* Get the dimensions of the parent window's client area, and create the tree view control. */
GetClientRect(hwndParent, &rcClient);
- hwndTV = CreateWindowEx(WS_EX_CLIENTEDGE, WC_TREEVIEW, _T("Tree View"),
+ hwndTV = CreateWindowEx(WS_EX_CLIENTEDGE, WC_TREEVIEW, NULL,
WS_VISIBLE | WS_CHILD | WS_TABSTOP | TVS_HASLINES | TVS_HASBUTTONS | TVS_LINESATROOT,
0, 0, rcClient.right, rcClient.bottom,
hwndParent, (HMENU)id, hInst, NULL);
CVSspam 0.2.8