diff options
author | George Hazan <ghazan@miranda.im> | 2019-02-05 22:44:42 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-02-05 22:44:42 +0300 |
commit | 768c3ba1f266ddbc136660fec35cb52d903e6e15 (patch) | |
tree | 3638d2df80a5d3efc160b0c96dfc6812adf946fb /src/mir_app | |
parent | 563aac340768af4f96fd74a3246098cc3bdf47e0 (diff) |
fixes #1823 (PluginUpdater: newly downloaded plugins aren't loaded when options are opened)
Diffstat (limited to 'src/mir_app')
-rw-r--r-- | src/mir_app/src/pluginopts.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/mir_app/src/pluginopts.cpp b/src/mir_app/src/pluginopts.cpp index 7663268de2..fb6cbf4318 100644 --- a/src/mir_app/src/pluginopts.cpp +++ b/src/mir_app/src/pluginopts.cpp @@ -37,7 +37,7 @@ struct PluginListItemData wchar_t fileName[MAX_PATH];
HINSTANCE hInst;
int flags, stdPlugin;
- bool bRequiresRestart, bWasLoaded;
+ bool bRequiresRestart, bWasLoaded, bWasChecked;
wchar_t *author, *description, *copyright, *homepage;
MUUID uuid;
@@ -135,8 +135,13 @@ static BOOL dialogListPlugins(WIN32_FIND_DATA *fd, wchar_t *path, WPARAM, LPARAM it.lParam = (LPARAM)dat;
int iRow = ListView_InsertItem(hwndList, &it);
- if (bNoCheckbox || isPluginOnWhiteList(fd->cFileName))
- ListView_SetItemState(hwndList, iRow, bNoCheckbox ? 0x3000 : 0x2000, LVIS_STATEIMAGEMASK);
+ if (bNoCheckbox) {
+ ListView_SetItemState(hwndList, iRow, 0x3000, LVIS_STATEIMAGEMASK);
+ }
+ else if (isPluginOnWhiteList(fd->cFileName)) {
+ dat->bWasChecked = true;
+ ListView_SetItemState(hwndList, iRow, 0x2000, LVIS_STATEIMAGEMASK);
+ }
if (iRow != -1) {
// column 2: plugin short name
@@ -307,6 +312,10 @@ public: m_szFilter.Empty();
enumPlugins(dialogListPlugins, (WPARAM)m_hwnd, (LPARAM)m_plugList.GetHwnd());
+ for (auto &it : arPluginList)
+ if (!it->bWasLoaded && it->bWasChecked && !it->hInst)
+ LoadPluginDynamically(it);
+
// sort out the headers
m_plugList.SetColumnWidth(0, LVSCW_AUTOSIZE); // dll name
int w = m_plugList.GetColumnWidth(0);
|