Display file name as root of workspace instead of "Workspace"
Close #8314, close #8315pull/8317/head
parent
b037bb5c95
commit
3f0627b75f
|
@ -398,7 +398,8 @@ bool ProjectPanel::openWorkSpace(const TCHAR *projectFileName)
|
||||||
|
|
||||||
NativeLangSpeaker *pNativeSpeaker = (NppParameters::getInstance()).getNativeLangSpeaker();
|
NativeLangSpeaker *pNativeSpeaker = (NppParameters::getInstance()).getNativeLangSpeaker();
|
||||||
generic_string workspace = pNativeSpeaker->getAttrNameStr(PM_WORKSPACEROOTNAME, "ProjectManager", "WorkspaceRootName");
|
generic_string workspace = pNativeSpeaker->getAttrNameStr(PM_WORKSPACEROOTNAME, "ProjectManager", "WorkspaceRootName");
|
||||||
HTREEITEM rootItem = _treeView.addItem(workspace.c_str(), TVI_ROOT, INDEX_CLEAN_ROOT);
|
TCHAR * fileName = PathFindFileName(projectFileName);
|
||||||
|
HTREEITEM rootItem = _treeView.addItem(fileName, TVI_ROOT, INDEX_CLEAN_ROOT);
|
||||||
|
|
||||||
for ( ; childNode ; childNode = childNode->NextSibling(TEXT("Project")))
|
for ( ; childNode ; childNode = childNode->NextSibling(TEXT("Project")))
|
||||||
{
|
{
|
||||||
|
@ -454,6 +455,9 @@ bool ProjectPanel::writeWorkSpace(TCHAR *projectFileName)
|
||||||
if (!tvRoot)
|
if (!tvRoot)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
TCHAR * fileName = PathFindFileName(projectFileName);
|
||||||
|
_treeView.renameItem(tvRoot, fileName);
|
||||||
|
|
||||||
for (HTREEITEM tvProj = _treeView.getChildFrom(tvRoot);
|
for (HTREEITEM tvProj = _treeView.getChildFrom(tvRoot);
|
||||||
tvProj != NULL;
|
tvProj != NULL;
|
||||||
tvProj = _treeView.getNextSibling(tvProj))
|
tvProj = _treeView.getNextSibling(tvProj))
|
||||||
|
|
Loading…
Reference in New Issue