diff options
author | George Hazan <george.hazan@gmail.com> | 2013-03-15 22:31:48 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-03-15 22:31:48 +0000 |
commit | 588a9b2b5ee9d87d4a8b640b63a2544675d93ded (patch) | |
tree | b88b1ad9682ee1d9030e69a907c00fe539caf8a1 | |
parent | d5d85efcecd6fa2f2efd84b369a642f47a511169 (diff) |
POPUPDATAEX_V2: ansi version removed
git-svn-id: http://svn.miranda-ng.org/main/trunk@4059 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | include/delphi/m_popup.inc | 6 | ||||
-rw-r--r-- | include/m_popup.h | 39 | ||||
-rw-r--r-- | plugins/ExternalAPI/m_popup2.h | 41 | ||||
-rw-r--r-- | plugins/Popup/src/main.cpp | 3 | ||||
-rw-r--r-- | plugins/Popup/src/popup_wnd2.cpp | 31 | ||||
-rw-r--r-- | plugins/Popup/src/popup_wnd2.h | 2 | ||||
-rw-r--r-- | plugins/Popup/src/services.cpp | 104 | ||||
-rw-r--r-- | plugins/Popup/src/services.h | 2 | ||||
-rw-r--r-- | plugins/YAPP/src/services.cpp | 50 |
9 files changed, 30 insertions, 248 deletions
diff --git a/include/delphi/m_popup.inc b/include/delphi/m_popup.inc index 0ec2450daa..0a47fccba4 100644 --- a/include/delphi/m_popup.inc +++ b/include/delphi/m_popup.inc @@ -234,7 +234,7 @@ You may pass additional creation flags via lParam: returns: > 0 for success, -1 for failure, 0 if the failure is due to second line not being shown. (but you could call PUIsSecondLineShown() before changing the text...)
Changes the text displayed in the second line of the popup.
}
- MS_POPUP_CHANGETEXT :PAnsiChar = 'PopUp/Changetext';
+
MS_POPUP_CHANGETEXTW:PAnsiChar = 'PopUp/ChangetextW';
{
@@ -242,7 +242,7 @@ You may pass additional creation flags via lParam: lParam = (LPARAM)(POPUPDATAEX*)newData
Changes the entire popup
}
- MS_POPUP_CHANGE :PAnsiChar = 'PopUp/Change';
+
MS_POPUP_CHANGEW:PAnsiChar = 'PopUp/ChangeW';
{
@@ -257,8 +257,6 @@ You may pass additional creation flags via lParam: CPT_TEXTW = 2; // lParam = (WCHAR *)text
CPT_TITLE = 3; // lParam = (AnsiChar *)title
CPT_TITLEW = 4; // lParam = (WCHAR *)title
- CPT_DATA = 5; // lParam = (POPUPDATA *)data
- CPT_DATAEX = 6; // lParam = (POPUPDATAEX *)data
CPT_DATAW = 7; // lParam = (POPUPDATAW *)data
CPT_DATA2 = 8; // lParam = (POPUPDATA2 *)data
diff --git a/include/m_popup.h b/include/m_popup.h index 2218ab5f87..b715345c40 100644 --- a/include/m_popup.h +++ b/include/m_popup.h @@ -222,10 +222,6 @@ lParam = (LPARAM)(char*)lpzNewText returns: > 0 for success, -1 for failure, 0 if the failure is due to second line not being shown. (but you could call
PUIsSecondLineShown() before changing the text...)
*/
-#define MS_POPUP_CHANGETEXT "PopUp/Changetext"
-static int __inline PUChangeText(HWND hWndPopUp, LPCSTR lpzNewText) {
- return (int)CallService(MS_POPUP_CHANGETEXT, (WPARAM)hWndPopUp, (LPARAM)lpzNewText);
-}
#define MS_POPUP_CHANGETEXTW "PopUp/ChangetextW"
static int __inline PUChangeTextW(HWND hWndPopUp, LPCWSTR lpwzNewText) {
@@ -235,9 +231,6 @@ static int __inline PUChangeTextW(HWND hWndPopUp, LPCWSTR lpwzNewText) { #if defined(_UNICODE) || defined(UNICODE)
#define MS_POPUP_CHANGETEXTT MS_POPUP_CHANGETEXTW
#define PUChangeTextT PUChangeTextW
-#else
- #define MS_POPUP_CHANGETEXTT MS_POPUP_CHANGETEXT
- #define PUChangeTextT PUChangeText
#endif
/* PopUp/Change
@@ -246,10 +239,6 @@ Changes the entire popup wParam = (WPARAM)(HWND)hPopUpWindow
lParam = (LPARAM)(POPUPDATA*)newData
*/
-#define MS_POPUP_CHANGE "PopUp/Change"
-static int __inline PUChange(HWND hWndPopUp, POPUPDATA *newData) {
- return (int)CallService(MS_POPUP_CHANGE, (WPARAM)hWndPopUp, (LPARAM)newData);
-}
#define MS_POPUP_CHANGEW "PopUp/ChangeW"
static int __inline PUChangeW(HWND hWndPopUp, POPUPDATAW *newData) {
@@ -257,11 +246,8 @@ static int __inline PUChangeW(HWND hWndPopUp, POPUPDATAW *newData) { }
#if defined(_UNICODE) || defined(UNICODE)
- #define MS_POPUP_CHANGET MS_POPUP_CHANGEW
- #define PUChangeT PUChangeW
-#else
- #define MS_POPUP_CHANGET MS_POPUP_CHANGE
- #define PUChangeT PUChange
+ #define MS_POPUP_CHANGET MS_POPUP_CHANGEW
+ #define PUChangeT PUChangeW
#endif
/* UM_CHANGEPOPUP
@@ -271,23 +257,18 @@ wParam = Modification type lParam = value of type defined by wParam
*/
-#define CPT_TEXT 1 // lParam = (char *)text
-#define CPT_TEXTW 2 // lParam = (WCHAR *)text
-#define CPT_TITLE 3 // lParam = (char *)title
-#define CPT_TITLEW 4 // lParam = (WCHAR *)title
-#define CPT_DATAEX 6 // lParam = (POPUPDATA *)data
-#define CPT_DATAW 7 // lParam = (POPUPDATAW *)data
+#define CPT_TEXT 1 // lParam = (char *)text
+#define CPT_TEXTW 2 // lParam = (WCHAR *)text
+#define CPT_TITLE 3 // lParam = (char *)title
+#define CPT_TITLEW 4 // lParam = (WCHAR *)title
+#define CPT_DATAW 7 // lParam = (POPUPDATAW *)data
#define UM_CHANGEPOPUP (WM_USER + 0x0203)
#if defined(_UNICODE) || defined(UNICODE)
- #define CPT_TEXTT CPT_TEXTW
- #define CPT_TITLET CPT_TITLEW
- #define CPT_DATAT CPT_DATAW
-#else
- #define CPT_TEXTT CPT_TEXT
- #define CPT_TITLET CPT_TITLE
- #define CPT_DATAT CPT_DATA
+ #define CPT_TEXTT CPT_TEXTW
+ #define CPT_TITLET CPT_TITLEW
+ #define CPT_DATAT CPT_DATAW
#endif
/* PopUp/ShowMessage
diff --git a/plugins/ExternalAPI/m_popup2.h b/plugins/ExternalAPI/m_popup2.h index 188fa99f76..ceb9925a3c 100644 --- a/plugins/ExternalAPI/m_popup2.h +++ b/plugins/ExternalAPI/m_popup2.h @@ -120,35 +120,6 @@ typedef struct #define MS_POPUP_CHANGEPOPUP2 "Popup/ChangePopup2"
// deprecatet !!! (only for compatibility) use new POPUPDATA2 struct for extended popup
-// Extended popup data V2 (ansi version)
-typedef struct
-{
- HANDLE lchContact;
- HICON lchIcon;
- union
- {
- char lptzContactName[MAX_CONTACTNAME];
- char lpzContactName[MAX_CONTACTNAME];
- };
- union
- {
- char lptzText[MAX_SECONDLINE];
- char lpzText[MAX_SECONDLINE];
- };
- COLORREF colorBack;
- COLORREF colorText;
- WNDPROC PluginWindowProc;
- void * PluginData;
- int iSeconds; // Custom delay time in seconds. -1 means "forever", 0 means "default time".
- // +2.1.0.3
- // you *MUST* pass APF_NEWDATA flag for services to take care of this data
- HANDLE hNotification; // Reserved. Must be NULL
- int actionCount; // Amount of passed actions
- LPPOPUPACTION lpActions; // Popup Actions
- int cbSize; // struct size for future
-} POPUPDATAEX_V2, *LPPOPUPDATAEX_V2;
-
-// deprecatet !!! (only for compatibility) use new POPUPDATA2 struct for extended popup
// Unicode version of POPUPDATAEX_V2
typedef struct
{
@@ -181,9 +152,6 @@ typedef struct #if defined(_UNICODE) || defined(UNICODE)
typedef POPUPDATAW_V2 POPUPDATAT_V2;
typedef LPPOPUPDATAW_V2 LPPOPUPDATAT_V2;
-#else
- typedef POPUPDATAEX_V2 POPUPDATAT_V2;
- typedef LPPOPUPDATAEX_V2 LPPOPUPDATAT_V2;
#endif
/* PopUp/AddPopup
@@ -207,19 +175,10 @@ additional APF_ flags */ #define APF_NO_POPUP 0x08 //do not show popup. this is useful if you want popup yo be stored in history only
#define APF_NEWDATA 0x10 //deprecatet!! only for use with old POPUPDATAEX_V2/POPUPDATAW_V2 structs
-//overload function for POPUPDATAEX_V2/POPUPDATAW_V2
-static INT_PTR __inline PUAddPopUpEx(POPUPDATAEX_V2* ppdp) {
- return CallService(MS_POPUP_ADDPOPUP, (WPARAM)ppdp,0);
-}
-
static INT_PTR __inline PUAddPopUpW(POPUPDATAW_V2* ppdp) {
return CallService(MS_POPUP_ADDPOPUPW, (WPARAM)ppdp,0);
}
-static int __inline PUChange(HWND hWndPopUp, POPUPDATAEX_V2 *newData) {
- return (int)CallService(MS_POPUP_CHANGE, (WPARAM)hWndPopUp, (LPARAM)newData);
-}
-
#define MS_POPUP_CHANGEW "PopUp/ChangeW"
static int __inline PUChangeW(HWND hWndPopUp, POPUPDATAW_V2 *newData) {
return (int)CallService(MS_POPUP_CHANGEW, (WPARAM)hWndPopUp, (LPARAM)newData);
diff --git a/plugins/Popup/src/main.cpp b/plugins/Popup/src/main.cpp index 4de24b0646..b68a7e54f6 100644 --- a/plugins/Popup/src/main.cpp +++ b/plugins/Popup/src/main.cpp @@ -392,9 +392,8 @@ MIRAPI int Load(void) CreateServiceFunction(MS_POPUP_ADDPOPUPW, PopUp_AddPopUpW);
CreateServiceFunction(MS_POPUP_ADDPOPUP2, PopUp_AddPopUp2);
- CreateServiceFunction(MS_POPUP_CHANGETEXT, PopUp_ChangeText);
CreateServiceFunction(MS_POPUP_CHANGETEXTW, PopUp_ChangeTextW);
- CreateServiceFunction(MS_POPUP_CHANGE, PopUp_Change);
+
CreateServiceFunction(MS_POPUP_CHANGEW, PopUp_ChangeW);
CreateServiceFunction(MS_POPUP_CHANGEPOPUP2, PopUp_Change2);
diff --git a/plugins/Popup/src/popup_wnd2.cpp b/plugins/Popup/src/popup_wnd2.cpp index cc4a55d55b..7ab564817b 100644 --- a/plugins/Popup/src/popup_wnd2.cpp +++ b/plugins/Popup/src/popup_wnd2.cpp @@ -749,36 +749,6 @@ void PopupWnd2::setIcon(HICON hNewIcon) }
}
-void PopupWnd2::updateData(POPUPDATAEX_V2 *ppd)
-{
- m_hContact = ppd->lchContact;
-
- m_clBack = ppd->colorBack;
- m_clClock = m_clTitle = m_clText = ppd->colorText;
- m_iTimeout = ppd->iSeconds ? ppd->iSeconds : m_options->Seconds;
-
- if (m_textType == TT_NONE) m_textType = TT_ANSI;
- mir_free(m_lpzText); mir_free(m_lpzTitle);
- mir_free(m_lpwzText); mir_free(m_lpwzTitle);
- m_lpzTitle = mir_strdup(ppd->lpzContactName);
- m_lpzText = mir_strdup(ppd->lpzText);
- m_lpwzTitle = m_lpwzText = NULL;
- setIcon(ppd->lchIcon);
- m_hNotification = ppd->hNotification;
-
- m_PluginData = ppd->PluginData;
- m_PluginWindowProc = ppd->PluginWindowProc;
-
- if (m_options->DisplayTime)
- GetTimeFormatA(LOCALE_USER_DEFAULT, 0, NULL,"HH':'mm", m_time, SIZEOF(m_time));
- else m_time[0] = 0;
-
- fixDefaults();
- fixActions(ppd->lpActions, ppd->actionCount);
-
- if (m_textType == TT_MTEXT) buildMText();
-}
-
void PopupWnd2::updateData(POPUPDATAW_V2 *ppd)
{
m_hContact = ppd->lchContact;
@@ -1418,7 +1388,6 @@ LRESULT CALLBACK PopupWnd2::WindowProc(UINT message, WPARAM wParam, LPARAM lPara case CPT_TEXTW: updateText((WCHAR *)lParam); mir_free((void *)lParam); break;
case CPT_TITLE: updateTitle((char *)lParam); mir_free((void *)lParam); break;
case CPT_TITLEW: updateTitle((WCHAR *)lParam); mir_free((void *)lParam); break;
- case CPT_DATAEX: updateData((POPUPDATAEX_V2 *)lParam); mir_free((void *)lParam); break;
case CPT_DATAW: updateData((POPUPDATAW_V2 *)lParam); mir_free((void *)lParam); break;
}
update();
diff --git a/plugins/Popup/src/popup_wnd2.h b/plugins/Popup/src/popup_wnd2.h index 6fcd148707..ef4760d496 100644 --- a/plugins/Popup/src/popup_wnd2.h +++ b/plugins/Popup/src/popup_wnd2.h @@ -130,7 +130,6 @@ public: void setIcon(HICON);
- void updateData(POPUPDATAEX_V2 *ppd);
void updateData(POPUPDATAW_V2 *ppd);
void updateData(POPUPDATA2 *ppd);
void buildMText();
@@ -215,7 +214,6 @@ public: SendMessage(m_hwnd, UM_CALLMETHOD, (WPARAM)method_copy, (LPARAM)lParam);
}
- LRESULT m_updateData_POPUPDATAEX_V2(LPARAM arg) { updateData((POPUPDATAEX_V2 *)arg); update(); return 0; }
LRESULT m_updateData_POPUPDATAW_V2(LPARAM arg) { updateData((POPUPDATAW_V2 *)arg); update(); return 0; }
LRESULT m_updateData_POPUPDATA2(LPARAM arg) { updateData((POPUPDATA2 *)arg); update(); return 0; }
LRESULT m_updateText(LPARAM arg) { updateText((char *)arg); update(); return 0; }
diff --git a/plugins/Popup/src/services.cpp b/plugins/Popup/src/services.cpp index 74301c89bb..191cb42e47 100644 --- a/plugins/Popup/src/services.cpp +++ b/plugins/Popup/src/services.cpp @@ -89,7 +89,7 @@ INT_PTR PopUp_AddPopUp(WPARAM wParam, LPARAM lParam) {
if (!gbPopupLoaded) return -1;
- POPUPDATAEX_V2 *ppd = (POPUPDATAEX_V2*)wParam;
+ POPUPDATA *ppd = (POPUPDATA*)wParam;
if (!ppd) return -1;
POPUPDATA2 ppd2 = { sizeof(ppd2) };
@@ -103,26 +103,7 @@ INT_PTR PopUp_AddPopUp(WPARAM wParam, LPARAM lParam) ppd2.PluginWindowProc = ppd->PluginWindowProc;
ppd2.PluginData = ppd->PluginData;
ppd2.iSeconds = ppd->iSeconds;
-
- if (lParam&APF_NEWDATA)
- {
- ppd2.lchNotification = ppd->hNotification;
- ppd2.actionCount = ppd->actionCount;
- ppd2.lpActions = ppd->lpActions;
-// ppd2.hbmAvatar = ppd->hbmAvatar;
- }
-
return PopUp_AddPopUp2((WPARAM)&ppd2, lParam);
-
-/*
- if (lParam & APF_RETURN_HWND)
- {
- while (!wnd->bWindowCreated) Sleep(1);
- return (int)wnd->getHwnd();
- }
-
- return 1;
-*/
}
//===== PopUp/AddPopupW
@@ -146,25 +127,13 @@ INT_PTR PopUp_AddPopUpW(WPARAM wParam, LPARAM lParam) ppd2.PluginData = ppd->PluginData;
ppd2.iSeconds = ppd->iSeconds;
- if (lParam&APF_NEWDATA)
- {
+ if (lParam & APF_NEWDATA) {
ppd2.lchNotification = ppd->hNotification;
ppd2.actionCount = ppd->actionCount;
ppd2.lpActions = ppd->lpActions;
-// ppd2.hbmAvatar = ppd->hbmAvatar;
}
return PopUp_AddPopUp2((WPARAM)&ppd2, lParam);
-
-/*
- if (lParam & APF_RETURN_HWND)
- {
- while (!wnd->bWindowCreated) Sleep(1);
- return (int)wnd->getHwnd();
- }
-
- return 1;
-*/
}
//===== PopUp/AddPopup2
@@ -284,11 +253,12 @@ INT_PTR PopUp_GetContact(WPARAM wParam, LPARAM lParam) //===== PopUp/GetPluginData
INT_PTR PopUp_GetPluginData(WPARAM wParam, LPARAM lParam)
{
- if (!gbPopupLoaded) return -1;
+ if (!gbPopupLoaded || !wParam)
+ return -1;
- HWND hwnd = (HWND)wParam;
- PopupWnd2 *wnd = (PopupWnd2 *)GetWindowLongPtr(hwnd, GWLP_USERDATA);
- if (wnd && IsValidPopupObject(wnd)) return (INT_PTR)wnd->getData();
+ PopupWnd2 *wnd = (PopupWnd2 *)GetWindowLongPtr((HWND)wParam, GWLP_USERDATA);
+ if (wnd && IsValidPopupObject(wnd))
+ return (INT_PTR)wnd->getData();
return (INT_PTR)(-1);
}
@@ -298,71 +268,31 @@ INT_PTR PopUp_IsSecondLineShown(WPARAM wParam, LPARAM lParam) return 1;
}
-//===== PopUp/ChangeText
-INT_PTR PopUp_ChangeText(WPARAM wParam, LPARAM lParam)
-{
- if (!gbPopupLoaded) return -1;
-
- if (!wParam) return -1;
- PopupWnd2 *wnd = (PopupWnd2 *)GetWindowLongPtr((HWND)wParam, GWLP_USERDATA);
- if (!wnd || !IsValidPopupObject(wnd)) return -1;
- wnd->callMethodSync(&PopupWnd2::m_updateText, lParam);
-/*
- char *str = (char *)mir_alloc(sizeof(char) * (strlen((char *)lParam) + 1));
- strcpy(str, (char *)lParam);
- PostMessage((HWND)wParam, UM_CHANGEPOPUP, CPT_TEXT, (LPARAM)str);
-*/
- return 0;
-}
-
//===== PopUp/ChangeTextW
INT_PTR PopUp_ChangeTextW(WPARAM wParam, LPARAM lParam)
{
- if (!gbPopupLoaded) return -1;
+ if (!gbPopupLoaded || !wParam)
+ return -1;
- if (!wParam) return -1;
PopupWnd2 *wnd = (PopupWnd2 *)GetWindowLongPtr((HWND)wParam, GWLP_USERDATA);
- if (!wnd || !IsValidPopupObject(wnd)) return -1;
- wnd->callMethodSync(&PopupWnd2::m_updateTextW, lParam);
-/*
- WCHAR *str = (WCHAR *)mir_alloc(sizeof(WCHAR) * (wcslen((WCHAR *)lParam) + 1));
- wcscpy(str, (WCHAR *)lParam);
- PostMessage((HWND)wParam, UM_CHANGEPOPUP, CPT_TEXTW, (LPARAM)str);
-*/
- return 0;
-}
-
-//===== PopUp/Change
-INT_PTR PopUp_Change(WPARAM wParam, LPARAM lParam)
-{
- if (!gbPopupLoaded) return -1;
+ if (!wnd || !IsValidPopupObject(wnd))
+ return -1;
- if (!wParam) return -1;
- PopupWnd2 *wnd = (PopupWnd2 *)GetWindowLongPtr((HWND)wParam, GWLP_USERDATA);
- if (!wnd || !IsValidPopupObject(wnd)) return -1;
- wnd->callMethodSync(&PopupWnd2::m_updateData_POPUPDATAEX_V2, lParam);
-/*
- POPUPDATAEX_V2 *ppdx = (POPUPDATAEX_V2 *)mir_alloc(sizeof(POPUPDATAEX_V2));
- memcpy(ppdx, (POPUPDATAEX_V2 *)lParam, sizeof(POPUPDATAEX_V2));
- PostMessage((HWND)wParam, UM_CHANGEPOPUP, CPT_DATA, (LPARAM)ppdx);
-*/
+ wnd->callMethodSync(&PopupWnd2::m_updateTextW, lParam);
return 0;
}
//===== PopUp/ChangeW
INT_PTR PopUp_ChangeW(WPARAM wParam, LPARAM lParam)
{
- if (!gbPopupLoaded) return -1;
+ if (!gbPopupLoaded || !wParam)
+ return -1;
- if (!wParam) return -1;
PopupWnd2 *wnd = (PopupWnd2 *)GetWindowLongPtr((HWND)wParam, GWLP_USERDATA);
- if (!wnd || !IsValidPopupObject(wnd)) return -1;
+ if (!wnd || !IsValidPopupObject(wnd))
+ return -1;
+
wnd->callMethodSync(&PopupWnd2::m_updateData_POPUPDATAW_V2, lParam);
-/*
- POPUPDATAW_V2 *ppdw = (POPUPDATAW_V2 *)mir_alloc(sizeof(POPUPDATAW_V2));
- memcpy(ppdw, (POPUPDATAW_V2 *)lParam, sizeof(POPUPDATAW_V2));
- PostMessage((HWND)wParam, UM_CHANGEPOPUP, CPT_DATA, (LPARAM)ppdw);
-*/
return 0;
}
diff --git a/plugins/Popup/src/services.h b/plugins/Popup/src/services.h index ab0f0ddb43..30258db64a 100644 --- a/plugins/Popup/src/services.h +++ b/plugins/Popup/src/services.h @@ -34,10 +34,8 @@ INT_PTR PopUp_AddPopUp2(WPARAM, LPARAM); INT_PTR PopUp_GetContact(WPARAM, LPARAM);
INT_PTR PopUp_IsSecondLineShown(WPARAM, LPARAM);
-INT_PTR PopUp_ChangeText(WPARAM, LPARAM);
INT_PTR PopUp_ChangeTextW(WPARAM, LPARAM);
-INT_PTR PopUp_Change(WPARAM, LPARAM);
INT_PTR PopUp_ChangeW(WPARAM, LPARAM);
INT_PTR PopUp_Change2(WPARAM, LPARAM);
diff --git a/plugins/YAPP/src/services.cpp b/plugins/YAPP/src/services.cpp index 0dab66ce86..2a22a6d99e 100644 --- a/plugins/YAPP/src/services.cpp +++ b/plugins/YAPP/src/services.cpp @@ -121,18 +121,6 @@ static INT_PTR ChangeTextW(WPARAM wParam, LPARAM lParam) return 0;
}
-static INT_PTR ChangeTextA(WPARAM wParam, LPARAM lParam)
-{
- HWND hwndPop = (HWND)wParam;
- char *newText = (char *)lParam;
- mir_ptr<wchar_t> buff( mir_a2u(newText));
- StripBBCodesInPlace(buff);
-
- if (IsWindow(hwndPop))
- SendMessage(hwndPop, PUM_SETTEXT, 0, (LPARAM)buff);
- return 0;
-}
-
void ShowPopup(PopupData &pd_in)
{
PopupData *pd_out = (PopupData *)mir_alloc(sizeof(PopupData));
@@ -240,42 +228,6 @@ static INT_PTR TogglePopups(WPARAM wParam, LPARAM lParam) return 0;
}
-static INT_PTR PopupChangeA(WPARAM wParam, LPARAM lParam)
-{
- HWND hwndPop = (HWND)wParam;
- POPUPDATA *pd_in = (POPUPDATA *)lParam;
-
- if (IsWindow(hwndPop)) {
- PopupData pd_out;
- pd_out.cbSize = sizeof(PopupData);
- pd_out.flags = PDF_UNICODE;
-
- pd_out.pwzTitle = mir_a2u(pd_in->lpzContactName);
- pd_out.pwzText = mir_a2u(pd_in->lpzText);
- StripBBCodesInPlace(pd_out.pwzTitle);
- StripBBCodesInPlace(pd_out.pwzText);
-
- pd_out.hContact = pd_in->lchContact;
- pd_out.SetIcon(pd_in->lchIcon);
- if (pd_in->colorBack == 0xffffffff) // that's the old #define for 'skinned bg'
- pd_out.colorBack = pd_out.colorText = 0;
- else {
- pd_out.colorBack = pd_in->colorBack & 0xFFFFFF;
- pd_out.colorText = pd_in->colorText & 0xFFFFFF;
- }
- pd_out.colorBack = pd_in->colorBack;
- pd_out.colorText = pd_in->colorText;
- pd_out.windowProc = pd_in->PluginWindowProc;
- pd_out.opaque = pd_in->PluginData;
- pd_out.timeout = pd_in->iSeconds;
-
- lstPopupHistory.Add(pd_out.pwzTitle, pd_out.pwzText, time(0));
-
- SendMessage(hwndPop, PUM_CHANGE, 0, (LPARAM)&pd_out);
- }
- return 0;
-}
-
static INT_PTR PopupChangeW(WPARAM wParam, LPARAM lParam)
{
HWND hwndPop = (HWND)wParam;
@@ -419,8 +371,6 @@ void InitServices() CreateServiceFunction(MS_POPUP_ADDPOPUP, CreatePopup);
CreateServiceFunction(MS_POPUP_ADDPOPUPW, CreatePopupW);
CreateServiceFunction(MS_POPUP_CHANGETEXTW, ChangeTextW);
- CreateServiceFunction(MS_POPUP_CHANGETEXT, ChangeTextA);
- CreateServiceFunction(MS_POPUP_CHANGE, PopupChangeA);
CreateServiceFunction(MS_POPUP_CHANGEW, PopupChangeW);
CreateServiceFunction(MS_POPUP_GETCONTACT, GetContact);
CreateServiceFunction(MS_POPUP_GETPLUGINDATA, GetOpaque);
|