diff options
-rw-r--r-- | plugins/Clist_modern/src/modern_clisttray.cpp | 2 | ||||
-rw-r--r-- | plugins/Clist_modern/src/stdafx.h | 1 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/statusbar.cpp | 6 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/stdafx.h | 1 | ||||
-rw-r--r-- | plugins/ExternalAPI/m_tipper.h | 29 | ||||
-rw-r--r-- | plugins/TabSRMM/src/container.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/controls.cpp | 10 | ||||
-rw-r--r-- | plugins/TabSRMM/src/stdafx.h | 1 | ||||
-rw-r--r-- | plugins/TabSRMM/src/tabctrl.cpp | 12 | ||||
-rw-r--r-- | plugins/TipperYM/src/options.h | 2 | ||||
-rw-r--r-- | plugins/TipperYM/src/tipper.cpp | 6 | ||||
-rw-r--r-- | plugins/TrafficCounter/src/TrafficCounter.cpp | 7 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_svc.cpp | 2 | ||||
-rwxr-xr-x | protocols/JabberG/src/stdafx.h | 1 | ||||
-rw-r--r-- | protocols/Weather/src/stdafx.h | 1 | ||||
-rw-r--r-- | protocols/Weather/src/weather_mwin.cpp | 5 | ||||
-rw-r--r-- | src/mir_app/src/clisttray.cpp | 11 | ||||
-rw-r--r-- | src/mir_app/src/srmm_base.cpp | 10 | ||||
-rw-r--r-- | src/mir_app/src/stdafx.h | 1 |
19 files changed, 63 insertions, 47 deletions
diff --git a/plugins/Clist_modern/src/modern_clisttray.cpp b/plugins/Clist_modern/src/modern_clisttray.cpp index bef48fc9ef..b300c8a012 100644 --- a/plugins/Clist_modern/src/modern_clisttray.cpp +++ b/plugins/Clist_modern/src/modern_clisttray.cpp @@ -409,7 +409,7 @@ int cliTrayCalcChanged(const char *szChangedProto, int, int) nid.uFlags = NIF_ICON | NIF_TIP;
// if Tipper is missing or turned off for tray, use system tooltips
- if (!ServiceExists("mToolTip/ShowTip") || !db_get_b(0, "Tipper", "TrayTip", 1))
+ if (!ServiceExists(MS_TIPPER_SHOWTIPW) || !db_get_b(0, "Tipper", "TrayTip", 1))
wcsncpy_s(nid.szTip, g_clistApi.szTip, _TRUNCATE);
Shell_NotifyIcon(NIM_MODIFY, &nid);
diff --git a/plugins/Clist_modern/src/stdafx.h b/plugins/Clist_modern/src/stdafx.h index 4fca6633eb..a9b2e1fb57 100644 --- a/plugins/Clist_modern/src/stdafx.h +++ b/plugins/Clist_modern/src/stdafx.h @@ -95,6 +95,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include <m_cluiframes.h>
#include <m_protoint.h>
#include <m_netlib.h>
+#include <m_tipper.h>
#include <m_toptoolbar.h>
#include <m_metacontacts.h>
#include <m_variables.h>
diff --git a/plugins/Clist_nicer/src/statusbar.cpp b/plugins/Clist_nicer/src/statusbar.cpp index 348924f623..a61bd60c1e 100644 --- a/plugins/Clist_nicer/src/statusbar.cpp +++ b/plugins/Clist_nicer/src/statusbar.cpp @@ -49,7 +49,7 @@ LRESULT CALLBACK NewStatusBarWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM if (tooltip_active) {
KillTimer(hwnd, TIMERID_HOVER);
if (!NotifyEventHooks(hStatusBarHideToolTipEvent, 0, 0))
- CallService("mToolTip/HideTip", 0, 0);
+ Tipper_Hide();
tooltip_active = FALSE;
}
KillTimer(hwnd, TIMERID_HOVER);
@@ -74,7 +74,7 @@ LRESULT CALLBACK NewStatusBarWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM case WM_RBUTTONDOWN:
KillTimer(hwnd, TIMERID_HOVER);
if (!NotifyEventHooks(hStatusBarHideToolTipEvent, 0, 0))
- CallService("mToolTip/HideTip", 0, 0);
+ Tipper_Hide();
tooltip_active = FALSE;
break;
@@ -164,7 +164,7 @@ LRESULT CALLBACK NewStatusBarWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM CLCINFOTIP ti = { sizeof(ti) };
ti.isTreeFocused = (GetFocus() == g_clistApi.hwndContactList);
- CallService("mToolTip/ShowTipW", (WPARAM)szTipText, (LPARAM)&ti);
+ Tipper_ShowTip(szTipText, &ti);
}
break;
}
diff --git a/plugins/Clist_nicer/src/stdafx.h b/plugins/Clist_nicer/src/stdafx.h index 80427aa16a..39216d9f92 100644 --- a/plugins/Clist_nicer/src/stdafx.h +++ b/plugins/Clist_nicer/src/stdafx.h @@ -55,6 +55,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include <m_cluiframes.h>
#include <m_icolib.h>
#include <m_fontservice.h>
+#include <m_tipper.h>
#include <m_xstatus.h>
#include <m_extraicons.h>
#include <m_variables.h>
diff --git a/plugins/ExternalAPI/m_tipper.h b/plugins/ExternalAPI/m_tipper.h index abaac6c206..f97e105959 100644 --- a/plugins/ExternalAPI/m_tipper.h +++ b/plugins/ExternalAPI/m_tipper.h @@ -18,27 +18,46 @@ not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-
// Tipper API
# pragma once
+#include <m_clc.h>
+
// translation function type
// use hContact, module and setting to read your db value(s) and put the resulting string into buff
// return buff if the translation was successful, or return 0 for failure
-typedef TCHAR *(TranslateFunc)(MCONTACT hContact, const char *module, const char *setting_or_prefix, TCHAR *buff, int bufflen);
+typedef wchar_t* (TranslateFunc)(MCONTACT hContact, const char *module, const char *setting_or_prefix, wchar_t *buff, int bufflen);
typedef struct {
TranslateFunc *transFunc; // address of your translation function (see typedef above)
- const TCHAR *swzName; // make sure this is unique, and DO NOT translate it
+ const wchar_t *swzName; // make sure this is unique, and DO NOT translate it
DWORD id; // will be overwritten by Tipper - do not use
} DBVTranslation;
// add a translation to tipper
// wParam not used
// lParam = (DBVTranslation *)translation
-#define MS_TIPPER_ADDTRANSLATION "Tipper/AddTranslation"
+#define MS_TIPPER_ADDTRANSLATION "Tipper/AddTranslation"
+
+// ansi version of tipper
+// wParam - optional (wchar_t *)text for text-only tips
+// lParam - (CLCINFOTIP *)infoTip
+#define MS_TIPPER_SHOWTIP "mToolTip/ShowTip"
// unicode extension to the basic functionality
// wParam - optional (wchar_t *)text for text-only tips
// lParam - (CLCINFOTIP *)infoTip
-#define MS_TIPPER_SHOWTIPW "mToolTip/ShowTipW"
\ No newline at end of file +#define MS_TIPPER_SHOWTIPW "mToolTip/ShowTipW"
+
+__forceinline void Tipper_ShowTip(const wchar_t *pwsztext, CLCINFOTIP *ti)
+{ CallService(MS_TIPPER_SHOWTIPW, WPARAM(pwsztext), LPARAM(ti));
+}
+
+// hides a tooltip
+// wParam - 0
+// lParam - 0
+#define MS_TIPPER_HIDETIP "mToolTip/HideTip"
+
+__forceinline void Tipper_Hide()
+{ CallService(MS_TIPPER_HIDETIP, 0, 0);
+}
diff --git a/plugins/TabSRMM/src/container.cpp b/plugins/TabSRMM/src/container.cpp index 9ab8c299a2..32d3aba8da 100644 --- a/plugins/TabSRMM/src/container.cpp +++ b/plugins/TabSRMM/src/container.cpp @@ -408,7 +408,7 @@ void TContainerData::InitDialog(HWND hwndDlg) Configure();
// tab tooltips...
- if (!::ServiceExists("mToolTip/ShowTip") || M.GetByte("d_tooltips", 0) == 0) {
+ if (!::ServiceExists(MS_TIPPER_SHOWTIPW) || M.GetByte("d_tooltips", 0) == 0) {
m_hwndTip = ::CreateWindowEx(0, TOOLTIPS_CLASS, nullptr, WS_POPUP | TTS_NOPREFIX | TTS_ALWAYSTIP, CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT, hwndDlg, nullptr, g_plugin.getInst(), (LPVOID)nullptr);
diff --git a/plugins/TabSRMM/src/controls.cpp b/plugins/TabSRMM/src/controls.cpp index 94d1b72dd3..4c426a9e1d 100644 --- a/plugins/TabSRMM/src/controls.cpp +++ b/plugins/TabSRMM/src/controls.cpp @@ -903,7 +903,7 @@ LONG_PTR CALLBACK CMsgDialog::StatusBarSubclassProc(HWND hWnd, UINT msg, WPARAM ptMouse = pt;
if (tooltip_active) {
KillTimer(hWnd, TIMERID_HOVER);
- CallService("mToolTip/HideTip", 0, 0);
+ Tipper_Hide();
tooltip_active = FALSE;
}
KillTimer(hWnd, TIMERID_HOVER);
@@ -913,7 +913,7 @@ LONG_PTR CALLBACK CMsgDialog::StatusBarSubclassProc(HWND hWnd, UINT msg, WPARAM case WM_LBUTTONDOWN:
case WM_RBUTTONDOWN:
KillTimer(hWnd, TIMERID_HOVER);
- CallService("mToolTip/HideTip", 0, 0);
+ Tipper_Hide();
tooltip_active = FALSE;
GetCursorPos(&pt);
rcLastStatusBarClick.left = pt.x - 2;
@@ -970,7 +970,7 @@ LONG_PTR CALLBACK CMsgDialog::StatusBarSubclassProc(HWND hWnd, UINT msg, WPARAM wcsncpy_s(wBuf, sid->szTooltip.w, _TRUNCATE);
if (wBuf[0]) {
- CallService("mToolTip/ShowTipW", (WPARAM)wBuf, (LPARAM)&ti);
+ Tipper_ShowTip(wBuf, &ti);
tooltip_active = TRUE;
}
}
@@ -982,7 +982,7 @@ LONG_PTR CALLBACK CMsgDialog::StatusBarSubclassProc(HWND hWnd, UINT msg, WPARAM mir_snwprintf(wBuf,
TranslateT("There are %d pending send jobs. Message length: %d bytes, message length limit: %d bytes\n\n%d messages are queued for later delivery"),
dat->m_iOpenJobs, dat->m_message.GetRichTextLength(CP_UTF8), dat->m_cache->getMaxMessageLength(), iQueued);
- CallService("mToolTip/ShowTipW", (WPARAM)wBuf, (LPARAM)&ti);
+ Tipper_ShowTip(wBuf, &ti);
}
if (SendMessage(dat->m_pContainer->m_hwndStatus, SB_GETTEXT, 0, (LPARAM)wBuf)) {
@@ -997,7 +997,7 @@ LONG_PTR CALLBACK CMsgDialog::StatusBarSubclassProc(HWND hWnd, UINT msg, WPARAM ptrW tszTopic(db_get_wsa(dat->m_hContact, dat->m_szProto, "Topic"));
if (tszTopic != nullptr) {
tooltip_active = TRUE;
- CallService("mToolTip/ShowTipW", tszTopic, (LPARAM)&ti);
+ Tipper_ShowTip(tszTopic, &ti);
}
}
}
diff --git a/plugins/TabSRMM/src/stdafx.h b/plugins/TabSRMM/src/stdafx.h index 35440301fa..4299063adc 100644 --- a/plugins/TabSRMM/src/stdafx.h +++ b/plugins/TabSRMM/src/stdafx.h @@ -78,6 +78,7 @@ #include <m_db_int.h>
#include <m_netlib.h>
#include <m_srmm_int.h>
+#include <m_tipper.h>
#include <m_ieview.h>
#include <m_metacontacts.h>
diff --git a/plugins/TabSRMM/src/tabctrl.cpp b/plugins/TabSRMM/src/tabctrl.cpp index 62aaf2a189..5c9de4d029 100644 --- a/plugins/TabSRMM/src/tabctrl.cpp +++ b/plugins/TabSRMM/src/tabctrl.cpp @@ -1098,7 +1098,7 @@ static LRESULT CALLBACK TabControlSubclassProc(HWND hwnd, UINT msg, WPARAM wPara ptMouseT = pt;
if (tabdat->bTipActive) {
KillTimer(hwnd, TIMERID_HOVER_T);
- CallService("mToolTip/HideTip", 0, 0);
+ Tipper_Hide();
tabdat->bTipActive = false;
}
KillTimer(hwnd, TIMERID_HOVER_T);
@@ -1147,13 +1147,13 @@ static LRESULT CALLBACK TabControlSubclassProc(HWND hwnd, UINT msg, WPARAM wPara case WM_RBUTTONDOWN:
KillTimer(hwnd, TIMERID_HOVER_T);
- CallService("mToolTip/HideTip", 0, 0);
+ Tipper_Hide();
tabdat->bTipActive = false;
break;
case WM_LBUTTONDOWN:
KillTimer(hwnd, TIMERID_HOVER_T);
- CallService("mToolTip/HideTip", 0, 0);
+ Tipper_Hide();
tabdat->bTipActive = false;
if (GetKeyState(VK_CONTROL) & 0x8000)
@@ -1258,7 +1258,7 @@ static LRESULT CALLBACK TabControlSubclassProc(HWND hwnd, UINT msg, WPARAM wPara GetCursorPos(&pt);
if (abs(pt.x - ptMouseT.x) < 5 && abs(pt.y - ptMouseT.y) < 5) {
- CLCINFOTIP ti = { 0 };
+ CLCINFOTIP ti = {};
ti.cbSize = sizeof(ti);
ti.ptCursor = pt;
@@ -1274,7 +1274,7 @@ static LRESULT CALLBACK TabControlSubclassProc(HWND hwnd, UINT msg, WPARAM wPara ti.isGroup = 0;
ti.hItem = (HANDLE)dat->m_hContact;
ti.isTreeFocused = 0;
- CallService("mToolTip/ShowTip", 0, (LPARAM)&ti);
+ Tipper_ShowTip(0, &ti);
}
}
}
@@ -1295,7 +1295,7 @@ static LRESULT CALLBACK TabControlSubclassProc(HWND hwnd, UINT msg, WPARAM wPara case WM_USER + 100:
if (tabdat->bTipActive) {
tabdat->bTipActive = false;
- CallService("mToolTip/HideTip", 0, 0);
+ Tipper_Hide();
}
break;
}
diff --git a/plugins/TipperYM/src/options.h b/plugins/TipperYM/src/options.h index b95cf7c533..deccb7dd50 100644 --- a/plugins/TipperYM/src/options.h +++ b/plugins/TipperYM/src/options.h @@ -31,8 +31,6 @@ Boston, MA 02111-1307, USA. #define IDPRESETITEM 1000
-#define MS_TOOLTIP_SHOWTIP "mToolTip/ShowTip"
-
struct OPTBUTTON
{
UINT id, uintCoreIconId, uintResIconId;
diff --git a/plugins/TipperYM/src/tipper.cpp b/plugins/TipperYM/src/tipper.cpp index eb81f2f938..4c67fbe5c3 100644 --- a/plugins/TipperYM/src/tipper.cpp +++ b/plugins/TipperYM/src/tipper.cpp @@ -303,9 +303,9 @@ int CMPlugin::Load() InitMessagePump();
// for compatibility with mToolTip status tooltips
- CreateServiceFunction("mToolTip/ShowTip", ShowTip);
- CreateServiceFunction("mToolTip/ShowTipW", ShowTipW);
- CreateServiceFunction("mToolTip/HideTip", HideTip);
+ CreateServiceFunction(MS_TIPPER_SHOWTIP, ShowTip);
+ CreateServiceFunction(MS_TIPPER_SHOWTIPW, ShowTipW);
+ CreateServiceFunction(MS_TIPPER_HIDETIP, HideTip);
CreateServiceFunction("mToolTip/ReloadSkin", ReloadSkin);
HookEvent(ME_DB_CONTACT_SETTINGCHANGED, SettingChanged);
diff --git a/plugins/TrafficCounter/src/TrafficCounter.cpp b/plugins/TrafficCounter/src/TrafficCounter.cpp index d30b307942..b686c7e66a 100644 --- a/plugins/TrafficCounter/src/TrafficCounter.cpp +++ b/plugins/TrafficCounter/src/TrafficCounter.cpp @@ -780,16 +780,13 @@ LRESULT CALLBACK TrafficCounterWndProc_MW(HWND hwnd, UINT msg, WPARAM wParam, LP if (PtInRect(&rt, TooltipPosition)) {
GetCursorPos(&ptMouse);
- CLCINFOTIP ti = { 0 };
+ CLCINFOTIP ti = {};
ti.rcItem.left = TooltipPosition.x - 10;
ti.rcItem.right = TooltipPosition.x + 10;
ti.rcItem.top = TooltipPosition.y - 10;
ti.rcItem.bottom = TooltipPosition.y + 10;
ti.cbSize = sizeof(ti);
-
- wchar_t *TooltipText = variables_parsedup(Traffic_TooltipFormat, nullptr, NULL);
- CallService(MS_TIPPER_SHOWTIPW, (WPARAM)TooltipText, (LPARAM)&ti);
- mir_free(TooltipText);
+ Tipper_ShowTip(ptrW(variables_parsedup(Traffic_TooltipFormat, nullptr, NULL)), &ti);
TooltipShowing = TRUE;
}
diff --git a/protocols/JabberG/src/jabber_svc.cpp b/protocols/JabberG/src/jabber_svc.cpp index f7ef22bb29..1ec3c80106 100644 --- a/protocols/JabberG/src/jabber_svc.cpp +++ b/protocols/JabberG/src/jabber_svc.cpp @@ -344,7 +344,7 @@ INT_PTR __cdecl CJabberProto::JabberGCGetToolTipText(WPARAM wParam, LPARAM lPara // Role: Moderator
// Affiliation: Affiliation
- bool bIsTipper = ServiceExists("mToolTip/HideTip");
+ bool bIsTipper = ServiceExists(MS_TIPPER_HIDETIP);
//JID:
CMStringW outBuf;
diff --git a/protocols/JabberG/src/stdafx.h b/protocols/JabberG/src/stdafx.h index 6fece86135..30263973f0 100755 --- a/protocols/JabberG/src/stdafx.h +++ b/protocols/JabberG/src/stdafx.h @@ -81,6 +81,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include <m_skin.h>
#include <m_srmm_int.h>
#include <m_timezones.h>
+#include <m_tipper.h>
#include <m_toptoolbar.h>
#include <m_userinfo.h>
#include <m_utils.h>
diff --git a/protocols/Weather/src/stdafx.h b/protocols/Weather/src/stdafx.h index 82bbbdaa87..bd4cddffbe 100644 --- a/protocols/Weather/src/stdafx.h +++ b/protocols/Weather/src/stdafx.h @@ -55,6 +55,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include <m_popup.h> #include <m_acc.h> +#include <m_tipper.h> #include <m_weather.h> #include <m_toptoolbar.h> diff --git a/protocols/Weather/src/weather_mwin.cpp b/protocols/Weather/src/weather_mwin.cpp index 27c6664a1e..a1cfff3ddd 100644 --- a/protocols/Weather/src/weather_mwin.cpp +++ b/protocols/Weather/src/weather_mwin.cpp @@ -20,9 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "stdafx.h" -#define MS_TOOLTIP_SHOWTIP "mToolTip/ShowTip" -#define MS_TOOLTIP_HIDETIP "mToolTip/HideTip" - static MWindowList hMwinWindowList; static HANDLE hFontHook; @@ -95,7 +92,7 @@ static LRESULT CALLBACK wndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara ti.hItem = (HANDLE)data->hContact; ti.ptCursor = pt; ti.isTreeFocused = 1; - CallService(MS_TOOLTIP_SHOWTIP, 0, (LPARAM)&ti); + CallService(MS_TIPPER_SHOWTIP, 0, (LPARAM)&ti); } break; 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>
|