diff options
-rw-r--r-- | src/mir_app/src/options.cpp | 8 | ||||
-rw-r--r-- | src/mir_app/src/pluginopts.cpp | 13 |
2 files changed, 9 insertions, 12 deletions
diff --git a/src/mir_app/src/options.cpp b/src/mir_app/src/options.cpp index 7c36c04fb3..c6780393f2 100644 --- a/src/mir_app/src/options.cpp +++ b/src/mir_app/src/options.cpp @@ -842,6 +842,9 @@ public: PSHNOTIFY pshn = {};
pshn.hdr.code = PSN_APPLY;
for (auto &p : m_arOpd) {
+ if (p == nullptr)
+ continue;
+
if (p->getHwnd() == nullptr || !p->bChanged)
continue;
@@ -1087,7 +1090,6 @@ public: delete it;
m_arOpd.remove(idx);
}
- m_arDeleted.destroy();
RebuildPageTree();
}
@@ -1133,8 +1135,10 @@ public: }
m_arDeleted.insert(opd);
- m_timerRebuild.Start(50);
}
+
+ if (m_arDeleted.getCount())
+ m_timerRebuild.Start(50);
}
};
diff --git a/src/mir_app/src/pluginopts.cpp b/src/mir_app/src/pluginopts.cpp index 9ace80867a..2776b4635d 100644 --- a/src/mir_app/src/pluginopts.cpp +++ b/src/mir_app/src/pluginopts.cpp @@ -227,7 +227,6 @@ class CPluginOptDlg : public CDlgBase CMStringW m_szFilter;
bool needRestart = false;
- CMStringW wszMsgRestart;
CMStringA szUrl;
public:
@@ -356,16 +355,10 @@ public: LoadStdPlugins();
ShowWindow(GetDlgItem(m_hwnd, IDC_RESTART), needRestart);
- if (needRestart)
- wszMsgRestart = bufRestart;
- }
-
- virtual void OnClose() override
- {
if (needRestart) {
- wszMsgRestart.AppendChar('\n');
- wszMsgRestart.Append(TranslateT("Do you want to restart it now?"));
- if (MessageBox(m_hwnd, wszMsgRestart, L"Miranda NG", MB_ICONWARNING | MB_YESNO) == IDYES)
+ bufRestart.AppendChar('\n');
+ bufRestart.Append(TranslateT("Do you want to restart it now?"));
+ if (MessageBox(m_hwnd, bufRestart, L"Miranda NG", MB_ICONWARNING | MB_YESNO) == IDYES)
CallService(MS_SYSTEM_RESTART, 1, 0);
}
}
|