Commit 96653ca6 authored by Alexander Nicolaysen Sørnes's avatar Alexander Nicolaysen Sørnes Committed by Alexandre Julliard

regedit: Add Export option to context menu.

parent 47b49601
......@@ -175,6 +175,7 @@ BEGIN
MENUITEM "&Delete\tDel", ID_EDIT_DELETE
MENUITEM "&Rename\tF2", ID_EDIT_RENAME
MENUITEM SEPARATOR
MENUITEM "&Export . . .", ID_EDIT_EXPORT
MENUITEM "&Copy Key Name", ID_EDIT_COPYKEYNAME
MENUITEM SEPARATOR
MENUITEM "&Find\tCtrl+F", ID_EDIT_FIND, GRAYED
......
......@@ -106,6 +106,7 @@ BEGIN
MENUITEM "&Slett\tDel", ID_EDIT_DELETE
MENUITEM "&Gi nytt navn\tF2", ID_EDIT_RENAME
MENUITEM SEPARATOR
MENUITEM "&Eksporter . . .", ID_EDIT_EXPORT
MENUITEM "&Kopier nkkelnavn", ID_EDIT_COPYKEYNAME
MENUITEM SEPARATOR
MENUITEM "&Finn\tCtrl+F", ID_EDIT_FIND, GRAYED
......
......@@ -277,7 +277,7 @@ static UINT CALLBACK ExportRegistryFile_OFNHookProc(HWND hdlg, UINT uiMsg, WPARA
path = GetItemFullPath(g_pChildWnd->hTreeWnd, NULL, FALSE);
SendDlgItemMessage(hdlg, IDC_EXPORT_PATH, WM_SETTEXT, 0, (LPARAM)path);
HeapFree(GetProcessHeap(), 0, path);
CheckRadioButton(hdlg, IDC_EXPORT_ALL, IDC_EXPORT_SELECTED, IDC_EXPORT_ALL);
CheckRadioButton(hdlg, IDC_EXPORT_ALL, IDC_EXPORT_SELECTED, pOpenFileName->lCustData ? IDC_EXPORT_SELECTED : IDC_EXPORT_ALL);
break;
case CDN_FILEOK:
ExportRegistryFile_StoreSelection(hdlg, pOpenFileName);
......@@ -332,7 +332,7 @@ static BOOL ImportRegistryFile(HWND hWnd)
}
static BOOL ExportRegistryFile(HWND hWnd)
static BOOL ExportRegistryFile(HWND hWnd, BOOL export_branch)
{
OPENFILENAME ofn;
TCHAR ExportKeyPath[_MAX_PATH];
......@@ -342,7 +342,7 @@ static BOOL ExportRegistryFile(HWND hWnd)
InitOpenFileName(hWnd, &ofn);
LoadString(hInst, IDS_FILEDIALOG_EXPORT_TITLE, title, COUNT_OF(title));
ofn.lpstrTitle = title;
ofn.lCustData = 0;
ofn.lCustData = export_branch;
ofn.Flags = OFN_ENABLETEMPLATE | OFN_ENABLEHOOK | OFN_EXPLORER | OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT;
ofn.lpfnHook = ExportRegistryFile_OFNHookProc;
ofn.lpTemplateName = MAKEINTRESOURCE(IDD_EXPORT_TEMPLATE);
......@@ -635,8 +635,11 @@ static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
case ID_REGISTRY_IMPORTREGISTRYFILE:
ImportRegistryFile(hWnd);
break;
case ID_EDIT_EXPORT:
ExportRegistryFile(hWnd, TRUE);
break;
case ID_REGISTRY_EXPORTREGISTRYFILE:
ExportRegistryFile(hWnd);
ExportRegistryFile(hWnd, FALSE);
break;
case ID_REGISTRY_CONNECTNETWORKREGISTRY:
break;
......
......@@ -133,6 +133,7 @@
#define ID_FAVORITE_FIRST 33000
#define ID_FAVORITE_LAST 33099
#define ID_EDIT_NEW_MULTI_STRINGVALUE 33100
#define ID_EDIT_EXPORT 33101
#define IDD_EDIT_STRING 2000
#define IDC_VALUE_NAME 2001
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment