diff options
-rw-r--r-- | tipper/docs/autoexec_Tipper(Tweety).ini | 6 | ||||
-rw-r--r-- | tipper/m_tipper.h | 22 | ||||
-rw-r--r-- | tipper/message_pump.cpp | 2 | ||||
-rw-r--r-- | tipper/popwin.cpp | 16 | ||||
-rw-r--r-- | tipper/tipper.cpp | 24 | ||||
-rw-r--r-- | tipper/tipper.mdsp | 7 | ||||
-rw-r--r-- | tipper/version.h | 4 |
7 files changed, 64 insertions, 17 deletions
diff --git a/tipper/docs/autoexec_Tipper(Tweety).ini b/tipper/docs/autoexec_Tipper(Tweety).ini index 9f555f5..46584f6 100644 --- a/tipper/docs/autoexec_Tipper(Tweety).ini +++ b/tipper/docs/autoexec_Tipper(Tweety).ini @@ -373,5 +373,7 @@ DILabel6=uGender: DIValue6=u%Gender%
DILabel7=uBirthday:
DIValue7=u%raw:mBirthday/BirthDay%-%raw:mBirthday/BirthMonth%-%raw:mBirthday/BirthYear% ( %raw:UserInfo/Age% )
-
-
+DILineAbove28=b0
+DIValNewline28=b0
+DILabel28=uListening To:
+DIValue28=u%raw:/ListeningTo%
\ No newline at end of file diff --git a/tipper/m_tipper.h b/tipper/m_tipper.h index a2b5abf..790ec26 100644 --- a/tipper/m_tipper.h +++ b/tipper/m_tipper.h @@ -17,3 +17,25 @@ typedef struct { // wParam not used
// lParam = (DBVTranslation *)translation
#define MS_TIPPER_ADDTRANSLATION "Tipper/AddTranslation"
+
+
+/////////////////////
+///// This service is NOT implemented by tipper - it is to be implemented by plugins that extend the basic away message services
+///// so that tipper has a common interface to use
+////////////////////
+
+// wParam - (WORD)wStatus
+// lParam - (char *)szProto
+// returns (char *)szStatusMessage
+#define MS_AWAY_GETPROTOSTATUSMESSAGE "Away/GetProtoStatusMsg"
+
+// wParam - (WORD)wStatus
+// lParam - (wchar_t *)swzProto
+// returns (wchar_t *)swzStatusMessage
+#define MS_AWAY_GETPROTOSTATUSMESSAGEW "Away/GetProtoStatusMsgW"
+
+#ifdef _UNICODE
+#define MS_AWAY_GETPROTOSTATUSMESSAGET MS_AWAY_GETPROTOSTATUSMESSAGEW
+#else
+#define MS_AWAY_GETPROTOSTATUSMESSAGET MS_AWAY_GETPROTOSTATUSMESSAGE
+#endif
\ No newline at end of file diff --git a/tipper/message_pump.cpp b/tipper/message_pump.cpp index 01f172e..6738b96 100644 --- a/tipper/message_pump.cpp +++ b/tipper/message_pump.cpp @@ -125,6 +125,8 @@ int ShowTip(WPARAM wParam, LPARAM lParam) { if(wParam) { // wParam is char pointer containing text - e.g. status bar tooltip
clcit2->text = a2t((char *)wParam);
GetCursorPos(&clcit2->ptCursor);
+
+ //MessageBox(0, clcit2->text, _T("ShowTip"), MB_OK);
}
PostMPMessage(MUM_CREATEPOPUP, 0, (LPARAM)clcit2);
diff --git a/tipper/popwin.cpp b/tipper/popwin.cpp index fadbfe3..ccac277 100644 --- a/tipper/popwin.cpp +++ b/tipper/popwin.cpp @@ -97,9 +97,19 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa } if(status >= ID_STATUS_OFFLINE && status <= ID_STATUS_IDLE) { - char *status_msg = (char *)CallService(MS_AWAYMSG_GETSTATUSMSG, status, 0); - if(status_msg) { - TCHAR *swzText = a2t(status_msg); + TCHAR *swzText = 0; + char *status_msg = 0; + if(ServiceExists(MS_AWAY_GETPROTOSTATUSMESSAGET)) + swzText = _tcsdup((TCHAR *)CallService(MS_AWAY_GETPROTOSTATUSMESSAGET, (LPARAM)status, (WPARAM)pwd->clcit.proto)); + else if(ServiceExists(MS_AWAY_GETPROTOSTATUSMESSAGE)) + status_msg = (char *)CallService(MS_AWAY_GETPROTOSTATUSMESSAGE, (LPARAM)status, (WPARAM)pwd->clcit.proto); + else + status_msg = (char *)CallService(MS_AWAYMSG_GETSTATUSMSG, status, 0); + + if(status_msg) + swzText = a2t(status_msg); + + if(swzText) { StripBBCodesInPlace(swzText); pwd->rows = (RowData *) realloc(pwd->rows, sizeof(RowData) * (pwd->row_count + 1)); diff --git a/tipper/tipper.cpp b/tipper/tipper.cpp index c8363a3..7ed27ec 100644 --- a/tipper/tipper.cpp +++ b/tipper/tipper.cpp @@ -28,13 +28,9 @@ HANDLE hShowTipService = 0, hShowTipWService = 0, hHideTipService = 0; struct MM_INTERFACE memoryManagerInterface = {0};
-PLUGININFO pluginInfo={
+PLUGININFOEX pluginInfo={
sizeof(PLUGININFO),
-#ifndef _UNICODE
- __PLUGIN_NAME " (ANSI)",
-#else
__PLUGIN_NAME,
-#endif
PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM),
__DESC,
__AUTHOR,
@@ -42,7 +38,13 @@ PLUGININFO pluginInfo={ __COPYRIGHT,
__AUTHORWEB,
UNICODE_AWARE, //not transient
- 0 //doesn't replace anything built-in
+ 0, //doesn't replace anything built-in
+
+#ifndef _UNICODE
+{ 0xedae7137, 0x1b6a, 0x4b8f, { 0xaa, 0xb0, 0x3b, 0x5a, 0x2f, 0x8, 0xf4, 0x62 } } // {EDAE7137-1B6A-4b8f-AAB0-3B5A2F08F462}
+#else
+{ 0x785c25e3, 0xc906, 0x434b, { 0x97, 0x23, 0xe2, 0x44, 0xe1, 0xbe, 0xca, 0x2 } } // {785C25E3-C906-434b-9723-E244E1BECA02}
+#endif
};
PLUGINLINK *pluginLink = 0;
@@ -54,11 +56,19 @@ extern "C" BOOL APIENTRY DllMain( HMODULE hModule, DWORD ul_reason_for_call, LP return TRUE;
}
-extern "C" __declspec(dllexport) PLUGININFO* MirandaPluginInfo(DWORD mirandaVersion)
+extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)
{
return &pluginInfo;
}
+static const MUUID interfaces[] = {MIID_TOOLTIPS, MIID_LAST};
+__declspec(dllexport) const MUUID* MirandaPluginInterfaces(void)
+{
+ return interfaces;
+}
+
+
+
int ReloadFont(WPARAM wParam, LPARAM lParam) {
if(ServiceExists(MS_FONT_GETW)) {
diff --git a/tipper/tipper.mdsp b/tipper/tipper.mdsp index a2cb3c4..04dea61 100644 --- a/tipper/tipper.mdsp +++ b/tipper/tipper.mdsp @@ -104,6 +104,7 @@ extraResourceOptions= 1=resource.rc
[Other]
[History]
-message_pump.cpp,4381
-tipper.cpp,1307
-version.h,175
+message_pump.cpp,4377
+tipper.cpp,1291
+version.h,150
+popwin.cpp,2562
diff --git a/tipper/version.h b/tipper/version.h index 8a73fd9..114a952 100644 --- a/tipper/version.h +++ b/tipper/version.h @@ -2,9 +2,9 @@ #define __VERSION_H_INCLUDED
#define __MAJOR_VERSION 0
-#define __MINOR_VERSION 3
+#define __MINOR_VERSION 4
#define __RELEASE_NUM 0
-#define __BUILD_NUM 8
+#define __BUILD_NUM 0
#define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM
#define __FILEVERSION_STRING_DOTS __MAJOR_VERSION.__MINOR_VERSION.__RELEASE_NUM.__BUILD_NUM
|