diff options
author | George Hazan <george.hazan@gmail.com> | 2012-06-21 15:55:31 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-06-21 15:55:31 +0000 |
commit | 07f927e7b12dae0cab662b168c8fb41dd6ec8b34 (patch) | |
tree | 4555390f6b8202254340882bcc12877b39e80df7 /src | |
parent | 8fae64116820207e15c5503532d6604cf6668fea (diff) |
minor fix for hotkeys editor
git-svn-id: http://svn.miranda-ng.org/main/trunk@511 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/skin/hotkey_opts.cpp | 8 | ||||
-rw-r--r-- | src/modules/skin/hotkeys.cpp | 6 | ||||
-rw-r--r-- | src/modules/skin/skin.h | 2 |
3 files changed, 10 insertions, 6 deletions
diff --git a/src/modules/skin/hotkey_opts.cpp b/src/modules/skin/hotkey_opts.cpp index 4f6ffefd45..929bb8be74 100644 --- a/src/modules/skin/hotkey_opts.cpp +++ b/src/modules/skin/hotkey_opts.cpp @@ -161,6 +161,14 @@ void HotkeyEditCreate(HWND hwnd) data->oldWndProc = (WNDPROC)SetWindowLongPtr(hwnd, GWLP_WNDPROC, (ULONG_PTR)sttHotkeyEditProc);
}
+void HotkeyEditDestroy(HWND hwnd)
+{
+ THotkeyBoxData *data = (THotkeyBoxData *)GetWindowLongPtr(hwnd, GWLP_USERDATA);
+ SetWindowLongPtr(hwnd, GWLP_WNDPROC, (ULONG_PTR)data->oldWndProc);
+ SetWindowLongPtr(hwnd, GWLP_USERDATA, 0);
+ mir_free(data);
+}
+
///////////////////////////////////////////////////////////////////////////////
// Options
diff --git a/src/modules/skin/hotkeys.cpp b/src/modules/skin/hotkeys.cpp index 800947cd0a..76a31b6f2e 100644 --- a/src/modules/skin/hotkeys.cpp +++ b/src/modules/skin/hotkeys.cpp @@ -122,11 +122,7 @@ static INT_PTR svcHotkeySubclass(WPARAM wParam, LPARAM) static INT_PTR svcHotkeyUnsubclass(WPARAM wParam, LPARAM)
{
- HWND hwnd = (HWND)wParam;
- THotkeyBoxData *data = (THotkeyBoxData *)GetWindowLongPtr(hwnd, GWLP_USERDATA);
- SetWindowLongPtr(hwnd, GWLP_WNDPROC, (ULONG_PTR)data->oldWndProc);
- SetWindowLongPtr(hwnd, GWLP_USERDATA, 0);
- mir_free(data);
+ HotkeyEditDestroy((HWND)wParam);
return 0;
}
diff --git a/src/modules/skin/skin.h b/src/modules/skin/skin.h index 9ce06a6cc1..274b0d82df 100644 --- a/src/modules/skin/skin.h +++ b/src/modules/skin/skin.h @@ -72,4 +72,4 @@ void RegisterHotkeys(); void UnregisterHotkeys();
void HotkeyEditCreate(HWND hwnd);
-void tHotkeyEditDestroy(HWND hwnd);
+void HotkeyEditDestroy(HWND hwnd);
|