Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
1ee7095e
Commit
1ee7095e
authored
Aug 23, 2006
by
Mikołaj Zalewski
Committed by
Alexandre Julliard
Aug 23, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
regedit: Put language-dependent strings in resources.
parent
798a54f9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
74 additions
and
16 deletions
+74
-16
En.rc
programs/regedit/En.rc
+16
-0
Pl.rc
programs/regedit/Pl.rc
+16
-0
about.c
programs/regedit/about.c
+3
-1
childwnd.c
programs/regedit/childwnd.c
+1
-1
framewnd.c
programs/regedit/framewnd.c
+11
-4
listview.c
programs/regedit/listview.c
+16
-8
main.c
programs/regedit/main.c
+2
-1
main.h
programs/regedit/main.h
+1
-1
resource.h
programs/regedit/resource.h
+8
-0
No files found.
programs/regedit/En.rc
View file @
1ee7095e
...
...
@@ -363,6 +363,22 @@ BEGIN
IDS_NOTFOUND "Search string '%s' not found"
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_FILEDIALOG_IMPORT_TITLE "Import Registry File"
IDS_FILEDIALOG_EXPORT_TITLE "Export Registry File"
IDS_FILEDIALOG_FILTER "Registration Files\0*.reg\0Win9x/NT4 Registration Files (REGEDIT4)\0*.reg\0All Files (*.*)\0*.*\0\0"
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_REGISTRY_ROOT_NAME "My Computer"
IDS_REGISTRY_DEFAULT_VALUE "(Default)"
IDS_REGISTRY_VALUE_NOT_SET "(value not set)"
IDS_REGISTRY_VALUE_CANT_DISPLAY "(cannot display value)"
IDS_REGISTRY_UNKNOWN_TYPE "(unknown %d)"
END
/*****************************************************************/
...
...
programs/regedit/Pl.rc
View file @
1ee7095e
...
...
@@ -282,6 +282,22 @@ BEGIN
IDS_NOTFOUND "Nie udao si wyszuka cigu '%s'"
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_FILEDIALOG_IMPORT_TITLE "Importuj plik rejestrw"
IDS_FILEDIALOG_EXPORT_TITLE "Eksportuj plik rejestrw"
IDS_FILEDIALOG_FILTER "Pliki rejestrw\0*.reg\0Pliki rejestrw Win9x/NT4 (REGEDIT4)\0*.reg\0Wszystkie pliki (*.*)\0*.*\0\0"
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_REGISTRY_ROOT_NAME "Mj komputer"
IDS_REGISTRY_DEFAULT_VALUE "(Domylna)"
IDS_REGISTRY_VALUE_NOT_SET "(warto nie ustalona)"
IDS_REGISTRY_VALUE_CANT_DISPLAY "(nie mog wywietli wartoci)"
IDS_REGISTRY_UNKNOWN_TYPE "(nieznany: %d)"
END
/*****************************************************************/
...
...
programs/regedit/about.c
View file @
1ee7095e
...
...
@@ -28,5 +28,7 @@
void
ShowAboutBox
(
HWND
hWnd
)
{
ShellAbout
(
hWnd
,
_T
(
"Registry Editor"
),
_T
(
""
),
LoadIcon
(
hInst
,
MAKEINTRESOURCE
(
IDI_REGEDIT
)));
TCHAR
title
[
64
];
LoadString
(
hInst
,
IDS_APP_TITLE
,
title
,
COUNT_OF
(
title
));
ShellAbout
(
hWnd
,
title
,
_T
(
""
),
LoadIcon
(
hInst
,
MAKEINTRESOURCE
(
IDI_REGEDIT
)));
}
programs/regedit/childwnd.c
View file @
1ee7095e
...
...
@@ -211,7 +211,7 @@ LRESULT CALLBACK ChildWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa
case
WM_CREATE
:
g_pChildWnd
=
pChildWnd
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
ChildWnd
));
if
(
!
pChildWnd
)
return
0
;
_tcsncpy
(
pChildWnd
->
szPath
,
_T
(
"My Computer"
)
,
MAX_PATH
);
LoadString
(
hInst
,
IDS_REGISTRY_ROOT_NAME
,
pChildWnd
->
szPath
,
MAX_PATH
);
pChildWnd
->
nSplitPos
=
250
;
pChildWnd
->
hWnd
=
hWnd
;
pChildWnd
->
hTreeWnd
=
CreateTreeView
(
hWnd
,
pChildWnd
->
szPath
,
TREE_WINDOW
);
...
...
programs/regedit/framewnd.c
View file @
1ee7095e
...
...
@@ -260,15 +260,18 @@ static UINT_PTR CALLBACK ImportRegistryFile_OFNHookProc(HWND hdlg, UINT uiMsg, W
TCHAR
FileNameBuffer
[
_MAX_PATH
];
TCHAR
FileTitleBuffer
[
_MAX_PATH
];
TCHAR
FilterBuffer
[
_MAX_PATH
];
static
BOOL
InitOpenFileName
(
HWND
hWnd
,
OPENFILENAME
*
pofn
)
static
BOOL
InitOpenFileName
(
HWND
hWnd
,
OPENFILENAME
*
pofn
)
{
memset
(
pofn
,
0
,
sizeof
(
OPENFILENAME
));
pofn
->
lStructSize
=
sizeof
(
OPENFILENAME
);
pofn
->
hwndOwner
=
hWnd
;
pofn
->
hInstance
=
hInst
;
pofn
->
lpstrFilter
=
_T
(
"Registration Files
\0
*.reg
\0
Win9x/NT4 Registration Files (REGEDIT4)
\0
*.reg
\0
All Files (*.*)
\0
*.*
\0\0
"
);
if
(
FilterBuffer
[
0
]
==
0
)
LoadString
(
hInst
,
IDS_FILEDIALOG_FILTER
,
FilterBuffer
,
_MAX_PATH
);
pofn
->
lpstrFilter
=
FilterBuffer
;
pofn
->
nFilterIndex
=
1
;
pofn
->
lpstrFile
=
FileNameBuffer
;
pofn
->
nMaxFile
=
_MAX_PATH
;
...
...
@@ -292,9 +295,11 @@ static BOOL InitOpenFileName(HWND hWnd, OPENFILENAME* pofn)
static
BOOL
ImportRegistryFile
(
HWND
hWnd
)
{
OPENFILENAME
ofn
;
TCHAR
title
[
128
];
InitOpenFileName
(
hWnd
,
&
ofn
);
ofn
.
lpstrTitle
=
_T
(
"Import Registry File"
);
LoadString
(
hInst
,
IDS_FILEDIALOG_IMPORT_TITLE
,
title
,
COUNT_OF
(
title
));
ofn
.
lpstrTitle
=
title
;
/* ofn.lCustData = ;*/
if
(
GetOpenFileName
(
&
ofn
))
{
if
(
!
import_registry_file
(
ofn
.
lpstrFile
))
{
...
...
@@ -330,10 +335,12 @@ static BOOL ExportRegistryFile(HWND hWnd)
{
OPENFILENAME
ofn
;
TCHAR
ExportKeyPath
[
_MAX_PATH
];
TCHAR
title
[
128
];
ExportKeyPath
[
0
]
=
_T
(
'\0'
);
InitOpenFileName
(
hWnd
,
&
ofn
);
ofn
.
lpstrTitle
=
_T
(
"Export Registry File"
);
LoadString
(
hInst
,
IDS_FILEDIALOG_EXPORT_TITLE
,
title
,
COUNT_OF
(
title
));
ofn
.
lpstrTitle
=
title
;
/* ofn.lCustData = ;*/
ofn
.
Flags
=
OFN_ENABLETEMPLATE
+
OFN_EXPLORER
;
ofn
.
lpfnHook
=
ImportRegistryFile_OFNHookProc
;
...
...
programs/regedit/listview.c
View file @
1ee7095e
...
...
@@ -52,6 +52,7 @@ static BOOL g_invertSort = FALSE;
static
LPTSTR
g_valueName
;
static
LPTSTR
g_currentPath
;
static
HKEY
g_currentRootKey
;
static
TCHAR
g_szValueNotSet
[
64
];
#define MAX_LIST_COLUMNS (IDS_LIST_COLUMN_LAST - IDS_LIST_COLUMN_FIRST + 1)
static
int
default_column_widths
[
MAX_LIST_COLUMNS
]
=
{
200
,
175
,
400
};
...
...
@@ -158,15 +159,13 @@ static void AddEntryToList(HWND hwndLV, LPTSTR Name, DWORD dwValType,
index
=
ListView_InsertItem
(
hwndLV
,
&
item
);
if
(
index
!=
-
1
)
{
/* LPTSTR pszText = NULL; */
static
TCHAR
pszText
[]
=
{
'('
,
'c'
,
'a'
,
'n'
,
'n'
,
'o'
,
't'
,
' '
,
'd'
,
'i'
,
's'
,
'p'
,
'l'
,
'a'
,
'y'
,
' '
,
'v'
,
'a'
,
'l'
,
'u'
,
'e'
,
')'
,
0
};
switch
(
dwValType
)
{
case
REG_SZ
:
case
REG_EXPAND_SZ
:
if
(
ValBuf
)
{
ListView_SetItemText
(
hwndLV
,
index
,
2
,
ValBuf
);
}
else
{
static
TCHAR
textT
[]
=
{
'('
,
'n'
,
'o'
,
't'
,
' '
,
's'
,
'e'
,
't'
,
')'
,
0
};
ListView_SetItemText
(
hwndLV
,
index
,
2
,
textT
);
ListView_SetItemText
(
hwndLV
,
index
,
2
,
g_szValueNotSet
);
}
break
;
case
REG_DWORD
:
{
...
...
@@ -192,9 +191,13 @@ static void AddEntryToList(HWND hwndLV, LPTSTR Name, DWORD dwValType,
ListView_SetItemText
(
hwndLV
,
index
,
2
,
ValBuf
);
break
;
default:
{
/* lpsRes = convertHexToHexCSV(lpbData, dwLen); */
ListView_SetItemText
(
hwndLV
,
index
,
2
,
pszText
);
TCHAR
szText
[
128
];
LoadString
(
hInst
,
IDS_REGISTRY_VALUE_CANT_DISPLAY
,
szText
,
COUNT_OF
(
szText
));
ListView_SetItemText
(
hwndLV
,
index
,
2
,
szText
);
break
;
}
}
}
}
...
...
@@ -263,9 +266,7 @@ static void OnGetDispInfo(NMLVDISPINFO* plvdi)
reg_linkT
[]
=
{
'R'
,
'E'
,
'G'
,
'_'
,
'L'
,
'I'
,
'N'
,
'K'
,
0
},
reg_resource_listT
[]
=
{
'R'
,
'E'
,
'G'
,
'_'
,
'R'
,
'E'
,
'S'
,
'O'
,
'U'
,
'R'
,
'C'
,
'E'
,
'_'
,
'L'
,
'I'
,
'S'
,
'T'
,
0
},
reg_noneT
[]
=
{
'R'
,
'E'
,
'G'
,
'_'
,
'N'
,
'O'
,
'N'
,
'E'
,
0
},
not_setT
[]
=
{
'('
,
'v'
,
'a'
,
'l'
,
'u'
,
'e'
,
' '
,
'n'
,
'o'
,
't'
,
' '
,
's'
,
'e'
,
't'
,
')'
,
0
},
emptyT
[]
=
{
0
};
static
const
TCHAR
unknownT
[]
=
{
'u'
,
'n'
,
'k'
,
'n'
,
'o'
,
'w'
,
'n'
,
'('
,
'%'
,
'd'
,
')'
,
0
};
plvdi
->
item
.
pszText
=
NULL
;
plvdi
->
item
.
cchTextMax
=
0
;
...
...
@@ -304,13 +305,17 @@ static void OnGetDispInfo(NMLVDISPINFO* plvdi)
plvdi
->
item
.
pszText
=
reg_noneT
;
break
;
default:
wsprintf
(
buffer
,
unknownT
,
plvdi
->
item
.
lParam
);
{
TCHAR
szUnknownFmt
[
64
];
LoadString
(
hInst
,
IDS_REGISTRY_UNKNOWN_TYPE
,
szUnknownFmt
,
COUNT_OF
(
szUnknownFmt
));
wsprintf
(
buffer
,
szUnknownFmt
,
plvdi
->
item
.
lParam
);
plvdi
->
item
.
pszText
=
buffer
;
break
;
}
}
break
;
case
2
:
plvdi
->
item
.
pszText
=
not_setT
;
plvdi
->
item
.
pszText
=
g_szValueNotSet
;
break
;
case
3
:
plvdi
->
item
.
pszText
=
emptyT
;
...
...
@@ -459,6 +464,9 @@ HWND CreateListView(HWND hwndParent, int id)
RECT
rcClient
;
HWND
hwndLV
;
/* prepare strings */
LoadString
(
hInst
,
IDS_REGISTRY_VALUE_NOT_SET
,
g_szValueNotSet
,
COUNT_OF
(
g_szValueNotSet
));
/* Get the dimensions of the parent window's client area, and create the list view control. */
GetClientRect
(
hwndParent
,
&
rcClient
);
hwndLV
=
CreateWindowEx
(
WS_EX_CLIENTEDGE
,
WC_LISTVIEW
,
_T
(
"List View"
),
...
...
programs/regedit/main.c
View file @
1ee7095e
...
...
@@ -29,7 +29,7 @@
#define REGEDIT_DECLARE_FUNCTIONS
#include "main.h"
LPCSTR
g_pszDefaultValueName
=
_T
(
"(Default)"
)
;
TCHAR
g_pszDefaultValueName
[
64
]
;
BOOL
ProcessCmdLine
(
LPSTR
lpCmdLine
);
...
...
@@ -172,6 +172,7 @@ int APIENTRY WinMain(HINSTANCE hInstance,
LoadString
(
hInstance
,
IDS_APP_TITLE
,
szTitle
,
COUNT_OF
(
szTitle
));
LoadString
(
hInstance
,
IDC_REGEDIT_FRAME
,
szFrameClass
,
COUNT_OF
(
szFrameClass
));
LoadString
(
hInstance
,
IDC_REGEDIT
,
szChildClass
,
COUNT_OF
(
szChildClass
));
LoadString
(
hInstance
,
IDS_REGISTRY_DEFAULT_VALUE
,
g_pszDefaultValueName
,
COUNT_OF
(
g_pszDefaultValueName
));
/* Store instance handle in our global variable */
hInst
=
hInstance
;
...
...
programs/regedit/main.h
View file @
1ee7095e
...
...
@@ -90,7 +90,7 @@ extern enum OPTION_FLAGS Options;
extern
TCHAR
szTitle
[];
extern
TCHAR
szFrameClass
[];
extern
TCHAR
szChildClass
[];
extern
LPCTSTR
g_pszDefaultValueName
;
extern
TCHAR
g_pszDefaultValueName
[]
;
/* about.c */
extern
void
ShowAboutBox
(
HWND
hWnd
);
...
...
programs/regedit/resource.h
View file @
1ee7095e
...
...
@@ -47,6 +47,14 @@
#define IDD_FIND 135
#define IDI_BIN 136
#define IDR_POPUP_MENUS 137
#define IDS_FILEDIALOG_IMPORT_TITLE 144
#define IDS_FILEDIALOG_EXPORT_TITLE 145
#define IDS_FILEDIALOG_FILTER 146
#define IDS_REGISTRY_ROOT_NAME 160
#define IDS_REGISTRY_DEFAULT_VALUE 161
#define IDS_REGISTRY_VALUE_NOT_SET 162
#define IDS_REGISTRY_VALUE_CANT_DISPLAY 164
#define IDS_REGISTRY_UNKNOWN_TYPE 165
#define IDC_LICENSE_EDIT 1029
#define ID_REGISTRY_EXIT 32770
#define ID_FAVORITES_ADDTOFAVORITES 32772
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment