mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-27 07:44:24 +02:00
[RELEASE] v5.1 OR (save the earth action) : Add question dialog for removing incompatible plugins to prevent annoying message from the next launch time - that will reduce million click times by users for each new release.
git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@347 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
parent
23bce30e0f
commit
3b7184ffea
@ -18,8 +18,8 @@
|
||||
#include <shlwapi.h>
|
||||
#include "PluginsManager.h"
|
||||
|
||||
const TCHAR * USERMSG = TEXT("This plugin is not compatible with current version of Notepad++.\n\
|
||||
Remove this plugin from plugins directory if you don't want to see this message on the next launch time.");
|
||||
const TCHAR * USERMSG = TEXT("This plugin is not compatible with current version of Notepad++.\n\n\
|
||||
Do you want to remove this plugin from plugins directory to prevent this message from the next launch time?");
|
||||
|
||||
bool PluginsManager::loadPlugins(const TCHAR *dir)
|
||||
{
|
||||
@ -27,6 +27,7 @@ bool PluginsManager::loadPlugins(const TCHAR *dir)
|
||||
return false;
|
||||
|
||||
vector<generic_string> dllNames;
|
||||
vector<generic_string> dll2Remove;
|
||||
const TCHAR *pNppPath = (NppParameters::getInstance())->getNppPath();
|
||||
|
||||
generic_string pluginsFullPathFilter = (dir && dir[0])?dir:pNppPath;
|
||||
@ -175,7 +176,10 @@ bool PluginsManager::loadPlugins(const TCHAR *dir)
|
||||
{
|
||||
s += TEXT("\n\n");
|
||||
s += USERMSG;
|
||||
::MessageBox(NULL, s.c_str(), dllNames[i].c_str(), MB_OK);
|
||||
if (::MessageBox(NULL, s.c_str(), dllNames[i].c_str(), MB_YESNO) == IDYES)
|
||||
{
|
||||
dll2Remove.push_back(dllNames[i]);
|
||||
}
|
||||
delete pi;
|
||||
}
|
||||
catch(...)
|
||||
@ -183,12 +187,18 @@ bool PluginsManager::loadPlugins(const TCHAR *dir)
|
||||
generic_string msg = TEXT("Fail loaded");
|
||||
msg += TEXT("\n\n");
|
||||
msg += USERMSG;
|
||||
::MessageBox(NULL, msg.c_str(), dllNames[i].c_str(), MB_OK);
|
||||
if (::MessageBox(NULL, msg.c_str(), dllNames[i].c_str(), MB_YESNO) == IDYES)
|
||||
{
|
||||
dll2Remove.push_back(dllNames[i]);
|
||||
}
|
||||
delete pi;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (size_t j = 0 ; j < dll2Remove.size() ; j++)
|
||||
::DeleteFile(dll2Remove[j].c_str());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -110,7 +110,7 @@
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops;.\no_ms_shit.vsprops"
|
||||
CharacterSet="2"
|
||||
CharacterSet="1"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
|
Loading…
x
Reference in New Issue
Block a user