diff options
author | George Hazan <george.hazan@gmail.com> | 2014-03-22 10:56:59 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-03-22 10:56:59 +0000 |
commit | bf32fe960ac49741980c99e30b2a174acb7fdd70 (patch) | |
tree | caf16283b2c5ca6322a02a47479bad97f88f7f57 /plugins | |
parent | b8911512f8350007c79bad0bdaf77b6f3552b807 (diff) |
- fix for the edit window subclassing;
- fix for the strange database write
git-svn-id: http://svn.miranda-ng.org/main/trunk@8681 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/DbEditorPP/src/settinglist.cpp | 27 |
1 files changed, 3 insertions, 24 deletions
diff --git a/plugins/DbEditorPP/src/settinglist.cpp b/plugins/DbEditorPP/src/settinglist.cpp index 82e7ff0694..1cb5f3975f 100644 --- a/plugins/DbEditorPP/src/settinglist.cpp +++ b/plugins/DbEditorPP/src/settinglist.cpp @@ -292,8 +292,6 @@ void settingChanged(HWND hwnd2Settings, MCONTACT hContact, char* module, char* s additem(hwnd2Settings, hContact, module, setting, lvItem.iItem);
}
-static WNDPROC SettingLabelEditSubClass;
-
struct EditLabelInfoStruct
{
MCONTACT hContact;
@@ -372,26 +370,7 @@ static LRESULT CALLBACK SettingLabelEditSubClassProc(HWND hwnd,UINT msg,WPARAM w SendMessage(hwnd, WM_COMMAND, MAKEWPARAM(IDCANCEL, 0), 0);
return 0;
}
- switch (dbv.type) {
- case DBVT_UTF8:
- db_set_utf(info->hContact, info->module, value, dbv.pszVal);
- break;
- case DBVT_ASCIIZ:
- db_set_s(info->hContact, info->module, value, dbv.pszVal);
- break;
- case DBVT_BYTE:
- db_set_b(info->hContact, info->module, value, dbv.bVal);
- break;
- case DBVT_WORD:
- db_set_w(info->hContact, info->module, value, dbv.wVal);
- break;
- case DBVT_DWORD:
- db_set_dw(info->hContact, info->module, value, dbv.dVal);
- break;
- case DBVT_BLOB:
- db_set_blob(info->hContact, info->module, value, dbv.pbVal, dbv.cpbVal);
- break;
- }
+ db_set(info->hContact, info->module, value, &dbv);
db_unset(info->hContact, info->module, info->setting);
{
LVFINDINFO lvfi;
@@ -555,7 +534,7 @@ static LRESULT CALLBACK SettingLabelEditSubClassProc(HWND hwnd,UINT msg,WPARAM w case WM_GETDLGCODE:
return DLGC_WANTALLKEYS;
}
- return CallWindowProcW(SettingLabelEditSubClass, hwnd, msg, wParam, lParam);
+ return mir_callNextSubclass(hwnd, SettingLabelEditSubClassProc, msg, wParam, lParam);
}
void EditLabel(HWND hwnd2List, int item, int subitem)
@@ -659,7 +638,7 @@ void EditLabel(HWND hwnd2List, int item, int subitem) db_free(&dbv);
- SettingLabelEditSubClass = (WNDPROC)SetWindowLongPtr(info->hwnd2Edit, GWLP_WNDPROC, (LONG_PTR)SettingLabelEditSubClassProc);
+ mir_subclassWindow(info->hwnd2Edit, SettingLabelEditSubClassProc);
SendMessage(info->hwnd2Edit, WM_USER, 0, (LPARAM)data);
}
|