Add a submenu item in Languages menu to open UDL folder

Fix #5404, close #7540
This commit is contained in:
Krzysztof Szewczyk 2019-11-10 12:09:37 +01:00 committed by Don HO
parent de64bef97d
commit 2458812a42
No known key found for this signature in database
GPG Key ID: 6C429F1D8D84F46E
4 changed files with 12 additions and 1 deletions

View File

@ -775,6 +775,7 @@ BEGIN
MENUITEM "YAML", IDM_LANG_YAML MENUITEM "YAML", IDM_LANG_YAML
MENUITEM SEPARATOR MENUITEM SEPARATOR
MENUITEM "Define your language...", IDM_LANG_USER_DLG MENUITEM "Define your language...", IDM_LANG_USER_DLG
MENUITEM "Open UDL folder...", IDM_LANG_OPENUDLDIR
MENUITEM "User-Defined", IDM_LANG_USER MENUITEM "User-Defined", IDM_LANG_USER
END END
@ -918,6 +919,7 @@ BEGIN
MENUITEM "YAML", IDM_LANG_YAML MENUITEM "YAML", IDM_LANG_YAML
MENUITEM SEPARATOR MENUITEM SEPARATOR
MENUITEM "Define your language...", IDM_LANG_USER_DLG MENUITEM "Define your language...", IDM_LANG_USER_DLG
MENUITEM "Open UDL folder...", IDM_LANG_OPENUDLDIR
MENUITEM "User-Defined", IDM_LANG_USER MENUITEM "User-Defined", IDM_LANG_USER
END END

View File

@ -3048,6 +3048,13 @@ void Notepad_plus::command(int id)
} }
} }
break; break;
case IDM_LANG_OPENUDLDIR: {
generic_string _userPath = NppParameters::getInstance().getUserPath();
PathAppend(_userPath, TEXT("userDefineLangs"));
::ShellExecute(_pPublicInterface->getHSelf(), TEXT("open"), _userPath.c_str(), NULL, NULL, SW_SHOW);
break;
}
case IDC_PREV_DOC : case IDC_PREV_DOC :
case IDC_NEXT_DOC : case IDC_NEXT_DOC :

View File

@ -369,6 +369,7 @@ static const WinMenuKeyDefinition winKeyDefs[] =
{ VK_NULL, IDM_LANG_USER_DLG, false, false, false, nullptr }, { VK_NULL, IDM_LANG_USER_DLG, false, false, false, nullptr },
{ VK_NULL, IDM_LANG_USER, false, false, false, nullptr }, { VK_NULL, IDM_LANG_USER, false, false, false, nullptr },
{ VK_NULL, IDM_LANG_OPENUDLDIR, false, false, false, nullptr },
{ VK_NULL, IDM_SETTING_PREFERENCE, false, false, false, nullptr }, { VK_NULL, IDM_SETTING_PREFERENCE, false, false, false, nullptr },
{ VK_NULL, IDM_LANGSTYLE_CONFIG_DLG, false, false, false, nullptr }, { VK_NULL, IDM_LANGSTYLE_CONFIG_DLG, false, false, false, nullptr },

View File

@ -521,7 +521,8 @@
#define IDM_LANG_USER (IDM_LANG + 180) //46180: Used for translation #define IDM_LANG_USER (IDM_LANG + 180) //46180: Used for translation
#define IDM_LANG_USER_LIMIT (IDM_LANG + 210) //46210: Ajust with IDM_LANG_USER #define IDM_LANG_USER_LIMIT (IDM_LANG + 210) //46210: Ajust with IDM_LANG_USER
#define IDM_LANG_USER_DLG (IDM_LANG + 250) //46250: Used for translation #define IDM_LANG_USER_DLG (IDM_LANG + 250) //46250: Used for translation
#define IDM_LANG_OPENUDLDIR (IDM_LANG + 300)