summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2016-02-07 19:58:25 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2016-02-07 19:58:25 +0000
commitba6ef9fbed9e7ea74794044dbfed040eae74cc33 (patch)
tree242d6a05bb3ebcd972871a38e9afa92046e6de30
parente96ff917bb98563a2397eca71c51a273e46d9dcd (diff)
git-svn-id: http://svn.miranda-ng.org/main/trunk@16244 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--plugins/Dbx_mdb/src/commonheaders.h2
-rw-r--r--plugins/Dbx_mdb/src/dbintf.cpp2
-rw-r--r--plugins/Dbx_mdb/src/ui.cpp32
3 files changed, 18 insertions, 18 deletions
diff --git a/plugins/Dbx_mdb/src/commonheaders.h b/plugins/Dbx_mdb/src/commonheaders.h
index 47162af580..8a184fbf4c 100644
--- a/plugins/Dbx_mdb/src/commonheaders.h
+++ b/plugins/Dbx_mdb/src/commonheaders.h
@@ -26,6 +26,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#pragma warning(disable:4509)
+#define SIZEOF(x) _countof(x)
+
#include <windows.h>
#include <time.h>
#include <process.h>
diff --git a/plugins/Dbx_mdb/src/dbintf.cpp b/plugins/Dbx_mdb/src/dbintf.cpp
index b42bbcb7d3..b0ab3a2b01 100644
--- a/plugins/Dbx_mdb/src/dbintf.cpp
+++ b/plugins/Dbx_mdb/src/dbintf.cpp
@@ -53,7 +53,7 @@ CDbxMdb::CDbxMdb(const TCHAR *tszFileName, int iMode) :
mdb_env_create(&m_pMdbEnv);
mdb_env_set_maxdbs(m_pMdbEnv, 10);
- m_codePage = CallService(MS_LANGPACK_GETCODEPAGE, 0, 0);
+ m_codePage = Langpack_GetDefaultCodePage();
m_hModHeap = HeapCreate(0, 0, 0);
}
diff --git a/plugins/Dbx_mdb/src/ui.cpp b/plugins/Dbx_mdb/src/ui.cpp
index dcd5da8f08..fe1059a7de 100644
--- a/plugins/Dbx_mdb/src/ui.cpp
+++ b/plugins/Dbx_mdb/src/ui.cpp
@@ -160,7 +160,7 @@ static INT_PTR CALLBACK sttChangePassword(HWND hwndDlg, UINT uMsg, WPARAM wParam
switch (uMsg) {
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
- SendDlgItemMessage(hwndDlg, IDC_HEADERBAR, WM_SETICON, ICON_SMALL, (LPARAM)Skin_GetIconByHandle(iconList[0].hIcolib, true));
+ SendDlgItemMessage(hwndDlg, IDC_HEADERBAR, WM_SETICON, ICON_SMALL, (LPARAM)IcoLib_GetIconByHandle(iconList[0].hIcolib, true));
param = (DlgChangePassParam*)lParam;
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam);
@@ -230,7 +230,7 @@ static INT_PTR CALLBACK sttChangePassword(HWND hwndDlg, UINT uMsg, WPARAM wParam
case WM_DESTROY:
KillTimer(hwndDlg, 1);
- Skin_ReleaseIcon((HICON)SendMessage(hwndDlg, WM_GETICON, ICON_SMALL, 0));
+ IcoLib_ReleaseIcon((HICON)SendMessage(hwndDlg, WM_GETICON, ICON_SMALL, 0));
}
return FALSE;
@@ -300,11 +300,7 @@ static int OnOptionsInit(PVOID obj, WPARAM wParam, LPARAM)
void CDbxMdb::UpdateMenuItem()
{
- CLISTMENUITEM mi = { sizeof(mi) };
- mi.flags = CMIM_NAME;
- mi.icolibItem = iconList[1].hIcolib;
- mi.pszName = GetMenuTitle();
- Menu_ModifyItem(hSetPwdMenu, &mi);
+ Menu_ModifyItem(hSetPwdMenu, _A2T(GetMenuTitle()), iconList[1].hIcolib);
}
static int OnModulesLoaded(PVOID obj, WPARAM, LPARAM)
@@ -316,16 +312,18 @@ static int OnModulesLoaded(PVOID obj, WPARAM, LPARAM)
HookEventObj(ME_OPT_INITIALISE, OnOptionsInit, db);
// main menu item
- CLISTMENUITEM mi = { sizeof(mi) };
- mi.pszName = LPGEN("Database");
- mi.position = 500000000;
- mi.flags = CMIF_ROOTHANDLE;
- mi.icolibItem = iconList[0].hIcolib;
- HGENMENU hMenuRoot = Menu_AddMainMenuItem(&mi);
-
- mi.icolibItem = iconList[1].hIcolib;
- mi.pszName = db->GetMenuTitle();
- mi.hParentMenu = hMenuRoot;
+ // main menu item
+ CMenuItem mi;
+
+ // main menu item
+ mi.root = Menu_CreateRoot(MO_MAIN, LPGENT("Database"), 500000000, iconList[0].hIcolib);
+ Menu_ConfigureItem(mi.root, MCI_OPT_UID, "F7C5567C-D1EE-484B-B4F6-24677A5AAAEF");
+
+ SET_UID(mi, 0x50321866, 0xba1, 0x46dd, 0xb3, 0xa6, 0xc3, 0xcc, 0x55, 0xf2, 0x42, 0x9e);
+ mi.flags = CMIF_TCHAR;
+ mi.hIcolibItem = iconList[1].hIcolib;
+ _A2T tszTitle(db->GetMenuTitle());
+ mi.name.t = tszTitle;
mi.pszService = MS_DB_CHANGEPASSWORD;
hSetPwdMenu = Menu_AddMainMenuItem(&mi);
return 0;