From f4228f5e52b9519694adbd8ce5e569e44e180a4b Mon Sep 17 00:00:00 2001 From: Don HO Date: Tue, 2 May 2017 20:01:26 +0200 Subject: [PATCH] Add "droppong folder as workspace" warning while both files and folddrs are being dropped. --- PowerEditor/src/Notepad_plus.cpp | 22 +++++----------------- PowerEditor/src/NppCommands.cpp | 1 - 2 files changed, 5 insertions(+), 18 deletions(-) diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index d13b3bc9..78f747cb 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -3183,28 +3183,16 @@ void Notepad_plus::dropFiles(HDROP hdrop) else if (not isOldMode && (folderPaths.size() != 0 && filePaths.size() != 0)) // new mode && both folders & files { // display error & do nothing + _nativeLangSpeaker.messageBox("DroppingFolderAsProjetModeWarning", + _pPublicInterface->getHSelf(), + TEXT("You can drop only files or folders but not both, because you're in dropping Folder as Projet mode.\ryou have to enable \"Open all files of folder instead of launching Folder as Workspace on folder dropping\" in \"Default Directory\" section of Preferences dialog to make this operation work."), + TEXT("Invalid action"), + MB_OK | MB_APPLMODAL); } else if (not isOldMode && (folderPaths.size() != 0 && filePaths.size() == 0)) // new mode && only folders { // process new mode launchFileBrowser(folderPaths); - - /* - for (int i = 0; i < filesDropped; ++i) - { - if (not _pFileBrowser->isAlreadyExist(folderPaths[i])) - { - vector patterns2Match; - patterns2Match.push_back(TEXT("*.*")); - - FolderInfo directoryStructure; - getDirectoryStructure(folderPaths[i].c_str(), patterns2Match, directoryStructure, true, false); - _pFileBrowser->setDirectoryStructure(directoryStructure); - } - int j = 0; - j++; - } - */ } if (lastOpened != BUFFER_INVALID) diff --git a/PowerEditor/src/NppCommands.cpp b/PowerEditor/src/NppCommands.cpp index 323a7b1a..d6f6d6a1 100644 --- a/PowerEditor/src/NppCommands.cpp +++ b/PowerEditor/src/NppCommands.cpp @@ -2439,7 +2439,6 @@ void Notepad_plus::command(int id) case IDM_SETTING_EDITCONTEXTMENU : { - generic_string warning, title; _nativeLangSpeaker.messageBox("ContextMenuXmlEditWarning", _pPublicInterface->getHSelf(), TEXT("Editing contextMenu.xml allows you to modify your Notepad++ popup context menu on edit zone.\rYou have to restart your Notepad++ to take effect after modifying contextMenu.xml."),