From f531ff887729783a7fe7a3e12ad12f658eefc7b0 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 4 Jun 2020 17:03:28 +0300 Subject: 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 --- plugins/CrashDumper/src/ui.cpp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'plugins/CrashDumper/src') diff --git a/plugins/CrashDumper/src/ui.cpp b/plugins/CrashDumper/src/ui.cpp index ff3a18e49f..7018e90521 100644 --- a/plugins/CrashDumper/src/ui.cpp +++ b/plugins/CrashDumper/src/ui.cpp @@ -22,13 +22,12 @@ class CViewVersionInfo : public CDlgBase { DWORD m_flags; - CCtrlButton m_btnCancel, m_btnCopyClip, m_btnCopyFile; + CCtrlButton m_btnCopyClip, m_btnCopyFile; CCtrlRichEdit m_redtViewVersionInfo; public: CViewVersionInfo(DWORD flags) : CDlgBase(g_plugin, IDD_VIEWVERSION), - m_btnCancel(this, IDCANCEL), m_btnCopyClip(this, IDC_CLIPVER), m_btnCopyFile(this, IDC_FILEVER), m_redtViewVersionInfo(this, IDC_VIEWVERSIONINFO) @@ -38,7 +37,6 @@ public: m_flags = flags; m_forceResizable = true; - m_btnCancel.OnClick = Callback(this, &CViewVersionInfo::OnCancelClick); m_btnCopyClip.OnClick = Callback(this, &CViewVersionInfo::OnCopyClipClick); m_btnCopyFile.OnClick = Callback(this, &CViewVersionInfo::OnCopyFileClick); m_redtViewVersionInfo.OnBuildMenu = Callback(this, &CViewVersionInfo::OnViewVersionInfoBuildMenu); @@ -78,7 +76,7 @@ public: return true; } - int Resizer(UTILRESIZECONTROL * urc) override + int Resizer(UTILRESIZECONTROL *urc) override { switch (urc->wId) { case IDC_VIEWVERSIONINFO: @@ -97,11 +95,6 @@ public: return RD_ANCHORX_LEFT | RD_ANCHORY_TOP; } - void OnCancelClick(CCtrlBase*) - { - Close(); - } - void OnCopyClipClick(CCtrlBase*) { CallService(MS_CRASHDUMPER_STORETOCLIP, 0, m_flags); @@ -286,7 +279,7 @@ LRESULT CALLBACK DlgProcPopup(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) void ShowMessage(int type, const wchar_t *format, ...) { - switch(type) { + switch (type) { case 1: case 3: if (!g_plugin.bSuccessPopups) -- cgit v1.2.3