[ENHANCE] Enhance Project Manager - add DELETE and ENTER shortcut.

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@821 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
Don Ho 2011-10-02 00:17:43 +00:00
parent 49eb552f71
commit 33ce72fa6c
9 changed files with 80 additions and 64 deletions

View File

@ -1,45 +1,17 @@
Notepad++ v5.9.3 new features and fixed bugs: Notepad++ v5.9.4 new features and fixed bugs:
1. Update Scintilla to 2.27. 1. Add 3 Project Panels for the management of projects
2. Make Recent File List totally customizable. 2. Doc Switcher can be sorted now.
3. Add Vertical File Switcher feature. 3. Fix crash issue while printing for some printers.
4. Add active folding area highlighting feature (only for box and circle mode). 4. Fix ANSI version Clipboard history entries display bug.
5. Detect the absence of Scintilla. 5. Fix wrong display of tab number setting dialog in Lang Menu/Tab settings of Preferences dialog.
6. Add 2 plugins messages NPPM_GETLANGUAGENAME & NPPM_GETLANGUAGEDESC.
7. Fix "Replace all" feature hangs on the Regular Expression '$'.
8. Fix wrong result returned by NPPM_GETLANGUAGENAME.
Notepad++ v5.9.2 fixed bugs:
1. Fix the Clipboard History crash issue while no data in Clipboard.
2. Fix the local directory installation option ignored issue in Installer.
3. Reduce the recent file history width to 32 characters.
Notepad++ v5.9.1 new features:
1. Add Character Insertion Panel.
2. Add Clipboard History feature.
3. Add find characters in range feature.
Notepad++ v5.9 new features and fixed bugs (from v5.8.7):
1. Update Scintilla from 2.21 to 2.25
2. New feature: Non-greedy regular expression (Scintilla).
3. Add Copy/Cut/Paste Binary Content feature.
4. Add "paste HTML content" and "paste RTF content" commands.
5. Fix the inverse of title and message for some MessageBox.
6. Add "Remove Unmarked Lines" command.
7. Add "Column Mode Tip" to notice users the usage of column mode in Notepad++.
8. Make stream comment of php/javascript foldable.
Included plugins (Unicode): Included plugins (Unicode):
1. Spell Checker v1.3.3 1. Spell Checker v1.3.3
2. NppFTP 0.23 2. NppFTP 0.24.1
3. NppExport v0.2.8 3. NppExport v0.2.8
4. Plugin Manager 0.9.3.1 4. Plugin Manager 0.9.3.1
5. Converter 3.0 5. Converter 3.0

View File

@ -18,10 +18,10 @@
; Define the application name ; Define the application name
!define APPNAME "Notepad++" !define APPNAME "Notepad++"
!define APPVERSION "5.9.3" !define APPVERSION "5.9.4"
!define APPNAMEANDVERSION "${APPNAME} v${APPVERSION}" !define APPNAMEANDVERSION "${APPNAME} v${APPVERSION}"
!define VERSION_MAJOR 5 !define VERSION_MAJOR 5
!define VERSION_MINOR 93 !define VERSION_MINOR 94
!define APPWEBSITE "http://notepad-plus-plus.org/" !define APPWEBSITE "http://notepad-plus-plus.org/"

View File

@ -45,7 +45,6 @@ void Notepad_plus::command(int id)
case IDM_FILE_NEW: case IDM_FILE_NEW:
{ {
fileNew(); fileNew();
//launchProjectPanel();
} }
break; break;

View File

@ -420,6 +420,34 @@ generic_string ProjectPanel::getAbsoluteFilePath(const TCHAR * relativePath)
return absolutePath; return absolutePath;
} }
void ProjectPanel::openSelectFile()
{
TVITEM tvItem;
tvItem.mask = TVIF_PARAM;
tvItem.hItem = _treeView.getSelection();
::SendMessage(_treeView.getHSelf(), TVM_GETITEM, 0,(LPARAM)&tvItem);
NodeType nType = getNodeType(tvItem.hItem);
generic_string *fn = (generic_string *)tvItem.lParam;
if (nType == nodeType_file && fn)
{
tvItem.mask = TVIF_IMAGE | TVIF_SELECTEDIMAGE;
if (::PathFileExists(fn->c_str()))
{
::SendMessage(_hParent, NPPM_DOOPEN, 0, (LPARAM)(fn->c_str()));
tvItem.iImage = INDEX_LEAF;
tvItem.iSelectedImage = INDEX_LEAF;
}
else
{
tvItem.iImage = INDEX_LEAF_INVALID;
tvItem.iSelectedImage = INDEX_LEAF_INVALID;
}
TreeView_SetItem(_treeView.getHSelf(), &tvItem);
}
}
void ProjectPanel::notified(LPNMHDR notification) void ProjectPanel::notified(LPNMHDR notification)
{ {
if((notification->hwndFrom == _treeView.getHSelf())) if((notification->hwndFrom == _treeView.getHSelf()))
@ -434,25 +462,7 @@ void ProjectPanel::notified(LPNMHDR notification)
{ {
case NM_DBLCLK: case NM_DBLCLK:
{ {
tvItem.hItem = _treeView.getSelection(); openSelectFile();
::SendMessage(_treeView.getHSelf(), TVM_GETITEM, 0,(LPARAM)&tvItem);
generic_string *fn = (generic_string *)tvItem.lParam;
if (fn)
{
tvItem.mask = TVIF_IMAGE | TVIF_SELECTEDIMAGE;
if (::PathFileExists(fn->c_str()))
{
::SendMessage(_hParent, NPPM_DOOPEN, 0, (LPARAM)(fn->c_str()));
tvItem.iImage = INDEX_LEAF;
tvItem.iSelectedImage = INDEX_LEAF;
}
else
{
tvItem.iImage = INDEX_LEAF_INVALID;
tvItem.iSelectedImage = INDEX_LEAF_INVALID;
}
TreeView_SetItem(_treeView.getHSelf(), &tvItem);
}
} }
break; break;
@ -521,6 +531,36 @@ void ProjectPanel::notified(LPNMHDR notification)
} }
break; break;
case TVN_KEYDOWN:
{
//tvItem.hItem = _treeView.getSelection();
//::SendMessage(_treeView.getHSelf(), TVM_GETITEM, 0,(LPARAM)&tvItem);
LPNMTVKEYDOWN ptvkd = (LPNMTVKEYDOWN)notification;
if (ptvkd->wVKey == VK_DELETE)
{
HTREEITEM hItem = _treeView.getSelection();
NodeType nType = getNodeType(hItem);
if (nType == nodeType_project || nType == nodeType_folder)
popupMenuCmd(IDM_PROJECT_DELETEFOLDER);
else if (nType == nodeType_file)
popupMenuCmd(IDM_PROJECT_DELETEFILE);
}
else if (ptvkd->wVKey == VK_RETURN)
{
HTREEITEM hItem = _treeView.getSelection();
NodeType nType = getNodeType(hItem);
if (nType == nodeType_file)
openSelectFile();
else
_treeView.toggleExpandCollapse(hItem);
}
else if (ptvkd->wVKey == VK_F2)
popupMenuCmd(IDM_PROJECT_RENAME);
}
break;
case TVN_ITEMEXPANDED: case TVN_ITEMEXPANDED:
{ {
LPNMTREEVIEW nmtv = (LPNMTREEVIEW)notification; LPNMTREEVIEW nmtv = (LPNMTREEVIEW)notification;

View File

@ -91,6 +91,7 @@ protected:
void notified(LPNMHDR notification); void notified(LPNMHDR notification);
void showContextMenu(int x, int y); void showContextMenu(int x, int y);
generic_string getAbsoluteFilePath(const TCHAR * relativePath); generic_string getAbsoluteFilePath(const TCHAR * relativePath);
void openSelectFile();
}; };
class FileRelocalizerDlg : public StaticDialog class FileRelocalizerDlg : public StaticDialog

View File

@ -118,3 +118,4 @@ void TreeView::setItemImage(HTREEITEM hTreeItem, int iImage, int iSelectedImage)
tvItem.iSelectedImage = iSelectedImage; tvItem.iSelectedImage = iSelectedImage;
TreeView_SetItem(_hSelf, &tvItem); TreeView_SetItem(_hSelf, &tvItem);
} }

View File

@ -44,9 +44,12 @@ public:
HTREEITEM getNextSibling(HTREEITEM hItem) const { HTREEITEM getNextSibling(HTREEITEM hItem) const {
return TreeView_GetNextSibling(_hSelf, hItem); return TreeView_GetNextSibling(_hSelf, hItem);
}; };
void expand(HTREEITEM hItem) const { void expand(HTREEITEM hItem) const {
TreeView_Expand(_hSelf, hItem, TVE_EXPAND); TreeView_Expand(_hSelf, hItem, TVE_EXPAND);
}; };
void toggleExpandCollapse(HTREEITEM hItem) const {
TreeView_Expand(_hSelf, hItem, TVE_TOGGLE);
};
void setItemImage(HTREEITEM hTreeItem, int iImage, int iSelectedImage); void setItemImage(HTREEITEM hTreeItem, int iImage, int iSelectedImage);
protected: protected:

File diff suppressed because one or more lines are too long

View File

@ -18,12 +18,12 @@
#ifndef RESOURCE_H #ifndef RESOURCE_H
#define RESOURCE_H #define RESOURCE_H
#define NOTEPAD_PLUS_VERSION TEXT("Notepad++ v5.9.3") #define NOTEPAD_PLUS_VERSION TEXT("Notepad++ v5.9.4")
// should be X.Y : ie. if VERSION_DIGITALVALUE == 4, 7, 1, 0 , then X = 4, Y = 71 // should be X.Y : ie. if VERSION_DIGITALVALUE == 4, 7, 1, 0 , then X = 4, Y = 71
// ex : #define VERSION_VALUE TEXT("5.63\0") // ex : #define VERSION_VALUE TEXT("5.63\0")
#define VERSION_VALUE TEXT("5.93\0") #define VERSION_VALUE TEXT("5.94\0")
#define VERSION_DIGITALVALUE 5, 9, 3, 0 #define VERSION_DIGITALVALUE 5, 9, 4, 0
#ifdef UNICODE #ifdef UNICODE
#define UNICODE_ANSI_MODE TEXT("(UNICODE)") #define UNICODE_ANSI_MODE TEXT("(UNICODE)")