summaryrefslogtreecommitdiff
path: root/plugins/TrafficCounter/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-03-05 21:10:22 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-03-05 21:10:22 +0300
commitd9fddc0cfa9066eb1b5ad3f4807b37426ae6ca88 (patch)
treef09baaf9b91477d009cedc5bd77449b0fa3e3af7 /plugins/TrafficCounter/src
parent8a1ff32e54b39ceef22df61bda17bbfda94918fc (diff)
Popup:
- wiping out checks for service presence; - code cleaning
Diffstat (limited to 'plugins/TrafficCounter/src')
-rw-r--r--plugins/TrafficCounter/src/TrafficCounter.cpp5
-rw-r--r--plugins/TrafficCounter/src/options.cpp14
-rw-r--r--plugins/TrafficCounter/src/stdafx.h2
3 files changed, 8 insertions, 13 deletions
diff --git a/plugins/TrafficCounter/src/TrafficCounter.cpp b/plugins/TrafficCounter/src/TrafficCounter.cpp
index c79ab478d2..9fd318ab9b 100644
--- a/plugins/TrafficCounter/src/TrafficCounter.cpp
+++ b/plugins/TrafficCounter/src/TrafficCounter.cpp
@@ -30,7 +30,7 @@ HWND TrafficHwnd;
CMPlugin g_plugin;
-BOOL bPopupExists = FALSE, bVariablesExists = FALSE, bTooltipExists = FALSE;
+BOOL bVariablesExists = FALSE, bTooltipExists = FALSE;
static wchar_t wszDefaultFormat[] =
_A2W("{I4}\x0D\x0A\x0A\
@@ -147,7 +147,6 @@ int TrafficCounterShutdown(WPARAM, LPARAM)
int ModuleLoad(WPARAM, LPARAM)
{
- bPopupExists = ServiceExists(MS_POPUP_ADDPOPUPW);
bVariablesExists = ServiceExists(MS_VARS_FORMATSTRING) && ServiceExists(MS_VARS_REGISTERTOKEN);
bTooltipExists = ServiceExists("mToolTip/ShowTipW") || ServiceExists("mToolTip/ShowTip");
return 0;
@@ -872,8 +871,6 @@ void Traffic_AddMainMenuItem(void)
/*-------------------------------------------------------------------------------------------------------------------*/
void UpdateNotifyTimer(void)
{
- if (!bPopupExists) return;
-
if (Traffic_Notify_time_value && unOptions.NotifyByTime)
SetTimer(TrafficHwnd, TIMER_NOTIFY_TICK, Traffic_Notify_time_value * 1000 * 60, nullptr);
else
diff --git a/plugins/TrafficCounter/src/options.cpp b/plugins/TrafficCounter/src/options.cpp
index 796dc87623..c419323d75 100644
--- a/plugins/TrafficCounter/src/options.cpp
+++ b/plugins/TrafficCounter/src/options.cpp
@@ -359,13 +359,11 @@ int TrafficCounterOptInitialise(WPARAM wParam, LPARAM)
g_plugin.addOptions(wParam, &odp);
// Popups option page
- if (bPopupExists) {
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_TRAFFIC_POPUPS);
- odp.szGroup.a = LPGEN("Popups");
- odp.szTitle.a = LPGEN("Traffic counter");
- odp.pfnDlgProc = DlgProcPopupsTraffic;
- odp.flags = ODPF_BOLDGROUPS;
- g_plugin.addOptions(wParam, &odp);
- }
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_TRAFFIC_POPUPS);
+ odp.szGroup.a = LPGEN("Popups");
+ odp.szTitle.a = LPGEN("Traffic counter");
+ odp.pfnDlgProc = DlgProcPopupsTraffic;
+ odp.flags = ODPF_BOLDGROUPS;
+ g_plugin.addOptions(wParam, &odp);
return 0;
}
diff --git a/plugins/TrafficCounter/src/stdafx.h b/plugins/TrafficCounter/src/stdafx.h
index 15037b21cd..01fc381ec8 100644
--- a/plugins/TrafficCounter/src/stdafx.h
+++ b/plugins/TrafficCounter/src/stdafx.h
@@ -165,7 +165,7 @@ extern char Traffic_AdditionSpace;
extern wchar_t Traffic_CounterFormat[512];
extern wchar_t Traffic_TooltipFormat[512];
-extern BOOL bPopupExists, bVariablesExists, bTooltipExists;
+extern BOOL bVariablesExists, bTooltipExists;
extern BOOL UseKeyColor;
extern COLORREF KeyColor;