diff options
author | George Hazan <ghazan@miranda.im> | 2020-06-04 17:03:28 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-06-04 17:03:28 +0300 |
commit | f531ff887729783a7fe7a3e12ad12f658eefc7b0 (patch) | |
tree | 9e1844429448b6527ef7ca87163e44eafce250d8 /plugins/PluginUpdater | |
parent | 1c2e5d128a7176ae827dda1e2a8fcc64e772a148 (diff) |
UI classes:
- CDlgBase::m_bSucceeded variable introduced to check whether IDOK was pressed or not;
- unused/useless buttons with id=IDOK or IDCANCEL removed;
- brnOk.OnClick replaced with OnApply calls;
- unused/useless calls of EndDialog/EndModal removed;
- minor code cleaning
Diffstat (limited to 'plugins/PluginUpdater')
-rw-r--r-- | plugins/PluginUpdater/src/DlgListNew.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/plugins/PluginUpdater/src/DlgListNew.cpp b/plugins/PluginUpdater/src/DlgListNew.cpp index b264635d05..53cf844391 100644 --- a/plugins/PluginUpdater/src/DlgListNew.cpp +++ b/plugins/PluginUpdater/src/DlgListNew.cpp @@ -128,11 +128,9 @@ public: m_list(this, IDC_LIST_UPDATES),
m_filter(this, IDC_SEARCH)
{
- m_autoClose = CLOSE_ON_CANCEL;
SetParent(GetDesktopWindow());
SetMinSize(370, 300);
- btnOk.OnClick = Callback(this, &CMissingPLuginsDlg::onClick_Ok);
btnNone.OnClick = Callback(this, &CMissingPLuginsDlg::onClick_None);
m_filter.OnChange = Callback(this, &CMissingPLuginsDlg::onChange_Filter);
@@ -211,6 +209,14 @@ public: return true;
}
+ bool OnApply() override
+ {
+ btnOk.Disable();
+ btnNone.Disable();
+ mir_forkthread(ApplyDownloads, this);
+ return false; // do not allow a dialog to close
+ }
+
void OnDestroy() override
{
Utils_SaveWindowPosition(m_hwnd, NULL, MODULENAME, "ListWindow");
@@ -260,13 +266,6 @@ public: }
}
- void onClick_Ok(CCtrlButton *)
- {
- btnOk.Disable();
- btnNone.Disable();
- mir_forkthread(ApplyDownloads, this);
- }
-
void onClick_None(CCtrlButton *)
{
SelectAll(false);
|