From a6b9f6570b4cb4a425f91d4694e6b027f12cc8b7 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 14 Nov 2018 15:57:47 +0300 Subject: hContact, MODULENAME -> g_plugin --- plugins/Popup/src/srmm_menu.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'plugins/Popup/src/srmm_menu.cpp') diff --git a/plugins/Popup/src/srmm_menu.cpp b/plugins/Popup/src/srmm_menu.cpp index 2ff5091fba..62f1d1403a 100644 --- a/plugins/Popup/src/srmm_menu.cpp +++ b/plugins/Popup/src/srmm_menu.cpp @@ -36,7 +36,7 @@ static void SrmmMenu_UpdateIcon(MCONTACT hContact) if (!hContact) return; - int mode = db_get_b(hContact, MODULENAME, "ShowMode", PU_SHOWMODE_AUTO); + int mode = g_plugin.getByte(hContact, "ShowMode", PU_SHOWMODE_AUTO); StatusIconData sid = {}; sid.szModule = MODULENAME; @@ -76,7 +76,7 @@ static int SrmmMenu_ProcessIconClick(WPARAM hContact, LPARAM lParam) if (!hContact) return 0; - int mode = db_get_b(hContact, MODULENAME, "ShowMode", PU_SHOWMODE_AUTO); + int mode = g_plugin.getByte(hContact, "ShowMode", PU_SHOWMODE_AUTO); if (sicd->flags & MBCF_RIGHTBUTTON) { HMENU hMenu = CreatePopupMenu(); @@ -90,12 +90,12 @@ static int SrmmMenu_ProcessIconClick(WPARAM hContact, LPARAM lParam) mode = TrackPopupMenu(hMenu, TPM_RETURNCMD, sicd->clickLocation.x, sicd->clickLocation.y, 0, WindowList_Find(hDialogsList, hContact), nullptr); if (mode) { - db_set_b(hContact, MODULENAME, "ShowMode", mode - 1); + g_plugin.setByte(hContact, "ShowMode", mode - 1); SrmmMenu_UpdateIcon(hContact); } } else { - db_set_b(hContact, MODULENAME, "ShowMode", (mode == PU_SHOWMODE_AUTO) ? PU_SHOWMODE_BLOCK : PU_SHOWMODE_AUTO); + g_plugin.setByte(hContact, "ShowMode", (mode == PU_SHOWMODE_AUTO) ? PU_SHOWMODE_BLOCK : PU_SHOWMODE_AUTO); SrmmMenu_UpdateIcon(hContact); } -- cgit v1.2.3