Author: ilardig Date: Sat May 7 14:53:32 2011 New Revision: 51621
URL: http://svn.reactos.org/svn/reactos?rev=51621&view=rev Log: [regedit] - Prompt before importing from the command line. - Inform the user about successful import from the command line and the menu. - Updated Spanish & Italian translations. See issue #6230 for more details.
Modified: trunk/reactos/base/applications/regedit/framewnd.c trunk/reactos/base/applications/regedit/lang/bg-BG.rc trunk/reactos/base/applications/regedit/lang/cs-CZ.rc trunk/reactos/base/applications/regedit/lang/de-DE.rc trunk/reactos/base/applications/regedit/lang/el-GR.rc trunk/reactos/base/applications/regedit/lang/en-US.rc trunk/reactos/base/applications/regedit/lang/es-ES.rc trunk/reactos/base/applications/regedit/lang/fr-FR.rc trunk/reactos/base/applications/regedit/lang/hu-HU.rc trunk/reactos/base/applications/regedit/lang/id-ID.rc trunk/reactos/base/applications/regedit/lang/it-IT.rc trunk/reactos/base/applications/regedit/lang/ja-JP.rc trunk/reactos/base/applications/regedit/lang/ko-KR.rc trunk/reactos/base/applications/regedit/lang/nl-NL.rc trunk/reactos/base/applications/regedit/lang/no-NO.rc trunk/reactos/base/applications/regedit/lang/pl-PL.rc trunk/reactos/base/applications/regedit/lang/pt-BR.rc trunk/reactos/base/applications/regedit/lang/pt-PT.rc trunk/reactos/base/applications/regedit/lang/ru-RU.rc trunk/reactos/base/applications/regedit/lang/sk-SK.rc trunk/reactos/base/applications/regedit/lang/sl-SI.rc trunk/reactos/base/applications/regedit/lang/sv-SE.rc trunk/reactos/base/applications/regedit/lang/th-TH.rc trunk/reactos/base/applications/regedit/lang/uk-UA.rc trunk/reactos/base/applications/regedit/lang/zh-CN.rc trunk/reactos/base/applications/regedit/regedit.c trunk/reactos/base/applications/regedit/resource.h
Modified: trunk/reactos/base/applications/regedit/framewnd.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/f... ============================================================================== --- trunk/reactos/base/applications/regedit/framewnd.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/regedit/framewnd.c [iso-8859-1] Sat May 7 14:53:32 2011 @@ -393,7 +393,7 @@ static BOOL ImportRegistryFile(HWND hWnd) { OPENFILENAME ofn; - TCHAR Caption[128]; + TCHAR Caption[128], szTitle[256], szText[256]; LPCTSTR pszKeyPath; HKEY hRootKey;
@@ -414,6 +414,10 @@ fclose(fp); return FALSE; } + LoadString(hInst, IDS_APP_TITLE, szTitle, sizeof(szTitle)); + LoadString(hInst, IDS_IMPORTED_OK, szText, sizeof(szTitle)); + /* show successful import */ + MessageBox(NULL, szText, szTitle, MB_OK); fclose(fp); } else
Modified: trunk/reactos/base/applications/regedit/lang/bg-BG.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/l... ============================================================================== --- trunk/reactos/base/applications/regedit/lang/bg-BG.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/regedit/lang/bg-BG.rc [iso-8859-1] Sat May 7 14:53:32 2011 @@ -394,6 +394,12 @@ IDS_FINISHEDFIND "Òúðñåíåòî â ðåãèñòúðà ïðèêëþ÷è." END
+STRINGTABLE DISCARDABLE +BEGIN + IDS_IMPORT_PROMPT "Add the data to the registry?" + IDS_IMPORTED_OK "Information added to the registry" +END + /*****************************************************************/
Modified: trunk/reactos/base/applications/regedit/lang/cs-CZ.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/l... ============================================================================== --- trunk/reactos/base/applications/regedit/lang/cs-CZ.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/regedit/lang/cs-CZ.rc [iso-8859-1] Sat May 7 14:53:32 2011 @@ -391,6 +391,12 @@ IDS_FINISHEDFIND "Prohledávání registru bylo dokonèeno." END
+STRINGTABLE DISCARDABLE +BEGIN + IDS_IMPORT_PROMPT "Add the data to the registry?" + IDS_IMPORTED_OK "Information added to the registry" +END + /*****************************************************************/
Modified: trunk/reactos/base/applications/regedit/lang/de-DE.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/l... ============================================================================== --- trunk/reactos/base/applications/regedit/lang/de-DE.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/regedit/lang/de-DE.rc [iso-8859-1] Sat May 7 14:53:32 2011 @@ -393,6 +393,12 @@ IDS_FINISHEDFIND "Durchsuchen der Registry beendet." END
+STRINGTABLE DISCARDABLE +BEGIN + IDS_IMPORT_PROMPT "Add the data to the registry?" + IDS_IMPORTED_OK "Information added to the registry" +END + /*****************************************************************/
Modified: trunk/reactos/base/applications/regedit/lang/el-GR.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/l... ============================================================================== --- trunk/reactos/base/applications/regedit/lang/el-GR.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/regedit/lang/el-GR.rc [iso-8859-1] Sat May 7 14:53:32 2011 @@ -393,6 +393,12 @@ IDS_FINISHEDFIND "ÔÝëïò áíáæÞôçóçò óôç registry." END
+STRINGTABLE DISCARDABLE +BEGIN + IDS_IMPORT_PROMPT "Add the data to the registry?" + IDS_IMPORTED_OK "Information added to the registry" +END + /*****************************************************************/
Modified: trunk/reactos/base/applications/regedit/lang/en-US.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/l... ============================================================================== --- trunk/reactos/base/applications/regedit/lang/en-US.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/regedit/lang/en-US.rc [iso-8859-1] Sat May 7 14:53:32 2011 @@ -381,6 +381,12 @@ IDS_FINISHEDFIND "Finished searching through the registry." END
+STRINGTABLE DISCARDABLE +BEGIN + IDS_IMPORT_PROMPT "Add the data the registry?" + IDS_IMPORTED_OK "Information added to the registry" +END + /*****************************************************************/
Modified: trunk/reactos/base/applications/regedit/lang/es-ES.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/l... ============================================================================== --- trunk/reactos/base/applications/regedit/lang/es-ES.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/regedit/lang/es-ES.rc [iso-8859-1] Sat May 7 14:53:32 2011 @@ -396,6 +396,12 @@ IDS_FINISHEDFIND "Finalizado la busqueda del registro." END
+STRINGTABLE DISCARDABLE +BEGIN + IDS_IMPORT_PROMPT "Agregar los datos al registro?" + IDS_IMPORTED_OK "La información ha sido agregada al registro" +END + /*****************************************************************/
Modified: trunk/reactos/base/applications/regedit/lang/fr-FR.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/l... ============================================================================== --- trunk/reactos/base/applications/regedit/lang/fr-FR.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/regedit/lang/fr-FR.rc [iso-8859-1] Sat May 7 14:53:32 2011 @@ -396,6 +396,12 @@ IDS_FINISHEDFIND "Recherche dans le registre terminée." END
+STRINGTABLE DISCARDABLE +BEGIN + IDS_IMPORT_PROMPT "Add the data to the registry?" + IDS_IMPORTED_OK "Information added to the registry" +END + /*****************************************************************/
Modified: trunk/reactos/base/applications/regedit/lang/hu-HU.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/l... ============================================================================== --- trunk/reactos/base/applications/regedit/lang/hu-HU.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/regedit/lang/hu-HU.rc [iso-8859-1] Sat May 7 14:53:32 2011 @@ -394,6 +394,12 @@ IDS_FINISHEDFIND "Finished searching through the registry." END
+STRINGTABLE DISCARDABLE +BEGIN + IDS_IMPORT_PROMPT "Add the data to the registry?" + IDS_IMPORTED_OK "Information added to the registry" +END + /*****************************************************************/
Modified: trunk/reactos/base/applications/regedit/lang/id-ID.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/l... ============================================================================== --- trunk/reactos/base/applications/regedit/lang/id-ID.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/regedit/lang/id-ID.rc [iso-8859-1] Sat May 7 14:53:32 2011 @@ -393,6 +393,12 @@ IDS_FINISHEDFIND "Selesai mencari seluruh registri." END
+STRINGTABLE DISCARDABLE +BEGIN + IDS_IMPORT_PROMPT "Add the data to the registry?" + IDS_IMPORTED_OK "Information added to the registry" +END + /*****************************************************************/
Modified: trunk/reactos/base/applications/regedit/lang/it-IT.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/l... ============================================================================== --- trunk/reactos/base/applications/regedit/lang/it-IT.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/regedit/lang/it-IT.rc [iso-8859-1] Sat May 7 14:53:32 2011 @@ -398,6 +398,12 @@ IDS_FINISHEDFIND "Fine ricerca nel registro." END
+STRINGTABLE DISCARDABLE +BEGIN + IDS_IMPORT_PROMPT "Aggiungere l'informazione al registro?" + IDS_IMPORTED_OK "L'informazione è stata aggiunta al registro" +END + /*****************************************************************/
Modified: trunk/reactos/base/applications/regedit/lang/ja-JP.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/l... ============================================================================== --- trunk/reactos/base/applications/regedit/lang/ja-JP.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/regedit/lang/ja-JP.rc [iso-8859-1] Sat May 7 14:53:32 2011 @@ -391,6 +391,12 @@ IDS_FINISHEDFIND "WXgð·×ÄõµÜµ½B" END
+STRINGTABLE DISCARDABLE +BEGIN + IDS_IMPORT_PROMPT "Add the data to the registry?" + IDS_IMPORTED_OK "Information added to the registry" +END + /*****************************************************************/
Modified: trunk/reactos/base/applications/regedit/lang/ko-KR.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/l... ============================================================================== --- trunk/reactos/base/applications/regedit/lang/ko-KR.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/regedit/lang/ko-KR.rc [iso-8859-1] Sat May 7 14:53:32 2011 @@ -378,6 +378,12 @@ IDS_FINISHEDFIND "·¹Áö½ºÆ®¸® °Ë»öÀ» ¿Ï·áÇß½À´Ï´Ù." END
+STRINGTABLE DISCARDABLE +BEGIN + IDS_IMPORT_PROMPT "Add the data to the registry?" + IDS_IMPORTED_OK "Information added to the registry" +END + /*****************************************************************/
Modified: trunk/reactos/base/applications/regedit/lang/nl-NL.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/l... ============================================================================== --- trunk/reactos/base/applications/regedit/lang/nl-NL.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/regedit/lang/nl-NL.rc [iso-8859-1] Sat May 7 14:53:32 2011 @@ -393,6 +393,12 @@ IDS_FINISHEDFIND "Finished searching through the registry." END
+STRINGTABLE DISCARDABLE +BEGIN + IDS_IMPORT_PROMPT "Add the data to the registry?" + IDS_IMPORTED_OK "Information added to the registry" +END + /*****************************************************************/
Modified: trunk/reactos/base/applications/regedit/lang/no-NO.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/l... ============================================================================== --- trunk/reactos/base/applications/regedit/lang/no-NO.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/regedit/lang/no-NO.rc [iso-8859-1] Sat May 7 14:53:32 2011 @@ -393,6 +393,12 @@ IDS_FINISHEDFIND "Søket i registret er fullført." END
+STRINGTABLE DISCARDABLE +BEGIN + IDS_IMPORT_PROMPT "Add the data to the registry?" + IDS_IMPORTED_OK "Information added to the registry" +END + /*****************************************************************/
Modified: trunk/reactos/base/applications/regedit/lang/pl-PL.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/l... ============================================================================== --- trunk/reactos/base/applications/regedit/lang/pl-PL.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/regedit/lang/pl-PL.rc [iso-8859-1] Sat May 7 14:53:32 2011 @@ -400,6 +400,12 @@ IDS_FINISHEDFIND "Przeszukiwanie rejestru zakoñczone." END
+STRINGTABLE DISCARDABLE +BEGIN + IDS_IMPORT_PROMPT "Add the data to the registry?" + IDS_IMPORTED_OK "Information added to the registry" +END + /*****************************************************************/
Modified: trunk/reactos/base/applications/regedit/lang/pt-BR.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/l... ============================================================================== --- trunk/reactos/base/applications/regedit/lang/pt-BR.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/regedit/lang/pt-BR.rc [iso-8859-1] Sat May 7 14:53:32 2011 @@ -394,6 +394,12 @@ IDS_FINISHEDFIND "Pesquisa do Registro concluída." END
+STRINGTABLE DISCARDABLE +BEGIN + IDS_IMPORT_PROMPT "Add the data to the registry?" + IDS_IMPORTED_OK "Information added to the registry" +END + /*****************************************************************/
Modified: trunk/reactos/base/applications/regedit/lang/pt-PT.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/l... ============================================================================== --- trunk/reactos/base/applications/regedit/lang/pt-PT.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/regedit/lang/pt-PT.rc [iso-8859-1] Sat May 7 14:53:32 2011 @@ -384,6 +384,12 @@ IDS_FINISHEDFIND "Finished searching through the registry." END
+STRINGTABLE DISCARDABLE +BEGIN + IDS_IMPORT_PROMPT "Add the data to the registry?" + IDS_IMPORTED_OK "Information added to the registry" +END + /*****************************************************************/
Modified: trunk/reactos/base/applications/regedit/lang/ru-RU.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/l... ============================================================================== --- trunk/reactos/base/applications/regedit/lang/ru-RU.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/regedit/lang/ru-RU.rc [iso-8859-1] Sat May 7 14:53:32 2011 @@ -391,6 +391,12 @@ IDS_FINISHEDFIND "Ïîèñê â ðååñòðå çàâåðøåí." END
+STRINGTABLE DISCARDABLE +BEGIN + IDS_IMPORT_PROMPT "Add the data to the registry?" + IDS_IMPORTED_OK "Information added to the registry" +END + /*****************************************************************/
Modified: trunk/reactos/base/applications/regedit/lang/sk-SK.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/l... ============================================================================== --- trunk/reactos/base/applications/regedit/lang/sk-SK.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/regedit/lang/sk-SK.rc [iso-8859-1] Sat May 7 14:53:32 2011 @@ -378,6 +378,12 @@ IDS_FINISHEDFIND "Finished searching through the registry." END
+STRINGTABLE DISCARDABLE +BEGIN + IDS_IMPORT_PROMPT "Add the data to the registry?" + IDS_IMPORTED_OK "Information added to the registry" +END + /*****************************************************************/
Modified: trunk/reactos/base/applications/regedit/lang/sl-SI.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/l... ============================================================================== --- trunk/reactos/base/applications/regedit/lang/sl-SI.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/regedit/lang/sl-SI.rc [iso-8859-1] Sat May 7 14:53:32 2011 @@ -393,6 +393,12 @@ IDS_FINISHEDFIND "Finished searching through the registry." END
+STRINGTABLE DISCARDABLE +BEGIN + IDS_IMPORT_PROMPT "Add the data to the registry?" + IDS_IMPORTED_OK "Information added to the registry" +END + /*****************************************************************/
Modified: trunk/reactos/base/applications/regedit/lang/sv-SE.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/l... ============================================================================== --- trunk/reactos/base/applications/regedit/lang/sv-SE.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/regedit/lang/sv-SE.rc [iso-8859-1] Sat May 7 14:53:32 2011 @@ -391,6 +391,12 @@ IDS_FINISHEDFIND "Slutfört sökningen av registret." END
+STRINGTABLE DISCARDABLE +BEGIN + IDS_IMPORT_PROMPT "Add the data to the registry?" + IDS_IMPORTED_OK "Information added to the registry" +END + /*****************************************************************/
Modified: trunk/reactos/base/applications/regedit/lang/th-TH.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/l... ============================================================================== --- trunk/reactos/base/applications/regedit/lang/th-TH.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/regedit/lang/th-TH.rc [iso-8859-1] Sat May 7 14:53:32 2011 @@ -393,6 +393,12 @@ IDS_FINISHEDFIND "Finished searching through the registry." END
+STRINGTABLE DISCARDABLE +BEGIN + IDS_IMPORT_PROMPT "Add the data to the registry?" + IDS_IMPORTED_OK "Information added to the registry" +END + /*****************************************************************/
Modified: trunk/reactos/base/applications/regedit/lang/uk-UA.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/l... ============================================================================== --- trunk/reactos/base/applications/regedit/lang/uk-UA.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/regedit/lang/uk-UA.rc [iso-8859-1] Sat May 7 14:53:32 2011 @@ -394,6 +394,12 @@ IDS_FINISHEDFIND "Ïîøóê ó ðåºñòð³ çàâåðøåíèé." END
+STRINGTABLE DISCARDABLE +BEGIN + IDS_IMPORT_PROMPT "Add the data to the registry?" + IDS_IMPORTED_OK "Information added to the registry" +END + /*****************************************************************/
Modified: trunk/reactos/base/applications/regedit/lang/zh-CN.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/l... ============================================================================== --- trunk/reactos/base/applications/regedit/lang/zh-CN.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/regedit/lang/zh-CN.rc [iso-8859-1] Sat May 7 14:53:32 2011 @@ -393,6 +393,12 @@ IDS_FINISHEDFIND "×¢²á±íËÑË÷Íê±Ï¡£" END
+STRINGTABLE DISCARDABLE +BEGIN + IDS_IMPORT_PROMPT "Add the data to the registry?" + IDS_IMPORTED_OK "Information added to the registry" +END + /*****************************************************************/
Modified: trunk/reactos/base/applications/regedit/regedit.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/r... ============================================================================== --- trunk/reactos/base/applications/regedit/regedit.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/regedit/regedit.c [iso-8859-1] Sat May 7 14:53:32 2011 @@ -134,6 +134,7 @@
BOOL PerformRegAction(REGEDIT_ACTION action, LPWSTR s) { + TCHAR szTitle[256], szText[256]; switch (action) { case ACTION_ADD: @@ -162,6 +163,10 @@ } import_registry_file(fp); get_file_name(&s, filename); + LoadString(hInst, IDS_APP_TITLE, szTitle, sizeof(szTitle)); + LoadString(hInst, IDS_IMPORTED_OK, szText, sizeof(szTitle)); + /* show successful import */ + MessageBox(NULL, szText, szTitle, MB_OK); } break; } @@ -311,9 +316,18 @@ }
if (*s && action == ACTION_UNDEF) - action = ACTION_ADD; - - if (action == ACTION_UNDEF) + { + TCHAR szTitle[256], szText[256]; + LoadString(hInst, IDS_APP_TITLE, szTitle, sizeof(szTitle)); + LoadString(hInst, IDS_IMPORT_PROMPT, szText, sizeof(szTitle)); + /* request import confirmation */ + if (MessageBox(NULL, szText, szTitle, MB_YESNO) == IDYES) + { + action = ACTION_ADD; + } + else return TRUE; + } + if (action == ACTION_UNDEF) return FALSE;
return PerformRegAction(action, s);
Modified: trunk/reactos/base/applications/regedit/resource.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/r... ============================================================================== --- trunk/reactos/base/applications/regedit/resource.h [iso-8859-1] (original) +++ trunk/reactos/base/applications/regedit/resource.h [iso-8859-1] Sat May 7 14:53:32 2011 @@ -185,6 +185,8 @@ #define IDS_NEW_VALUE 31127 #define IDS_GOTO_SUGGESTED_KEY 31128
+#define IDS_IMPORT_PROMPT 31129 +#define IDS_IMPORTED_OK 31130
#define IDD_EDIT_STRING 2000 #define IDC_VALUE_NAME 2001