diff options
author | George Hazan <ghazan@miranda.im> | 2018-11-14 15:57:47 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-11-14 15:57:47 +0300 |
commit | a6b9f6570b4cb4a425f91d4694e6b027f12cc8b7 (patch) | |
tree | 86960597fbdc0025b12c4e87b8b536dd3d9910fb /plugins/Popup/src/srmm_menu.cpp | |
parent | 28b81bbed5d8db354349fd787c3db4123e55d423 (diff) |
hContact, MODULENAME -> g_plugin
Diffstat (limited to 'plugins/Popup/src/srmm_menu.cpp')
-rw-r--r-- | plugins/Popup/src/srmm_menu.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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);
}
|