[NEW_FEATURE] (Author: Christian Cuvier) Add a new capacity in context menu: the menu item can be renamed (only for occidental languages).
[UPDATE] Update contextMenu.xml. git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@695 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
parent
549e5f5f29
commit
a85c08b0a9
|
@ -1375,11 +1375,13 @@ bool NppParameters::getContextMenuFromXmlTree(HMENU mainMenuHadle, HMENU plugins
|
|||
childNode = childNode->NextSibling(TEXT("Item")) )
|
||||
{
|
||||
const TCHAR *folderName = (childNode->ToElement())->Attribute(TEXT("FolderName"));
|
||||
const TCHAR *displayAs = (childNode->ToElement())->Attribute(TEXT("ItemNameAs"));
|
||||
|
||||
int id;
|
||||
const TCHAR *idStr = (childNode->ToElement())->Attribute(TEXT("id"), &id);
|
||||
if (idStr)
|
||||
{
|
||||
_contextMenuItems.push_back(MenuItemUnit(id, TEXT(""), folderName));
|
||||
_contextMenuItems.push_back(MenuItemUnit(id, displayAs?displayAs:TEXT(""), folderName));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1418,7 +1420,7 @@ bool NppParameters::getContextMenuFromXmlTree(HMENU mainMenuHadle, HMENU plugins
|
|||
if (generic_stricmp(menuItemName, purgeMenuItemString(cmdStr).c_str()) == 0)
|
||||
{
|
||||
int cmdId = ::GetMenuItemID(currMenu, currMenuPos);
|
||||
_contextMenuItems.push_back(MenuItemUnit(cmdId, TEXT(""), folderName));
|
||||
_contextMenuItems.push_back(MenuItemUnit(cmdId, displayAs?displayAs:TEXT(""), folderName));
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1465,7 +1467,7 @@ bool NppParameters::getContextMenuFromXmlTree(HMENU mainMenuHadle, HMENU plugins
|
|||
if (generic_stricmp(pluginCmdName, purgeMenuItemString(pluginCmdStr).c_str()) == 0)
|
||||
{
|
||||
int pluginCmdId = ::GetMenuItemID(pluginMenu, j);
|
||||
_contextMenuItems.push_back(MenuItemUnit(pluginCmdId, TEXT(""), folderName));
|
||||
_contextMenuItems.push_back(MenuItemUnit(pluginCmdId, displayAs?displayAs:TEXT(""), folderName));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0" encoding="Windows-1252" ?>
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!--
|
||||
By modifying this file, you can customize your context menu popuped as right clicking on the edit zone.
|
||||
It may be more convinient to access to your frequent used commands via context menu than via the top menu.
|
||||
|
@ -8,19 +8,25 @@ http://sourceforge.net/apps/mediawiki/notepad-plus/index.php?title=Context_Menu
|
|||
-->
|
||||
<NotepadPlus>
|
||||
<ScintillaContextMenu>
|
||||
<!-- Use MenuEntryName and MenuItemName to localize your commands to add -->
|
||||
<!--
|
||||
Use MenuEntryName and MenuItemName to localize your commands to add.
|
||||
The values should be in English but not in translated language.
|
||||
(You can set Notepad++ language back to English from Preferences dialog via menu "Settings->Preferences...")
|
||||
-->
|
||||
<Item MenuEntryName="Edit" MenuItemName="Cut"/>
|
||||
<Item MenuEntryName="Edit" MenuItemName="Copy"/>
|
||||
<Item MenuEntryName="Edit" MenuItemName="Paste"/>
|
||||
<Item MenuEntryName="Edit" MenuItemName="Delete"/>
|
||||
<Item MenuEntryName="Edit" MenuItemName="Select all"/>
|
||||
|
||||
<!-- id="0" is the separator -->
|
||||
<Item id="0"/>
|
||||
|
||||
<!-- You can use command id to add the commands you want.
|
||||
Check english.xml to get commands id:
|
||||
http://notepad-plus.svn.sourceforge.net/viewvc/notepad-plus/trunk/PowerEditor/installer/nativeLang/english.xml
|
||||
|
||||
Use FolderName (optional) to create sub-menu. FolderName can be used in any item.
|
||||
Use FolderName (optional) to create sub-menu. FolderName can be used in any type of item.
|
||||
-->
|
||||
<Item FolderName="Style token" id="43022"/>
|
||||
<Item FolderName="Style token" id="43024"/>
|
||||
|
@ -35,10 +41,18 @@ http://sourceforge.net/apps/mediawiki/notepad-plus/index.php?title=Context_Menu
|
|||
<Item FolderName="Remove style" id="43031"/>
|
||||
<Item FolderName="Remove style" id="43032"/>
|
||||
<Item id="0"/>
|
||||
<!-- To add plugin commands, you have to use PluginEntryName and PluginCommandItemName to localize the plugin commands -->
|
||||
<Item FolderName="Plugin commands" PluginEntryName="MIME Tools" PluginCommandItemName="Base64 Encode"/>
|
||||
<Item FolderName="Plugin commands" PluginEntryName="MIME Tools" PluginCommandItemName="Base64 Decode"/>
|
||||
<Item FolderName="Plugin commands" PluginEntryName="NppExport" PluginCommandItemName="Copy all formats to clipboard"/>
|
||||
|
||||
<!--
|
||||
To add plugin commands, you have to use PluginEntryName and PluginCommandItemName to localize the plugin commands
|
||||
-->
|
||||
<Item FolderName="Plugin commands" PluginEntryName="MIME Tools" PluginCommandItemName="Base64 Encode" />
|
||||
<Item FolderName="Plugin commands" PluginEntryName="MIME Tools" PluginCommandItemName="Base64 Decode" />
|
||||
|
||||
<!--
|
||||
Use ItemNameAs (optional) to rename the menu item name in the context menu
|
||||
ItemNameAs can be used in any type of item.
|
||||
-->
|
||||
<Item PluginEntryName="NppExport" PluginCommandItemName="Copy all formats to clipboard" ItemNameAs="Copy Text with Syntax Highlighting" />
|
||||
|
||||
<Item id="0"/>
|
||||
<Item MenuEntryName="Edit" MenuItemName="UPPERCASE"/>
|
||||
|
|
Loading…
Reference in New Issue