summaryrefslogtreecommitdiff
path: root/plugins/Quotes/src/WinCtrlHelper.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-02-25 13:36:37 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-02-25 13:36:37 +0000
commit42095fb5cb7228f9dfb94965988029fd7f47b793 (patch)
tree6185ec5d7450fb474ed80b0ce95d0d1c0e0b26a8 /plugins/Quotes/src/WinCtrlHelper.cpp
parent8e891173c74ceaa0964f32be247f380fd5f8bcd1 (diff)
Quotes: major code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@16335 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Quotes/src/WinCtrlHelper.cpp')
-rw-r--r--plugins/Quotes/src/WinCtrlHelper.cpp25
1 files changed, 10 insertions, 15 deletions
diff --git a/plugins/Quotes/src/WinCtrlHelper.cpp b/plugins/Quotes/src/WinCtrlHelper.cpp
index 3edd248631..9ca18a6811 100644
--- a/plugins/Quotes/src/WinCtrlHelper.cpp
+++ b/plugins/Quotes/src/WinCtrlHelper.cpp
@@ -1,14 +1,11 @@
#include "stdafx.h"
-namespace
+static INT_PTR CALLBACK VariableListDlgProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp)
{
- INT_PTR CALLBACK VariableListDlgProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp)
- {
- switch (msg)
+ switch (msg) {
+ case WM_INITDIALOG:
+ TranslateDialogDefault(hWnd);
{
- case WM_INITDIALOG:
- {
- TranslateDialogDefault(hWnd);
const IQuotesProvider* pProvider = reinterpret_cast<const IQuotesProvider*>(lp);
CQuotesProviderVisitorFormatSpecificator visitor;
pProvider->Accept(visitor);
@@ -23,16 +20,14 @@ namespace
::SetDlgItemText(hWnd, IDC_EDIT_VARIABLE, o.str().c_str());
}
break;
- case WM_COMMAND:
- if (BN_CLICKED == HIWORD(wp) && (IDOK == LOWORD(wp) || IDCANCEL == LOWORD(wp)))
- {
- ::EndDialog(hWnd, IDOK);
- }
- break;
- }
- return FALSE;
+ case WM_COMMAND:
+ if (BN_CLICKED == HIWORD(wp) && (IDOK == LOWORD(wp) || IDCANCEL == LOWORD(wp)))
+ ::EndDialog(hWnd, IDOK);
+ break;
}
+
+ return FALSE;
}
void show_variable_list(HWND hwndParent, const IQuotesProvider* pProvider)