summaryrefslogtreecommitdiff
path: root/plugins/BossKeyPlus/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-03-06 16:15:45 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-03-06 16:15:55 +0300
commitf580be3d9dcccb14831d6bed9e7dfca600f5b6f8 (patch)
tree468913d477b9d2a9fb430df9a886d24a8cf41887 /plugins/BossKeyPlus/src
parent827dbce0a554ccc313fd0b14b45bd57dffeead95 (diff)
popups:
- internal implementation details & all service declarations moved to m_popup_int.h; - all service calls removed and replaced with function calls; - direct access to popup serttings replaced with Popup_Enable / Popup_Enabled;
Diffstat (limited to 'plugins/BossKeyPlus/src')
-rw-r--r--plugins/BossKeyPlus/src/BossKey.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins/BossKeyPlus/src/BossKey.cpp b/plugins/BossKeyPlus/src/BossKey.cpp
index f2212539c2..b247bb4ef6 100644
--- a/plugins/BossKeyPlus/src/BossKey.cpp
+++ b/plugins/BossKeyPlus/src/BossKey.cpp
@@ -262,7 +262,7 @@ static void CreateTrayIcon(bool create)
static void RestoreOldSettings(void)
{
if (g_bOldSetting & OLD_POPUP)
- CallService(MS_POPUP_QUERY, PUQS_ENABLEPOPUPS, 0);
+ Popup_Enable(true);
if (g_bOldSetting & OLD_SOUND)
db_set_b(0, "Skin", "UseSound", 1);
@@ -331,10 +331,10 @@ LRESULT CALLBACK ListenWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPara
CreateTrayIcon(true);
// disable popups
- if (CallService(MS_POPUP_QUERY, PUQS_GETSTATUS, 0) == 1) {
+ if (Popup_Enabled()) {
// save current
g_bOldSetting |= OLD_POPUP;
- CallService(MS_POPUP_QUERY, PUQS_DISABLEPOPUPS, 0);
+ Popup_Enable(false);
}
// disable sounds
@@ -667,13 +667,13 @@ int CMPlugin::Load()
if ((g_bOldSetting & OLD_POPUP) && !(g_wMaskAdv & OPT_RESTORE)) // Restore popup settings if Miranda was crushed or killed in hidden mode and "Restore hiding on startup after failure" option is disabled
{
- if (db_get_b(0, "Popup", "ModuleIsEnabled", 1) == 0)
- db_set_b(0, "Popup", "ModuleIsEnabled", 1);
+ if (Popup_Enabled() == 0)
+ Popup_Enable(true);
}
- if (g_wMaskAdv & OPT_HIDEONSTART && db_get_b(0, "Popup", "ModuleIsEnabled", 0)) // hack for disabling popup on startup if "Hide Miranda on startup" is enabled
+ if (g_wMaskAdv & OPT_HIDEONSTART && Popup_Enabled()) // hack for disabling popup on startup if "Hide Miranda on startup" is enabled
{
g_bOldSetting |= OLD_POPUP;
- db_set_b(0, "Popup", "ModuleIsEnabled", 0);
+ Popup_Enable(false);
}
g_plugin.registerIcon("BossKey", iconList);