mirror of
https://github.com/HIllya51/LunaHook.git
synced 2024-10-22 23:18:16 +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();
|
auto f=pluginmanager->selectpluginfile();
|
||||||
if(f.has_value()){
|
if(f.has_value()){
|
||||||
if(pluginmanager->addplugin(f.value(),LOWORD(wparam)==IDM_ADD_QT_PLUGIN)){
|
if(pluginmanager->addplugin(f.value(),LOWORD(wparam)==IDM_ADD_QT_PLUGIN)){
|
||||||
listplugins->deleteitem(listplugins->count()-1);
|
|
||||||
listadd(f.value());
|
listadd(f.value());
|
||||||
listadd(L"InternalClipBoard");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case IDM_REMOVE_PLUGIN:
|
case IDM_REMOVE_PLUGIN:
|
||||||
{
|
{
|
||||||
|
|
||||||
auto idx=listplugins->currentidx();
|
auto idx=listplugins->currentidx();
|
||||||
if(idx==listplugins->count()-1)break;printf("??");
|
if(idx==0)break;
|
||||||
pluginmanager->remove((LPCWSTR)listplugins->getdata(idx));
|
pluginmanager->remove((LPCWSTR)listplugins->getdata(idx));
|
||||||
listplugins->deleteitem(idx);
|
listplugins->deleteitem(idx-1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -54,7 +54,8 @@ void Pluginmanager::loadqtdlls(std::vector<std::wstring>&collectQtplugs){
|
|||||||
Pluginmanager::Pluginmanager(LunaHost* _host):host(_host){
|
Pluginmanager::Pluginmanager(LunaHost* _host):host(_host){
|
||||||
try {
|
try {
|
||||||
std::scoped_lock lock(OnNewSentenceSLock);
|
std::scoped_lock lock(OnNewSentenceSLock);
|
||||||
|
PluginRank.push_back(L"InternalClipBoard");
|
||||||
|
OnNewSentenceS[L"InternalClipBoard"]=GetProcAddress(GetModuleHandle(0),"OnNewSentence");//内部链接的剪贴板插件
|
||||||
auto plgs=host->configs->pluginsget();
|
auto plgs=host->configs->pluginsget();
|
||||||
std::vector<std::wstring>collectQtplugs;
|
std::vector<std::wstring>collectQtplugs;
|
||||||
for (auto i=0;i<plgs.size();i++) {
|
for (auto i=0;i<plgs.size();i++) {
|
||||||
@ -71,8 +72,7 @@ Pluginmanager::Pluginmanager(LunaHost* _host):host(_host){
|
|||||||
if(collectQtplugs.size()){
|
if(collectQtplugs.size()){
|
||||||
loadqtdlls(collectQtplugs);
|
loadqtdlls(collectQtplugs);
|
||||||
}
|
}
|
||||||
PluginRank.push_back(L"InternalClipBoard");
|
|
||||||
OnNewSentenceS[L"InternalClipBoard"]=GetProcAddress(GetModuleHandle(0),"OnNewSentence");//内部链接的剪贴板插件
|
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
std::cerr << "Error: " << ex.what() << std::endl;
|
std::cerr << "Error: " << ex.what() << std::endl;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user