summaryrefslogtreecommitdiff
path: root/src/mir_app
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2021-05-09 18:45:30 +0300
committerGeorge Hazan <ghazan@miranda.im>2021-05-10 19:46:05 +0300
commit50c2fbbb1f7f6f233c980d7e4a52151fb72820f7 (patch)
tree349bc156e11357e68e2814778e7e4287eae43b3b /src/mir_app
parent0943ae89e869ded753e5fbc5b64dca458a8f31b8 (diff)
suddenly: tipper services were used as string constants
(cherry picked from commit 15fcbbc128178ea5a4cdb1a58927a43ea740be88)
Diffstat (limited to 'src/mir_app')
-rw-r--r--src/mir_app/src/clisttray.cpp11
-rw-r--r--src/mir_app/src/srmm_base.cpp10
-rw-r--r--src/mir_app/src/stdafx.h1
3 files changed, 11 insertions, 11 deletions
diff --git a/src/mir_app/src/clisttray.cpp b/src/mir_app/src/clisttray.cpp
index 01113088b2..adaa0dab15 100644
--- a/src/mir_app/src/clisttray.cpp
+++ b/src/mir_app/src/clisttray.cpp
@@ -36,7 +36,7 @@ mir_cs trayLockCS;
static bool hasTips()
{
- return ServiceExists("mToolTip/ShowTip") && db_get_b(0, "Tipper", "TrayTip", 1);
+ return ServiceExists(MS_TIPPER_SHOWTIPW) && db_get_b(0, "Tipper", "TrayTip", 1);
}
#define initcheck if (!fTrayInited) return
@@ -602,7 +602,7 @@ static void CALLBACK TrayHideToolTipTimerProc(HWND hwnd, UINT, UINT_PTR, DWORD)
POINT pt;
GetCursorPos(&pt);
if (abs(pt.x - tray_hover_pos.x) > TOOLTIP_TOLERANCE || abs(pt.y - tray_hover_pos.y) > TOOLTIP_TOLERANCE) {
- CallService("mToolTip/HideTip", 0, 0);
+ Tipper_Hide();
g_trayTooltipActive = false;
KillTimer(hwnd, TIMERID_TRAYHOVER_2);
}
@@ -628,8 +628,7 @@ static void CALLBACK TrayToolTipTimerProc(HWND hwnd, UINT, UINT_PTR id, DWORD)
ti.rcItem.top = pt.y - 10;
ti.rcItem.bottom = pt.y + 10;
ti.isTreeFocused = GetFocus() == g_clistApi.hwndContactList ? 1 : 0;
- if (CallService("mToolTip/ShowTipW", (WPARAM)szTipCur, (LPARAM)&ti) == CALLSERVICE_NOTFOUND)
- CallService("mToolTip/ShowTip", (WPARAM)(char*)_T2A(szTipCur), (LPARAM)&ti);
+ Tipper_ShowTip(szTipCur, &ti);
GetCursorPos(&tray_hover_pos);
SetTimer(g_clistApi.hwndContactList, TIMERID_TRAYHOVER_2, 600, TrayHideToolTipTimerProc);
@@ -670,7 +669,7 @@ INT_PTR fnTrayIconProcessMessage(WPARAM wParam, LPARAM lParam)
case TIM_CALLBACK:
if (msg->lParam == WM_RBUTTONDOWN || msg->lParam == WM_LBUTTONDOWN || msg->lParam == WM_RBUTTONDOWN && g_trayTooltipActive) {
- CallService("mToolTip/HideTip", 0, 0);
+ Tipper_Hide();
g_trayTooltipActive = false;
}
@@ -730,7 +729,7 @@ INT_PTR fnTrayIconProcessMessage(WPARAM wParam, LPARAM lParam)
POINT pt;
GetCursorPos(&pt);
if (abs(pt.x - tray_hover_pos.x) > TOOLTIP_TOLERANCE || abs(pt.y - tray_hover_pos.y) > TOOLTIP_TOLERANCE) {
- CallService("mToolTip/HideTip", 0, 0);
+ Tipper_Hide();
g_trayTooltipActive = false;
ReleaseCapture();
}
diff --git a/src/mir_app/src/srmm_base.cpp b/src/mir_app/src/srmm_base.cpp
index 67784f8c2e..4557c7bbb9 100644
--- a/src/mir_app/src/srmm_base.cpp
+++ b/src/mir_app/src/srmm_base.cpp
@@ -324,8 +324,8 @@ static void CALLBACK ChatTimerProc(HWND hwnd, UINT, UINT_PTR idEvent, DWORD)
TranslateT("Status"), g_chatApi.TM_WordToString(si->pStatuses, ui1->Status));
CLCINFOTIP ti = { sizeof(ti) };
- if (CallService("mToolTip/ShowTipW", (WPARAM)wszBuf.c_str(), (LPARAM)&ti))
- si->bHasToolTip = true;
+ Tipper_ShowTip(wszBuf, &ti);
+ si->bHasToolTip = true;
}
KillTimer(hwnd, idEvent);
}
@@ -363,7 +363,7 @@ LRESULT CSrmmBaseDialog::WndProc_Nicklist(UINT msg, WPARAM wParam, LPARAM lParam
case WM_MOUSEMOVE:
RECT clientRect;
{
- bool bTooltipExists = ServiceExists("mToolTip/HideTip");
+ bool bTooltipExists = ServiceExists(MS_TIPPER_HIDETIP);
POINT pt = { LOWORD(lParam), HIWORD(lParam) };
GetClientRect(m_nickList.GetHwnd(), &clientRect);
@@ -383,7 +383,7 @@ LRESULT CSrmmBaseDialog::WndProc_Nicklist(UINT msg, WPARAM wParam, LPARAM lParam
KillTimer(m_nickList.GetHwnd(), 1);
if (m_si->bHasToolTip) {
- CallService("mToolTip/HideTip", 0, 0);
+ Tipper_Hide();
m_si->bHasToolTip = false;
}
@@ -396,7 +396,7 @@ LRESULT CSrmmBaseDialog::WndProc_Nicklist(UINT msg, WPARAM wParam, LPARAM lParam
if (bTooltipExists) {
KillTimer(m_nickList.GetHwnd(), 1);
if (m_si->bHasToolTip) {
- CallService("mToolTip/HideTip", 0, 0);
+ Tipper_Hide();
m_si->bHasToolTip = false;
}
}
diff --git a/src/mir_app/src/stdafx.h b/src/mir_app/src/stdafx.h
index 211f1f1736..bbcc675087 100644
--- a/src/mir_app/src/stdafx.h
+++ b/src/mir_app/src/stdafx.h
@@ -94,6 +94,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_srmm_int.h>
#include <m_ssl.h>
#include <m_timezones.h>
+#include <m_tipper.h>
#include <m_toptoolbar.h>
#include <m_userinfo.h>
#include <m_version.h>