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 <shlwapi.h>
|
||||||
#include "PluginsManager.h"
|
#include "PluginsManager.h"
|
||||||
|
|
||||||
const TCHAR * USERMSG = TEXT("This plugin is not compatible with current version of Notepad++.\n\
|
const TCHAR * USERMSG = TEXT("This plugin is not compatible with current version of Notepad++.\n\n\
|
||||||
Remove this plugin from plugins directory if you don't want to see this message on the next launch time.");
|
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)
|
bool PluginsManager::loadPlugins(const TCHAR *dir)
|
||||||
{
|
{
|
||||||
@ -27,6 +27,7 @@ bool PluginsManager::loadPlugins(const TCHAR *dir)
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
vector<generic_string> dllNames;
|
vector<generic_string> dllNames;
|
||||||
|
vector<generic_string> dll2Remove;
|
||||||
const TCHAR *pNppPath = (NppParameters::getInstance())->getNppPath();
|
const TCHAR *pNppPath = (NppParameters::getInstance())->getNppPath();
|
||||||
|
|
||||||
generic_string pluginsFullPathFilter = (dir && dir[0])?dir:pNppPath;
|
generic_string pluginsFullPathFilter = (dir && dir[0])?dir:pNppPath;
|
||||||
@ -175,7 +176,10 @@ bool PluginsManager::loadPlugins(const TCHAR *dir)
|
|||||||
{
|
{
|
||||||
s += TEXT("\n\n");
|
s += TEXT("\n\n");
|
||||||
s += USERMSG;
|
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;
|
delete pi;
|
||||||
}
|
}
|
||||||
catch(...)
|
catch(...)
|
||||||
@ -183,12 +187,18 @@ bool PluginsManager::loadPlugins(const TCHAR *dir)
|
|||||||
generic_string msg = TEXT("Fail loaded");
|
generic_string msg = TEXT("Fail loaded");
|
||||||
msg += TEXT("\n\n");
|
msg += TEXT("\n\n");
|
||||||
msg += USERMSG;
|
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;
|
delete pi;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (size_t j = 0 ; j < dll2Remove.size() ; j++)
|
||||||
|
::DeleteFile(dll2Remove[j].c_str());
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -110,7 +110,7 @@
|
|||||||
IntermediateDirectory="Release"
|
IntermediateDirectory="Release"
|
||||||
ConfigurationType="1"
|
ConfigurationType="1"
|
||||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops;.\no_ms_shit.vsprops"
|
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops;.\no_ms_shit.vsprops"
|
||||||
CharacterSet="2"
|
CharacterSet="1"
|
||||||
WholeProgramOptimization="1"
|
WholeProgramOptimization="1"
|
||||||
>
|
>
|
||||||
<Tool
|
<Tool
|
||||||
|
Loading…
x
Reference in New Issue
Block a user