[NEW] Add new application icon.
[ENHANCE] Enhance Editing Contextmenu feature. [UPDATE] Add comment in contextMenu.xml. git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@688 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
parent
87bfb72d5e
commit
03b2d5e8b7
|
@ -0,0 +1,10 @@
|
|||
REM To add vista style icon, you need ReplaceVistaIcon.exe in the same directory. You can find it on:
|
||||
REM http://www.rw-designer.com/compile-vista-icon
|
||||
|
||||
REM %1 should be the path of ReplaceVistaIcon.exe
|
||||
REM %2 should be the path of notepad++.exe
|
||||
|
||||
if exist %1 (
|
||||
%1 %2 "..\src\icons\nppNewIcon.ico"
|
||||
)
|
||||
|
|
@ -700,6 +700,7 @@ BEGIN
|
|||
MENUITEM "Import plugin(s)...", IDM_SETTING_IMPORTPLUGIN
|
||||
MENUITEM "Import style theme(s)...", IDM_SETTING_IMPORTSTYLETHEMS
|
||||
END
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Edit Popup ContextMenu", IDM_SETTING_EDITCONTEXTMENU
|
||||
END
|
||||
|
||||
|
|
|
@ -1645,9 +1645,14 @@ void Notepad_plus::command(int id)
|
|||
|
||||
case IDM_SETTING_EDITCONTEXTMENU :
|
||||
{
|
||||
//if (contion)
|
||||
{
|
||||
TCHAR warning[] = TEXT("Editing contextMenu.xml allows you to modify your Notepad++ popup context menu.\rYou have to restart your Notepad++ to take effect after modifying contextMenu.xml.");
|
||||
::MessageBox(_pPublicInterface->getHSelf(), warning, TEXT("Editing contextMenu"), MB_OK|MB_APPLMODAL);
|
||||
}
|
||||
NppParameters *pNppParams = NppParameters::getInstance();
|
||||
doOpen((pNppParams->getContextMenuPath()).c_str());
|
||||
|
||||
BufferID bufID = doOpen((pNppParams->getContextMenuPath()).c_str());
|
||||
switchToFile(bufID);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -1445,7 +1445,8 @@ bool NppParameters::getContextMenuFromXmlTree(HMENU mainMenuHadle)
|
|||
else
|
||||
{
|
||||
const TCHAR *pluginName = (childNode->ToElement())->Attribute(TEXT("PluginEntryName"));
|
||||
const TCHAR *pluginCmdName = (childNode->ToElement())->Attribute(TEXT("pluginCommandItemName"));
|
||||
const TCHAR *pluginCmdName = (childNode->ToElement())->Attribute(TEXT("PluginCommandItemName"));
|
||||
|
||||
if (pluginName && pluginCmdName)
|
||||
{
|
||||
HMENU pluginsMenu = ::GetSubMenu(mainMenuHadle, MENUINDEX_PLUGINS);
|
||||
|
|
|
@ -2255,8 +2255,7 @@ void ScintillaEditView::currentLinesDown() const
|
|||
|
||||
int line2swap = lineRange.second + 1;
|
||||
int nbChar = execute(SCI_LINELENGTH, line2swap);
|
||||
//printInt(line2swap);
|
||||
//printInt(execute(SCI_GETLINECOUNT));
|
||||
|
||||
if ((line2swap + 1) == execute(SCI_GETLINECOUNT))
|
||||
nbChar += (execute(SCI_GETEOLMODE)==SC_EOL_CRLF?2:1);
|
||||
|
||||
|
@ -2288,46 +2287,43 @@ void ScintillaEditView::convertSelectedTextTo(bool Case)
|
|||
{
|
||||
execute(SCI_BEGINUNDOACTION);
|
||||
|
||||
//int selStart = execute(SCI_GETSELECTIONSTART);
|
||||
//int selEnd = execute(SCI_GETSELECTIONEND);
|
||||
|
||||
ColumnModeInfos cmi = getColumnModeSelectInfo();
|
||||
|
||||
for (size_t i = 0 ; i < cmi.size() ; i++)
|
||||
{
|
||||
const int len = cmi[i]._selRpos - cmi[i]._selLpos;
|
||||
ColumnModeInfos cmi = getColumnModeSelectInfo();
|
||||
|
||||
for (size_t i = 0 ; i < cmi.size() ; i++)
|
||||
{
|
||||
const int len = cmi[i]._selRpos - cmi[i]._selLpos;
|
||||
char *srcStr = new char[len+1];
|
||||
wchar_t *destStr = new wchar_t[len+1];
|
||||
|
||||
int start = cmi[i]._selLpos;
|
||||
int end = cmi[i]._selRpos;
|
||||
getText(srcStr, start, end);
|
||||
|
||||
int nbChar = ::MultiByteToWideChar(codepage, 0, srcStr, len, destStr, len);
|
||||
|
||||
for (int j = 0 ; j < nbChar ; j++)
|
||||
{
|
||||
if (Case == UPPERCASE)
|
||||
destStr[j] = (wchar_t)::CharUpperW((LPWSTR)destStr[j]);
|
||||
else
|
||||
destStr[j] = (wchar_t)::CharLowerW((LPWSTR)destStr[j]);
|
||||
}
|
||||
::WideCharToMultiByte(codepage, 0, destStr, len, srcStr, len, NULL, NULL);
|
||||
|
||||
execute(SCI_SETTARGETSTART, start);
|
||||
execute(SCI_SETTARGETEND, end);
|
||||
execute(SCI_REPLACETARGET, (WPARAM)-1, (LPARAM)srcStr);
|
||||
int start = cmi[i]._selLpos;
|
||||
int end = cmi[i]._selRpos;
|
||||
getText(srcStr, start, end);
|
||||
|
||||
delete [] srcStr;
|
||||
delete [] destStr;
|
||||
}
|
||||
int nbChar = ::MultiByteToWideChar(codepage, 0, srcStr, len, destStr, len);
|
||||
|
||||
setMultiSelections(cmi);
|
||||
|
||||
//execute(SCI_SETSELECTIONSTART, selStart);
|
||||
//execute(SCI_SETSELECTIONEND, selEnd);
|
||||
|
||||
execute(SCI_ENDUNDOACTION);
|
||||
for (int j = 0 ; j < nbChar ; j++)
|
||||
{
|
||||
if (Case == UPPERCASE)
|
||||
destStr[j] = (wchar_t)::CharUpperW((LPWSTR)destStr[j]);
|
||||
else
|
||||
destStr[j] = (wchar_t)::CharLowerW((LPWSTR)destStr[j]);
|
||||
}
|
||||
::WideCharToMultiByte(codepage, 0, destStr, len, srcStr, len, NULL, NULL);
|
||||
|
||||
execute(SCI_SETTARGETSTART, start);
|
||||
execute(SCI_SETTARGETEND, end);
|
||||
execute(SCI_REPLACETARGET, (WPARAM)-1, (LPARAM)srcStr);
|
||||
|
||||
delete [] srcStr;
|
||||
delete [] destStr;
|
||||
}
|
||||
|
||||
setMultiSelections(cmi);
|
||||
|
||||
//execute(SCI_SETSELECTIONSTART, selStart);
|
||||
//execute(SCI_SETSELECTIONEND, selEnd);
|
||||
|
||||
execute(SCI_ENDUNDOACTION);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,11 +1,25 @@
|
|||
<?xml version="1.0" encoding="Windows-1252" ?>
|
||||
<!--
|
||||
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.
|
||||
|
||||
Please check "How to Customize the Context Menu" on:
|
||||
http://sourceforge.net/apps/mediawiki/notepad-plus/index.php?title=Context_Menu
|
||||
-->
|
||||
<NotepadPlus>
|
||||
<ScintillaContextMenu>
|
||||
<!-- Use MenuEntryName and MenuItemName to localize your commands to add -->
|
||||
<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
|
||||
-->
|
||||
<Item id="43022"/>
|
||||
<Item id="43024"/>
|
||||
<Item id="43026"/>
|
||||
|
@ -18,6 +32,12 @@
|
|||
<Item id="43029"/>
|
||||
<Item id="43031"/>
|
||||
<Item id="43032"/>
|
||||
<Item id="0"/>
|
||||
<!-- To add plugin commands, you have to use PluginEntryName and PluginCommandItemName to localize the plugin commands -->
|
||||
<Item PluginEntryName="MIME Tools" PluginCommandItemName="Base64 Encode"/>
|
||||
<Item PluginEntryName="MIME Tools" PluginCommandItemName="Base64 Decode"/>
|
||||
<Item PluginEntryName="NppExport" PluginCommandItemName="Copy all formats to clipboard"/>
|
||||
|
||||
<Item id="0"/>
|
||||
<Item MenuEntryName="Edit" MenuItemName="UPPERCASE"/>
|
||||
<Item MenuEntryName="Edit" MenuItemName="lowercase"/>
|
||||
|
@ -27,4 +47,4 @@
|
|||
<Item id="0"/>
|
||||
<Item MenuEntryName="View" MenuItemName="Hide lines"/>
|
||||
</ScintillaContextMenu>
|
||||
</NotepadPlus>
|
||||
</NotepadPlus>
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 182 KiB |
|
@ -194,7 +194,7 @@
|
|||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine="copy ..\src\config.xml ..\bin\config.xml
copy ..\src\langs.xml ..\bin\langs.xml
copy ..\src\stylers.xml ..\bin\stylers.xml
"
|
||||
CommandLine=""
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
|
@ -255,7 +255,7 @@
|
|||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="comctl32.lib shlwapi.lib shell32.lib Oleacc.lib"
|
||||
ShowProgress="2"
|
||||
OutputFile="../bin/notepad++.exe"
|
||||
OutputFile="$(OutDir)/notepad++.exe"
|
||||
Version="1.0"
|
||||
LinkIncremental="1"
|
||||
TypeLibraryFile=""
|
||||
|
@ -291,7 +291,7 @@
|
|||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine="copy ..\src\config.model.xml ..\bin\config.model.xml
copy ..\src\langs.model.xml ..\bin\langs.model.xml
copy ..\src\stylers.model.xml ..\bin\stylers.model.xml
copy ..\src\shortcuts.xml ..\bin\shortcuts.xml
copy ..\src\contextMenu.xml ..\bin\contextMenu.xml
"
|
||||
CommandLine="copy ..\src\config.model.xml ..\bin\config.model.xml
copy ..\src\langs.model.xml ..\bin\langs.model.xml
copy ..\src\stylers.model.xml ..\bin\stylers.model.xml
copy ..\src\shortcuts.xml ..\bin\shortcuts.xml
copy ..\src\contextMenu.xml ..\bin\contextMenu.xml
..\misc\vistaIconTool\changeIcon.bat "..\misc\vistaIconTool\ReplaceVistaIcon.exe" "$(OutDir)\notepad++.exe"
"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
|
@ -387,7 +387,7 @@
|
|||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine="copy ..\src\config.model.xml ..\bin\config.model.xml
copy ..\src\langs.model.xml ..\bin\langs.model.xml
copy ..\src\stylers.model.xml ..\bin\stylers.model.xml
copy ..\src\shortcuts.xml ..\bin\shortcuts.xml
copy ..\src\contextMenu.xml ..\bin\contextMenu.xml
"
|
||||
CommandLine="copy ..\src\config.model.xml ..\installer\zipped.package.release\ansi\config.model.xml
copy ..\src\langs.model.xml ..\installer\zipped.package.release\ansi\langs.model.xml
copy ..\src\stylers.model.xml ..\installer\zipped.package.release\ansi\stylers.model.xml
copy ..\src\shortcuts.xml ..\installer\zipped.package.release\ansi\shortcuts.xml
copy ..\src\contextMenu.xml ..\installer\zipped.package.release\ansi\contextMenu.xml
..\misc\vistaIconTool\changeIcon.bat "..\misc\vistaIconTool\ReplaceVistaIcon.exe" "$(OutDir)\notepad++.exe"
"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
|
|
Loading…
Reference in New Issue