mirror of
https://github.com/HIllya51/LunaHook.git
synced 2024-11-27 07:44:02 +08:00
修改plugin顺序
This commit is contained in:
parent
49742b9ca7
commit
ec0a7623b4
@ -254,20 +254,17 @@ Pluginwindow::Pluginwindow(mainwindow*p,Pluginmanager* pl):mainwindow(p){
|
||||
auto f=pluginmanager->selectpluginfile();
|
||||
if(f.has_value()){
|
||||
if(pluginmanager->addplugin(f.value(),LOWORD(wparam)==IDM_ADD_QT_PLUGIN)){
|
||||
listplugins->deleteitem(listplugins->count()-1);
|
||||
listadd(f.value());
|
||||
listadd(L"InternalClipBoard");
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case IDM_REMOVE_PLUGIN:
|
||||
{
|
||||
|
||||
auto idx=listplugins->currentidx();
|
||||
if(idx==listplugins->count()-1)break;printf("??");
|
||||
if(idx==0)break;
|
||||
pluginmanager->remove((LPCWSTR)listplugins->getdata(idx));
|
||||
listplugins->deleteitem(idx);
|
||||
listplugins->deleteitem(idx-1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -54,7 +54,8 @@ void Pluginmanager::loadqtdlls(std::vector<std::wstring>&collectQtplugs){
|
||||
Pluginmanager::Pluginmanager(LunaHost* _host):host(_host){
|
||||
try {
|
||||
std::scoped_lock lock(OnNewSentenceSLock);
|
||||
|
||||
PluginRank.push_back(L"InternalClipBoard");
|
||||
OnNewSentenceS[L"InternalClipBoard"]=GetProcAddress(GetModuleHandle(0),"OnNewSentence");//内部链接的剪贴板插件
|
||||
auto plgs=host->configs->pluginsget();
|
||||
std::vector<std::wstring>collectQtplugs;
|
||||
for (auto i=0;i<plgs.size();i++) {
|
||||
@ -71,8 +72,7 @@ Pluginmanager::Pluginmanager(LunaHost* _host):host(_host){
|
||||
if(collectQtplugs.size()){
|
||||
loadqtdlls(collectQtplugs);
|
||||
}
|
||||
PluginRank.push_back(L"InternalClipBoard");
|
||||
OnNewSentenceS[L"InternalClipBoard"]=GetProcAddress(GetModuleHandle(0),"OnNewSentence");//内部链接的剪贴板插件
|
||||
|
||||
} catch (const std::exception& ex) {
|
||||
std::cerr << "Error: " << ex.what() << std::endl;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user