summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-03-14 21:05:30 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-03-14 21:05:30 +0000
commit45358c3507af7d4bb32c031eaa25708905effa91 (patch)
tree202fd149b18a39cfe6314f037421cf8d4fe2e842
parentae5bb5cc96d0f0add1d1189c2a3293daaea83d6f (diff)
old ansi popups removed, noone used them anyway
git-svn-id: http://svn.miranda-ng.org/main/trunk@4034 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--bin10/pascal32.bat15
-rw-r--r--bin10/pascal64.bat14
-rw-r--r--include/delphi/m_popup.inc21
-rw-r--r--include/m_popup.h53
-rw-r--r--plugins/!NotAdopted/Chess4Net/MI/MirandaINC/m_popup.inc6
-rw-r--r--plugins/Actman/i_inoutxm.inc78
-rw-r--r--plugins/Alarms/src/alarmlist.cpp88
-rw-r--r--plugins/Alarms/src/options.cpp4
-rw-r--r--plugins/BuddyExpectator/src/options.cpp6
-rw-r--r--plugins/ChangeKeyboardLayout/src/hook_events.cpp5
-rw-r--r--plugins/ClientChangeNotify/src/ClientChangeNotify.cpp8
-rw-r--r--plugins/Clist_modern/src/modern_popup.cpp6
-rw-r--r--plugins/DbEditorPP/src/watchedvars.cpp65
-rw-r--r--plugins/Db_autobackups/src/options.cpp2
-rw-r--r--plugins/ExternalAPI/m_popup2.h2
-rw-r--r--plugins/FileAsMessage/src/dialog.cpp8
-rw-r--r--plugins/HTTPServer/src/GuiElements.cpp8
-rw-r--r--plugins/MenuItemEx/src/main.cpp4
-rw-r--r--plugins/NewEventNotify/src/options.cpp5
-rw-r--r--plugins/NewXstatusNotify/src/options.cpp2
-rw-r--r--plugins/NotifyAnything/src/main.cpp4
-rw-r--r--plugins/PackUpdater/Src/Notifications.cpp11
-rw-r--r--plugins/PackUpdater/Src/Options.cpp114
-rw-r--r--plugins/PackUpdater/Src/Utils.cpp10
-rw-r--r--plugins/Ping/src/options.cpp2
-rw-r--r--plugins/Ping/src/utils.cpp10
-rw-r--r--plugins/PluginUpdater/src/Notifications.cpp2
-rw-r--r--plugins/Popup/src/main.cpp1
-rw-r--r--plugins/Popup/src/popup_wnd2.cpp30
-rw-r--r--plugins/Popup/src/popup_wnd2.h2
-rw-r--r--plugins/Popup/src/services.cpp37
-rw-r--r--plugins/Popup/src/services.h3
-rw-r--r--plugins/Scriver/src/msgs.cpp6
-rw-r--r--plugins/SecureIM/src/main.cpp4
-rw-r--r--plugins/SendScreenshotPlus/src/Main.cpp42
-rw-r--r--plugins/SendScreenshotPlus/src/Utils.cpp15
-rw-r--r--plugins/SendScreenshotPlus/src/global.h2
-rw-r--r--plugins/SplashScreen/src/debug.h8
-rw-r--r--plugins/StatusPlugins/KeepStatus/keepstatus.cpp4
-rw-r--r--plugins/StatusPlugins/KeepStatus/options.cpp10
-rw-r--r--plugins/TabSRMM/src/globals.cpp4
-rw-r--r--plugins/TabSRMM/src/typingnotify.cpp5
-rw-r--r--plugins/TrafficCounter/src/TrafficCounter.cpp6
-rw-r--r--plugins/WhenWasIt/src/dlg_handlers.cpp2
-rw-r--r--plugins/WhoUsesMyFiles/src/wumfplug.cpp53
-rw-r--r--plugins/YAMN/src/proto/pop3/pop3opt.cpp2
-rw-r--r--plugins/YAPP/src/services.cpp122
-rw-r--r--protocols/IcqOscarJ/src/icq_popups.cpp59
-rw-r--r--protocols/IcqOscarJ/src/init.cpp2
-rw-r--r--protocols/MRA/src/MraPopUp.cpp3
-rw-r--r--protocols/Tlen/src/jabber_opt.cpp23
-rw-r--r--protocols/Tlen/src/jabber_thread.cpp44
-rw-r--r--protocols/Xfire/src/tools.cpp4
-rw-r--r--protocols/Yahoo/src/util.cpp2
-rw-r--r--src/core/stdchat/src/services.cpp2
55 files changed, 414 insertions, 636 deletions
diff --git a/bin10/pascal32.bat b/bin10/pascal32.bat
index 3edb4664e1..17db2ba432 100644
--- a/bin10/pascal32.bat
+++ b/bin10/pascal32.bat
@@ -4,32 +4,45 @@ pushd ..\plugins
pushd Actman
call make.bat fpc 10
+if errorlevel 1 goto :Error
popd
pushd ImportTXT
call make.bat fpc 10
+if errorlevel 1 goto :Error
popd
pushd mRadio
call make.bat fpc 10
+if errorlevel 1 goto :Error
popd
pushd QuickSearch
call make.bat fpc 10
+if errorlevel 1 goto :Error
popd
pushd ShlExt
call make.bat fpc 10
+if errorlevel 1 goto :Error
popd
pushd Watrack
call make.bat fpc 10
+if errorlevel 1 goto :Error
cd icons
call makeicons.bat fpc 10
+if errorlevel 1 goto :Error
popd
pushd Dbx_mmap_SA\Cryptors\Athena
call make.bat fpc 10
+if errorlevel 1 goto :Error
popd
-popd \ No newline at end of file
+popd
+goto :eof
+
+:Error
+echo ============================= FAIL! =============================
+exit
diff --git a/bin10/pascal64.bat b/bin10/pascal64.bat
index 2ef0d764de..b3772d3a81 100644
--- a/bin10/pascal64.bat
+++ b/bin10/pascal64.bat
@@ -4,28 +4,40 @@ pushd ..\plugins
pushd Actman
call make.bat fpc64 10
+if errorlevel 1 goto :Error
popd
pushd mRadio
call make.bat fpc64 10
+if errorlevel 1 goto :Error
popd
pushd QuickSearch
call make.bat fpc64 10
+if errorlevel 1 goto :Error
popd
pushd ShlExt
call make.bat fpc64 10
+if errorlevel 1 goto :Error
popd
pushd Watrack
call make.bat fpc64 10
+if errorlevel 1 goto :Error
cd icons
call makeicons.bat fpc64 10
+if errorlevel 1 goto :Error
popd
pushd Dbx_mmap_SA\Cryptors\Athena
call make.bat fpc64 10
+if errorlevel 1 goto :Error
popd
-popd \ No newline at end of file
+popd
+goto :eof
+
+:Error
+echo ============================= FAIL! =============================
+exit
diff --git a/include/delphi/m_popup.inc b/include/delphi/m_popup.inc
index 57a25e88a7..0ec2450daa 100644
--- a/include/delphi/m_popup.inc
+++ b/include/delphi/m_popup.inc
@@ -54,26 +54,8 @@ type
end;
type
- // for info on what this stuff is, see m_popup.h
PPOPUPDATA = ^TPOPUPDATA;
TPOPUPDATA = record
- lchContact : THANDLE; // Handle to the contact, can be NULL (main contact).
- lchIcon : HICON; // Handle to a icon to be shown. Cannot be NULL.
-// This is the contact name or the first line in the plugin. Cannot be NULL.
- lpszContactName : array [0..MAX_CONTACTNAME-1] of AnsiChar;
-// This is the second line text. Users can choose to hide it. Cannot be NULL.
- lpszText : array [0..MAX_SECONDLINE-1] of AnsiChar;
- colorBack : COLORREF; // COLORREF to be used for the background.
- // Can be NULL, default will be used.
- colorText : COLORREF; // COLORREF to be used for the text.
- // Can be NULL, default will be used.
- PluginWindowProc: pointer; // Read below. Can be NULL; default will be used.
- PluginData : Pointer; // Read below. Can be NULL.
- end;
-
-type
- PPOPUPDATAEX = ^TPOPUPDATAEX;
- TPOPUPDATAEX = record
lchContact : THANDLE;
lchIcon : HICON;
lpszContactName : array [0..MAX_CONTACTNAME-1] of AnsiChar;
@@ -180,9 +162,8 @@ You may pass additional creation flags via lParam:
APF_NO_POPUP = 8;
APF_NEWDATA = $10;
- MS_POPUP_ADDPOPUP :PAnsiChar = 'PopUp/AddPopUp';
MS_POPUP_ADDPOPUPW :PAnsiChar = 'PopUp/AddPopUpW';
- MS_POPUP_ADDPOPUPEX:PAnsiChar = 'PopUp/AddPopUpEx';
+ MS_POPUP_ADDPOPUP :PAnsiChar = 'PopUp/AddPopUpEx';
{
Returns the handle to the contact associated to the specified PopUpWindow.
diff --git a/include/m_popup.h b/include/m_popup.h
index 835cdff9e0..aeebbb6ab3 100644
--- a/include/m_popup.h
+++ b/include/m_popup.h
@@ -29,27 +29,6 @@ mi.position = 0; //You don't need it and it's better if you put it to zero.
#define MAX_CONTACTNAME 2048
#define MAX_SECONDLINE 2048
-// This is the basic data you'll need to fill and pass to the service function.
-typedef struct
-{
- HANDLE lchContact; // Handle to the contact, can be NULL (main contact).
- HICON lchIcon; // Handle to a icon to be shown. Cannot be NULL.
- union
- {
- char lptzContactName[MAX_CONTACTNAME]; // This is the contact name or the first line in the plugin. Cannot be NULL.
- char lpzContactName[MAX_CONTACTNAME];
- };
- union
- {
- char lptzText[MAX_SECONDLINE]; // This is the second line text. Users can choose to hide it. Cannot be NULL.
- char lpzText[MAX_SECONDLINE];
- };
- COLORREF colorBack; // COLORREF to be used for the background. Can be NULL, default will be used.
- COLORREF colorText; // COLORREF to be used for the text. Can be NULL, default will be used.
- WNDPROC PluginWindowProc; // Read below. Can be NULL; default will be used.
- void * PluginData; // Read below. Can be NULL.
-} POPUPDATA, * LPPOPUPDATA;
-
// Extended popup data
typedef struct
{
@@ -68,12 +47,12 @@ typedef struct
COLORREF colorBack;
COLORREF colorText;
WNDPROC PluginWindowProc;
- void * PluginData;
+ void *PluginData;
int iSeconds; // Custom delay time in seconds. -1 means "forever", 0 means "default time".
char cZero[16]; // Some unused bytes which may come useful in the future.
-} POPUPDATAEX, *LPPOPUPDATAEX;
+} POPUPDATA, *LPPOPUPDATA;
-// Unicode version of POPUPDATAEX
+// Unicode version of POPUPDATA
typedef struct
{
HANDLE lchContact;
@@ -91,17 +70,17 @@ typedef struct
COLORREF colorBack;
COLORREF colorText;
WNDPROC PluginWindowProc;
- void * PluginData;
+ void *PluginData;
int iSeconds;
char cZero[16];
} POPUPDATAW, *LPPOPUPDATAW;
#if defined(_UNICODE) || defined(UNICODE)
- typedef POPUPDATAW POPUPDATAT;
+ typedef POPUPDATAW POPUPDATAT;
typedef LPPOPUPDATAW LPPOPUPDATAT;
#else
- typedef POPUPDATAEX POPUPDATAT;
- typedef LPPOPUPDATAEX LPPOPUPDATAT;
+ typedef POPUPDATA POPUPDATAT;
+ typedef LPPOPUPDATA LPPOPUPDATAT;
#endif
/* PopUp/AddPopup
@@ -123,16 +102,11 @@ You may pass additional creation flags via lParam:
#define APF_RETURN_HWND 0x1
#define APF_CUSTOM_POPUP 0x2
-#define MS_POPUP_ADDPOPUP "PopUp/AddPopUp"
+#define MS_POPUP_ADDPOPUP "PopUp/AddPopUpEx"
static INT_PTR __inline PUAddPopUp(POPUPDATA* ppdp) {
return CallService(MS_POPUP_ADDPOPUP, (WPARAM)ppdp, 0);
}
-#define MS_POPUP_ADDPOPUPEX "PopUp/AddPopUpEx"
-static INT_PTR __inline PUAddPopUpEx(POPUPDATAEX* ppdp) {
- return CallService(MS_POPUP_ADDPOPUPEX, (WPARAM)ppdp, 0);
-}
-
#define MS_POPUP_ADDPOPUPW "PopUp/AddPopUpW"
static INT_PTR __inline PUAddPopUpW(POPUPDATAW* ppdp) {
return CallService(MS_POPUP_ADDPOPUPW, (WPARAM)ppdp, 0);
@@ -142,8 +116,8 @@ static INT_PTR __inline PUAddPopUpW(POPUPDATAW* ppdp) {
#define MS_POPUP_ADDPOPUPT MS_POPUP_ADDPOPUPW
#define PUAddPopUpT PUAddPopUpW
#else
- #define MS_POPUP_ADDPOPUPT MS_POPUP_ADDPOPUPEX
- #define PUAddPopUpT PUAddPopUpEx
+ #define MS_POPUP_ADDPOPUPT MS_POPUP_ADDPOPUP
+ #define PUAddPopUpT PUAddPopUp
#endif
@@ -270,10 +244,10 @@ static int __inline PUChangeTextW(HWND hWndPopUp, LPCWSTR lpwzNewText) {
Changes the entire popup
wParam = (WPARAM)(HWND)hPopUpWindow
-lParam = (LPARAM)(POPUPDATAEX*)newData
+lParam = (LPARAM)(POPUPDATA*)newData
*/
#define MS_POPUP_CHANGE "PopUp/Change"
-static int __inline PUChange(HWND hWndPopUp, POPUPDATAEX *newData) {
+static int __inline PUChange(HWND hWndPopUp, POPUPDATA *newData) {
return (int)CallService(MS_POPUP_CHANGE, (WPARAM)hWndPopUp, (LPARAM)newData);
}
@@ -301,8 +275,7 @@ lParam = value of type defined by wParam
#define CPT_TEXTW 2 // lParam = (WCHAR *)text
#define CPT_TITLE 3 // lParam = (char *)title
#define CPT_TITLEW 4 // lParam = (WCHAR *)title
-#define CPT_DATA 5 // lParam = (POPUPDATA *)data
-#define CPT_DATAEX 6 // lParam = (POPUPDATAEX *)data
+#define CPT_DATAEX 6 // lParam = (POPUPDATA *)data
#define CPT_DATAW 7 // lParam = (POPUPDATAW *)data
#define UM_CHANGEPOPUP (WM_USER + 0x0203)
diff --git a/plugins/!NotAdopted/Chess4Net/MI/MirandaINC/m_popup.inc b/plugins/!NotAdopted/Chess4Net/MI/MirandaINC/m_popup.inc
index f8d2ea9df9..22c5c01835 100644
--- a/plugins/!NotAdopted/Chess4Net/MI/MirandaINC/m_popup.inc
+++ b/plugins/!NotAdopted/Chess4Net/MI/MirandaINC/m_popup.inc
@@ -52,8 +52,8 @@ type
// for info on what this stuff is, see m_popup.h
- PPOPUPDATAEX = ^TPOPUPDATAEX;
- TPOPUPDATAEX = record
+ PPOPUPDATA = ^TPOPUPDATA;
+ TPOPUPDATA = record
lchContact: HCONTACT;
lchIcon: THandle;
lpszContactName: array[0..MAX_CONTACTNAME-1] of Char;
@@ -85,7 +85,7 @@ const
lParam = 0
*)
- MS_POPUP_ADDPOPUPEX = 'PopUp/AddPopUpEx';
+ MS_POPUP_ADDPOPUP = 'PopUp/AddPopUpEx';
(*
Returns the handle to the contact associated to the specified PopUpWindow.
diff --git a/plugins/Actman/i_inoutxm.inc b/plugins/Actman/i_inoutxm.inc
index 8795d566e7..febe8e55d2 100644
--- a/plugins/Actman/i_inoutxm.inc
+++ b/plugins/Actman/i_inoutxm.inc
@@ -6,13 +6,13 @@ const
ioRoot :PWideChar = 'ActMan_Export';
ioAction :PWideChar = 'Action';
ioSubAction :PWideChar = 'SubAction';
- ioContactWindow:PWideChar = 'ContactWindow';
- ioCallService :PWideChar = 'CallService';
- ioRunProgram :PWideChar = 'RunProgram';
- ioInsertText :PWideChar = 'InsertText';
- ioAdvanced :PWideChar = 'Advanced';
- ioLinkAction :PWideChar = 'LinkAction';
- ioProfile :PWideChar = 'Profile';
+ ioContactWindow:PWideChar = 'Contact';
+ ioCallService :PWideChar = 'Service';
+ ioRunProgram :PWideChar = 'Program';
+ ioInsertText :PWideChar = 'In/Out';
+ ioAdvanced :PWideChar = 'Jump';
+ ioLinkAction :PWideChar = 'Chain';
+ ioProfile :PWideChar = 'Database';
ioMessageBox :PWideChar = 'MessageBox';
ioWParam :PWideChar = 'WPARAM';
ioLParam :PWideChar = 'LPARAM';
@@ -21,6 +21,7 @@ const
ioIf :PWideChar = 'IF';
ioAct :PWideChar = 'ACT';
ioOutput :PWideChar = 'OUTPUT';
+ ioClass :PWideChar = 'class';
// Attributes
ioType :PWideChar = 'type';
ioInverse :PWideChar = 'inverse';
@@ -273,7 +274,7 @@ begin
actnode:=getChild(actnode,0);
tmp:=getName(actnode);
-MessageBoxW(0,tmp,'node',0);
+//MessageBoxW(0,tmp,'node',0);
// CONTACT
if StrCmpW(tmp,ioContactWindow)=0 then
@@ -290,7 +291,7 @@ MessageBoxW(0,tmp,'node',0);
begin
actionType:=ACT_SERVICE;
FastWideToAnsi(getAttrValue(actnode,ioService),service);
-MessageBoxA(0,service,'service',0);
+//MessageBoxA(0,service,'service',0);
if StrToInt(getAttrValue(actnode,ioVariables))=1 then
flags2:=flags2 or ACF2_SRV_SRVC;
@@ -322,7 +323,7 @@ MessageBoxA(0,service,'service',0);
else if lstrcmpiw(tmp,ioHex )=0 then flags:=flags or ACF_HEX
else if lstrcmpiw(tmp,ioStruct )=0 then flags:=flags or ACF_STRUCT
else if lstrcmpiw(tmp,ioInt )=0 then ;
-MessageBoxW(0,'','end',0);
+//MessageBoxW(0,'','end',0);
end
// PROGRAM
@@ -571,7 +572,7 @@ begin
BlockRead(f,res^,i);
CloseHandle(f);
-MessageBoxW(0,res,'SRC',0);
+//MessageBoxW(0,res,'SRC',0);
xmlparser.cbSize:={XML_API_SIZEOF_V1;//}SizeOf(XML_API_W);
CallService(MS_SYSTEM_GET_XI,0,lparam(@xmlparser));
with xmlparser do
@@ -582,10 +583,10 @@ MessageBoxW(0,res,'SRC',0);
repeat
actnode:=getNthChild(root,ioAction,j);
if actnode=0 then break;
-MessageBoxW(0,'not zero','actnode',0);
+//MessageBoxW(0,'not zero','actnode',0);
//?? if StrCmpW(getName(actnode),ioAction)<>0 then break;
tmp:=getAttrValue(actnode,ioName);
-MessageBoxW(0,tmp,'nodename',0);
+//MessageBoxW(0,tmp,'nodename',0);
if tmp<>nil then //!!
begin
i:=GetActIdxByName(tmp);
@@ -620,7 +621,7 @@ MessageBoxW(0,tmp,'nodename',0);
StrDupW(descr,tmp);
i:=0;
last:=-1;
-MessageBoxW(0,descr,'descr',0);
+//MessageBoxW(0,descr,'descr',0);
repeat
next:=ImportAction(getChild(actnode,i));
if next=0 then
@@ -851,14 +852,18 @@ begin
case actionType of
// ----- CONTACT -----
ACT_CONTACT: begin
- sub:=AddChild(actnode,ioContactWindow,nil);
+ AddAttr(actnode,ioClass,ioContactWindow);
+ sub:=actnode;
+// sub:=AddChild(actnode,ioContactWindow,nil);
ExportContact(sub,contact);
// AddAttrInt(sub,ioNumber,0); // contact
if (flags and ACF_KEEPONLY)<>0 then AddAttrInt(sub,ioKeepOnly,1);
end;
// ----- SERVICE -----
ACT_SERVICE: begin
- sub:=AddChild(actnode,ioCallService,nil);
+ AddAttr(actnode,ioClass,ioCallService);
+ sub:=actnode;
+// sub:=AddChild(actnode,ioCallService,nil);
AddAttr(sub,ioService,FastAnsiToWide(service,tmp));
if (flags2 and ACF2_SRV_SRVC)<>0 then AddAttrInt(sub,ioVariables,1);
mFreeMem(tmp);
@@ -898,7 +903,10 @@ begin
end;
// ----- PROGRAM -----
ACT_PROGRAM: begin
- sub:=AddChild(actnode,ioRunProgram,prgname);
+ AddAttr(actnode,ioClass,ioRunProgram);
+ setText(actnode,prgname);
+ sub:=actnode;
+// sub:=AddChild(actnode,ioRunProgram,prgname);
if args<>nil then
AddAttr(sub,ioArgs,args);
if (flags and ACF_CURPATH)<>0 then AddAttrInt(sub,ioCurrent,1);
@@ -920,10 +928,21 @@ begin
// ----- TEXT -----
ACT_TEXT: begin
if (flags and ACF_CLIPBRD)<>0 then
- tmp:=nil
+ begin
+ AddAttr(actnode,ioClass,ioInsertText);
+ end
else
- tmp:=text;
- sub:=AddChild(actnode,ioInsertText,tmp);
+ begin
+ if (flags and ACF_FILE)<>0 then
+ AddAttr(actnode,ioClass,ioInsertText)
+ else
+ begin
+ AddAttr(actnode,ioClass,'Text');
+ setText(actnode,text);
+ end;
+ end;
+ sub:=actnode;
+// sub:=AddChild(actnode,ioInsertText,tmp);
if (flags and ACF_CLIPBRD)<>0 then
begin
AddAttr(sub,ioObject,ioClipboard);
@@ -973,7 +992,9 @@ begin
end;
// ----- ADVANCED -----
ACT_ADVANCE: begin
- sub:=AddChild(actnode,ioAdvanced,nil);
+ AddAttr(actnode,ioClass,ioAdvanced);
+ sub:=actnode;
+// sub:=AddChild(actnode,ioAdvanced,nil);
if lobyte(condition)<>0 then
begin
act:=AddChild(sub,ioIf,nil);
@@ -986,6 +1007,7 @@ begin
else
s:=ioNop;
end;
+ AddAttr(act,ioOper,'math');
AddAttr(act,ioCond,s);
AddAttrInt(act,ioValue,value);
end;
@@ -1048,7 +1070,9 @@ begin
s:=actname
else
s:=GetActNameById(id);
- AddChild(actnode,ioLinkAction,s);
+ AddAttr(actnode,ioClass,ioLinkAction);
+ setText(actnode,s);
+// AddChild(actnode,ioLinkAction,s);
end;
// ----- DATABASE -----
ACT_RW: begin
@@ -1056,7 +1080,10 @@ begin
tmp:=nil
else
tmp:=pWideChar(dbvalue);
- sub:=AddChild(actnode,ioProfile,tmp);
+ AddAttr(actnode,ioClass,ioProfile);
+ setText(actnode,tmp);
+ sub:=actnode;
+// sub:=AddChild(actnode,ioProfile,tmp);
if (flags and ACF_DBDELETE)<>0 then s:=ioDelete
else if (flags and ACF_DBWRITE )<>0 then s:=ioWrite
else s:=ioRead;
@@ -1091,7 +1118,10 @@ begin
end;
// ----- MESSAGEBOX -----
ACT_MESSAGE: begin
- sub:=AddChild(actnode,ioMessageBox,msgtext);
+ AddAttr(actnode,ioClass,ioMessageBox);
+ setText(actnode,msgtext);
+ sub:=actnode;
+// sub:=AddChild(actnode,ioMessageBox,msgtext);
if (flags2 and ACF2_MSG_TTL)<>0 then AddAttrInt(sub,ioVariables ,1);
if (flags2 and ACF2_MSG_TXT)<>0 then AddAttrInt(sub,ioArgVariable,1);
if (flags and ACF_MSG_KEEP)<>0 then AddAttrInt(sub,ioKeepLast ,1);
diff --git a/plugins/Alarms/src/alarmlist.cpp b/plugins/Alarms/src/alarmlist.cpp
index 569f17d2f7..1e550be85d 100644
--- a/plugins/Alarms/src/alarmlist.cpp
+++ b/plugins/Alarms/src/alarmlist.cpp
@@ -473,80 +473,76 @@ void suspend(unsigned short alarm_id) {
static LRESULT CALLBACK PopupAlarmDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch(message) {
- case WM_COMMAND: // snooze
- if (HIWORD(wParam) == STN_CLICKED) { //It was a click on the Popup.
- ALARM *mpd = NULL;
- mpd = (ALARM *)CallService(MS_POPUP_GETPLUGINDATA, (WPARAM)hWnd,(LPARAM)mpd);
+ case WM_COMMAND: // snooze
+ if (HIWORD(wParam) == STN_CLICKED) { //It was a click on the Popup.
+ ALARM *mpd = NULL;
+ mpd = (ALARM *)CallService(MS_POPUP_GETPLUGINDATA, (WPARAM)hWnd,(LPARAM)mpd);
- if (mpd->flags & ALF_NOSNOOZE)
- return TRUE;
+ if (mpd->flags & ALF_NOSNOOZE)
+ return TRUE;
- // add snooze minutes to current time
- FILETIME ft;
- GetLocalTime(&mpd->time);
- SystemTimeToFileTime(&mpd->time, &ft);
- ULARGE_INTEGER uli;
- uli.LowPart = ft.dwLowDateTime;
- uli.HighPart = ft.dwHighDateTime;
+ // add snooze minutes to current time
+ FILETIME ft;
+ GetLocalTime(&mpd->time);
+ SystemTimeToFileTime(&mpd->time, &ft);
+ ULARGE_INTEGER uli;
+ uli.LowPart = ft.dwLowDateTime;
+ uli.HighPart = ft.dwHighDateTime;
- uli.QuadPart += mult.QuadPart * options.snooze_minutes;
+ uli.QuadPart += mult.QuadPart * options.snooze_minutes;
- ft.dwHighDateTime = uli.HighPart;
- ft.dwLowDateTime = uli.LowPart;
+ ft.dwHighDateTime = uli.HighPart;
+ ft.dwLowDateTime = uli.LowPart;
- FileTimeToSystemTime(&ft, &mpd->time);
+ FileTimeToSystemTime(&ft, &mpd->time);
- mpd->occurrence = OC_ONCE;
- mpd->snoozer = true;
- mpd->flags = mpd->flags & ~(ALF_NOSTARTUP);
+ mpd->occurrence = OC_ONCE;
+ mpd->snoozer = true;
+ mpd->flags = mpd->flags & ~(ALF_NOSTARTUP);
- mpd->id = next_alarm_id++;
+ mpd->id = next_alarm_id++;
- append_to_list(mpd);
- }
+ append_to_list(mpd);
+ }
- PUDeletePopUp(hWnd);
- return TRUE;
- case WM_CONTEXTMENU:
- PUDeletePopUp(hWnd);
- return TRUE;
- case UM_FREEPLUGINDATA:
- {
- ALARM *mpd = NULL;
- mpd = (ALARM *)CallService(MS_POPUP_GETPLUGINDATA, (WPARAM)hWnd,(LPARAM)mpd);
- if (mpd > 0) {
- free_alarm_data(mpd);
- delete mpd;
- }
- return TRUE;
- }
- default:
- break;
+ PUDeletePopUp(hWnd);
+ return TRUE;
+
+ case WM_CONTEXTMENU:
+ PUDeletePopUp(hWnd);
+ return TRUE;
+
+ case UM_FREEPLUGINDATA:
+ ALARM *mpd = (ALARM *)CallService(MS_POPUP_GETPLUGINDATA, (WPARAM)hWnd,(LPARAM)mpd);
+ if (mpd > 0) {
+ free_alarm_data(mpd);
+ delete mpd;
+ }
+ return TRUE;
}
return DefWindowProc(hWnd, message, wParam, lParam);
}
-void ShowPopup(ALARM *alarm) {
- if (ServiceExists(MS_POPUP_ADDPOPUP)) {
+void ShowPopup(ALARM *alarm)
+{
+ if ( ServiceExists(MS_POPUP_ADDPOPUP)) {
ALARM *data = new ALARM;
memset(data, 0, sizeof(ALARM));
copy_alarm_data(data, alarm);
POPUPDATAT ppd = { 0 };
ppd.lchIcon = hIconMenuSet;
-
lstrcpyn(ppd.lptzContactName, data->szTitle, MAX_CONTACTNAME);
lstrcpyn(ppd.lptzText, data->szDesc, MAX_SECONDLINE);
ppd.PluginWindowProc = PopupAlarmDlgProc;
ppd.PluginData = data;
ppd.iSeconds = -1;
-
- //Now that every field has been filled, we want to see the popup.
PUAddPopUpT(&ppd);
}
}
-void DoAlarm(ALARM *alarm) {
+void DoAlarm(ALARM *alarm)
+{
ALARMINFO alarminfo;
alarminfo.szTitle = alarm->szTitle;
alarminfo.szDesc = alarm->szDesc;
diff --git a/plugins/Alarms/src/options.cpp b/plugins/Alarms/src/options.cpp
index ff3ed3d855..3a263d4188 100644
--- a/plugins/Alarms/src/options.cpp
+++ b/plugins/Alarms/src/options.cpp
@@ -828,7 +828,7 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
EnableWindow(hw, FALSE);
}
- if (ServiceExists(MS_POPUP_ADDPOPUP)) {
+ if ( ServiceExists(MS_POPUP_ADDPOPUP)) {
CheckDlgButton(hwndDlg, IDC_CHK_POPUPS, temp_options.use_popup_module ? TRUE : FALSE);
if (options.use_popup_module) {
HWND hw = GetDlgItem(hwndDlg, IDC_CHK_LOOPSOUND);
@@ -1110,7 +1110,7 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
int reminder_period = GetDlgItemInt(hwndDlg, IDC_ED_PERIOD, &translated, FALSE);
if (translated) temp_options.reminder_period = reminder_period;
- if (!ServiceExists(MS_POPUP_ADDPOPUP) || !options.use_popup_module)
+ if ( !ServiceExists(MS_POPUP_ADDPOPUP) || !options.use_popup_module)
temp_options.loop_sound = IsDlgButtonChecked(hwndDlg, IDC_CHK_LOOPSOUND) ? true : false;
options = temp_options;
diff --git a/plugins/BuddyExpectator/src/options.cpp b/plugins/BuddyExpectator/src/options.cpp
index 078d699eb4..202d83d2ff 100644
--- a/plugins/BuddyExpectator/src/options.cpp
+++ b/plugins/BuddyExpectator/src/options.cpp
@@ -95,7 +95,7 @@ static INT_PTR CALLBACK OptionsFrameProc(HWND hwndDlg, UINT uMsg, WPARAM wParam,
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
- if (!ServiceExists(MS_POPUP_ADDPOPUP))
+ if ( !ServiceExists(MS_POPUP_ADDPOPUP))
EnableWindow(GetDlgItem(hwndDlg, IDC_CHECK_POPUP), FALSE);
//iAbsencePeriod
@@ -445,8 +445,8 @@ static int OptionsInit(WPARAM wParam, LPARAM lParam)
odp.flags = ODPF_BOLDGROUPS|ODPF_TCHAR;
Options_AddPage(wParam, &odp);
- if (ServiceExists(MS_POPUP_ADDPOPUP)) {
- odp.ptszGroup = LPGENT("PopUps");
+ if ( ServiceExists(MS_POPUP_ADDPOPUP)) {
+ odp.ptszGroup = LPGENT("PopUps");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_POPUPPANEL);
odp.pfnDlgProc = PopUpOptionsFrameProc;
Options_AddPage(wParam, &odp);
diff --git a/plugins/ChangeKeyboardLayout/src/hook_events.cpp b/plugins/ChangeKeyboardLayout/src/hook_events.cpp
index 93e152a23e..ea788fb912 100644
--- a/plugins/ChangeKeyboardLayout/src/hook_events.cpp
+++ b/plugins/ChangeKeyboardLayout/src/hook_events.cpp
@@ -80,8 +80,7 @@ void WritePopupOptions()
void RegPopupActions()
{
- if (ServiceExists(MS_POPUP_ADDPOPUP))
- {
+ if ( ServiceExists(MS_POPUP_ADDPOPUP)) {
poOptions.paActions[0].cbSize = sizeof(POPUPACTION);
strcpy(poOptions.paActions[0].lpzTitle, ModuleName);
strcat(poOptions.paActions[0].lpzTitle, "/Copy to clipboard");
@@ -177,7 +176,7 @@ int OnOptionsInitialise(WPARAM wParam, LPARAM lParam)
odp.pfnDlgProc = DlgMainProcOptions;
Options_AddPage(wParam, &odp);
- if (ServiceExists(MS_POPUP_ADDPOPUP)) {
+ if ( ServiceExists(MS_POPUP_ADDPOPUP)) {
odp.pszTemplate = MAKEINTRESOURCEA(IDD_POPUP_OPTION_FORM);
odp.pszGroup = LPGEN("PopUps");
odp.pfnDlgProc = DlgPopupsProcOptions;
diff --git a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp
index a22535f1b1..1789e48742 100644
--- a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp
+++ b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp
@@ -375,10 +375,10 @@ INT_PTR CALLBACK CCNErrorDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM
static int ModuleLoad(WPARAM wParam, LPARAM lParam)
{
- bPopupExists = ServiceExists(MS_POPUP_ADDPOPUPEX) != 0;
- bMetaContactsExists = ServiceExists(MS_MC_GETPROTOCOLNAME) && ServiceExists(MS_MC_GETMETACONTACT) != 0;
- bFingerprintExists = ServiceExists(MS_FP_SAMECLIENTS) && ServiceExists(MS_FP_GETCLIENTICON) != 0;
- bVariablesExists = ServiceExists(MS_VARS_FORMATSTRING) != 0;
+ bPopupExists = ServiceExists(MS_POPUP_ADDPOPUP);
+ bMetaContactsExists = ServiceExists(MS_MC_GETPROTOCOLNAME) && ServiceExists(MS_MC_GETMETACONTACT);
+ bFingerprintExists = ServiceExists(MS_FP_SAMECLIENTS) && ServiceExists(MS_FP_GETCLIENTICON);
+ bVariablesExists = ServiceExists(MS_VARS_FORMATSTRING);
return 0;
}
diff --git a/plugins/Clist_modern/src/modern_popup.cpp b/plugins/Clist_modern/src/modern_popup.cpp
index 63b4c0418d..93b6a8d084 100644
--- a/plugins/Clist_modern/src/modern_popup.cpp
+++ b/plugins/Clist_modern/src/modern_popup.cpp
@@ -50,11 +50,11 @@ void ShowTracePopup(const char *text)
// Show an popup
void ShowPopup(const char *title, const char *description, int type)
{
- if ( !ServiceExists(MS_POPUP_ADDPOPUPEX) || !EnablePopups)
+ if ( !ServiceExists(MS_POPUP_ADDPOPUP) || !EnablePopups)
return;
// Make popup
- POPUPDATAEX ppd = { 0 };
+ POPUPDATA ppd = { 0 };
ppd.lchContact = 0;
ppd.lchIcon = LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
@@ -83,7 +83,7 @@ void ShowPopup(const char *title, const char *description, int type)
ppd.iSeconds = 0;
// Now that every field has been filled, we want to see the popup.
- CallService(MS_POPUP_ADDPOPUPEX, (WPARAM)&ppd, 0);
+ PUAddPopUp(&ppd);
}
// Handle to popup events
diff --git a/plugins/DbEditorPP/src/watchedvars.cpp b/plugins/DbEditorPP/src/watchedvars.cpp
index 2bd929209c..66aef8654e 100644
--- a/plugins/DbEditorPP/src/watchedvars.cpp
+++ b/plugins/DbEditorPP/src/watchedvars.cpp
@@ -284,17 +284,14 @@ INT_PTR CALLBACK WatchDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
void popupWatchedVar(HANDLE hContact,const char* module,const char* setting)
{
- POPUPDATAEX ppd = {0};
HICON hIcon = LoadIcon(hInst, MAKEINTRESOURCE(ICO_REGEDIT));
char lpzContactName[MAX_CONTACTNAME];
char lpzText[MAX_SECONDLINE];
COLORREF colorBack = DBGetContactSettingDword(NULL,modname,"PopupColour",RGB(255,0,0));
COLORREF colorText = RGB(0,0,0);
- DBVARIANT dbv;
int timeout = DBGetContactSettingByte(NULL,modname,"PopupDelay",3);
- if (hContact)
- {
+ if (hContact) {
// contacts nick
char szProto[256];
if (GetValue(hContact,"Protocol","p",szProto,SIZEOF(szProto)))
@@ -302,48 +299,42 @@ void popupWatchedVar(HANDLE hContact,const char* module,const char* setting)
else
mir_snprintf(lpzContactName, MAX_SECONDLINE, nick_unknown);
}
- else
- {
- strcpy(lpzContactName,Translate("Settings"));
- }
+ else strcpy(lpzContactName,Translate("Settings"));
+
// 2nd line
- if (!GetSetting(hContact, module, setting, &dbv))
- {
- switch (dbv.type)
- {
- case DBVT_BYTE:
- mir_snprintf(lpzText, SIZEOF(lpzText), Translate("Database Setting Changed: \nModule: \"%s\" , Setting: \"%s\"\nNew Value: (BYTE) %d"), module, setting, dbv.bVal);
- break;
- case DBVT_WORD:
- mir_snprintf(lpzText, SIZEOF(lpzText), Translate("Database Setting Changed: \nModule: \"%s\" , Setting: \"%s\"\nNew Value: (WORD) %d"), module, setting, dbv.wVal);
- break;
- case DBVT_DWORD:
- mir_snprintf(lpzText, SIZEOF(lpzText), Translate("Database Setting Changed: \nModule: \"%s\" , Setting: \"%s\"\nNew Value: (DWORD) 0x%X"), module, setting, dbv.dVal);
- break;
- case DBVT_ASCIIZ:
- mir_snprintf(lpzText, SIZEOF(lpzText), Translate("Database Setting Changed: \nModule: \"%s\" , Setting: \"%s\"\nNew Value: \"%s\""), module, setting, dbv.pszVal);
- break;
- case DBVT_UTF8:
- mir_snprintf(lpzText, SIZEOF(lpzText), Translate("Database Setting Changed: \nModule: \"%s\" , Setting: \"%s\"\nNew Value (UTF8): \"%s\""), module, setting, dbv.pszVal);
- break;
- default:
- return;
- }
+ DBVARIANT dbv;
+ if ( GetSetting(hContact, module, setting, &dbv))
+ return;
+
+ switch (dbv.type) {
+ case DBVT_BYTE:
+ mir_snprintf(lpzText, SIZEOF(lpzText), Translate("Database Setting Changed: \nModule: \"%s\" , Setting: \"%s\"\nNew Value: (BYTE) %d"), module, setting, dbv.bVal);
+ break;
+ case DBVT_WORD:
+ mir_snprintf(lpzText, SIZEOF(lpzText), Translate("Database Setting Changed: \nModule: \"%s\" , Setting: \"%s\"\nNew Value: (WORD) %d"), module, setting, dbv.wVal);
+ break;
+ case DBVT_DWORD:
+ mir_snprintf(lpzText, SIZEOF(lpzText), Translate("Database Setting Changed: \nModule: \"%s\" , Setting: \"%s\"\nNew Value: (DWORD) 0x%X"), module, setting, dbv.dVal);
+ break;
+ case DBVT_ASCIIZ:
+ mir_snprintf(lpzText, SIZEOF(lpzText), Translate("Database Setting Changed: \nModule: \"%s\" , Setting: \"%s\"\nNew Value: \"%s\""), module, setting, dbv.pszVal);
+ break;
+ case DBVT_UTF8:
+ mir_snprintf(lpzText, SIZEOF(lpzText), Translate("Database Setting Changed: \nModule: \"%s\" , Setting: \"%s\"\nNew Value (UTF8): \"%s\""), module, setting, dbv.pszVal);
+ break;
+ default:
+ return;
}
- else return;
DBFreeVariant(&dbv);
+ POPUPDATA ppd = { 0 };
ppd.lchContact = (HANDLE)hContact;
ppd.lchIcon = hIcon;
lstrcpyn(ppd.lpzContactName, lpzContactName,MAX_CONTACTNAME);
lstrcpyn(ppd.lpzText, lpzText,MAX_SECONDLINE);
ppd.colorBack = colorBack;
ppd.colorText = colorText;
- ppd.PluginWindowProc = NULL;
- ppd.PluginData = NULL;
- ppd.iSeconds = timeout?timeout:-1;
-
- //Now that every field has been filled, we want to see the popup.
- CallService(MS_POPUP_ADDPOPUPEX, (WPARAM)&ppd, 0);
+ ppd.iSeconds = timeout ? timeout : -1;
+ PUAddPopUp(&ppd);
}
diff --git a/plugins/Db_autobackups/src/options.cpp b/plugins/Db_autobackups/src/options.cpp
index c1572c1a72..da944bc205 100644
--- a/plugins/Db_autobackups/src/options.cpp
+++ b/plugins/Db_autobackups/src/options.cpp
@@ -115,7 +115,7 @@ int SetDlgState(HWND hwndDlg)
CheckDlgButton(hwndDlg, IDC_CHK_NOPROG, new_options.disable_progress ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_CHK_NOPOPUP, new_options.disable_popups ? BST_CHECKED : BST_UNCHECKED);
- if (!ServiceExists(MS_POPUP_ADDPOPUP))
+ if ( !ServiceExists(MS_POPUP_ADDPOPUP))
ShowWindow(GetDlgItem(hwndDlg, IDC_CHK_NOPOPUP), SW_HIDE);
return 0;
diff --git a/plugins/ExternalAPI/m_popup2.h b/plugins/ExternalAPI/m_popup2.h
index 85e9afc1d0..188fa99f76 100644
--- a/plugins/ExternalAPI/m_popup2.h
+++ b/plugins/ExternalAPI/m_popup2.h
@@ -209,7 +209,7 @@ additional APF_ flags */
//overload function for POPUPDATAEX_V2/POPUPDATAW_V2
static INT_PTR __inline PUAddPopUpEx(POPUPDATAEX_V2* ppdp) {
- return CallService(MS_POPUP_ADDPOPUPEX, (WPARAM)ppdp,0);
+ return CallService(MS_POPUP_ADDPOPUP, (WPARAM)ppdp,0);
}
static INT_PTR __inline PUAddPopUpW(POPUPDATAW_V2* ppdp) {
diff --git a/plugins/FileAsMessage/src/dialog.cpp b/plugins/FileAsMessage/src/dialog.cpp
index 37c92cf33f..6d5069ab5f 100644
--- a/plugins/FileAsMessage/src/dialog.cpp
+++ b/plugins/FileAsMessage/src/dialog.cpp
@@ -222,12 +222,11 @@ void MakePopupMsg(HWND hDlg, HANDLE hContact, char *msg)
HWND hFocused = GetForegroundWindow();
if(hDlg == hFocused || hDlg == GetParent(hFocused)) return;
- POPUPDATAEX ppd;
//
//The text for the second line. You could even make something like: char lpzText[128]; lstrcpy(lpzText, "Hello world!"); It's your choice.
//
- ZeroMemory(&ppd, sizeof(ppd)); //This is always a good thing to do.
- ppd.lchContact = (HANDLE)hContact; //Be sure to use a GOOD handle, since this will not be checked.
+ POPUPDATA ppd = { 0 };
+ ppd.lchContact = (HANDLE)hContact;
ppd.lchIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_SMALLICON));
lstrcpy(ppd.lpzContactName, (char *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, 0));
lstrcpy(ppd.lpzText, msg);
@@ -236,8 +235,7 @@ void MakePopupMsg(HWND hDlg, HANDLE hContact, char *msg)
ppd.PluginWindowProc = (WNDPROC)PopupDlgProc;
ppd.PluginData = (void*)hDlg;
ppd.iSeconds = -1;
-
- CallService(MS_POPUP_ADDPOPUPEX, (WPARAM)&ppd, 0);
+ PUAddPopUp(&ppd);
}
//
// Get ID of string message
diff --git a/plugins/HTTPServer/src/GuiElements.cpp b/plugins/HTTPServer/src/GuiElements.cpp
index 034a69e9dc..1e159b146f 100644
--- a/plugins/HTTPServer/src/GuiElements.cpp
+++ b/plugins/HTTPServer/src/GuiElements.cpp
@@ -1375,11 +1375,11 @@ int OptionsInitialize(WPARAM wParam, LPARAM /*lParam*/) {
/////////////////////////////////////////////////////////////////////
void CALLBACK MainThreadCallback(ULONG_PTR dwParam) {
- POPUPDATA * pclData = (POPUPDATA *)dwParam;
+ POPUPDATAT *pclData = (POPUPDATAT*)dwParam;
if (db_get_b(NULL, MODULE, "WriteLogFile", 0) != 0) {
LogEvent(pclData->lpzContactName, pclData->lpzText);
}
- CallService(MS_POPUP_ADDPOPUP, (WPARAM)pclData, 0);
+ PUAddPopUpT(pclData);
delete pclData;
}
@@ -1446,8 +1446,8 @@ void ShowPopupWindow(const char * pszName, const char * pszText, COLORREF ColorB
if (! bShowPopups)
return;
- POPUPDATA * pclData = new POPUPDATA;
- memset(pclData, 0, sizeof(POPUPDATA));
+ POPUPDATAT *pclData = new POPUPDATAT;
+ memset(pclData, 0, sizeof(POPUPDATAT));
pclData->lchIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_SHARE_NEW_FILE));
strncpy(pclData->lpzContactName, pszName, sizeof(pclData->lpzContactName) - 1); // -1 so that there aways will be a null termination !!
strncpy(pclData->lpzText, pszText, sizeof(pclData->lpzText) - 1);
diff --git a/plugins/MenuItemEx/src/main.cpp b/plugins/MenuItemEx/src/main.cpp
index 6d94b74e8d..e5dbad48c8 100644
--- a/plugins/MenuItemEx/src/main.cpp
+++ b/plugins/MenuItemEx/src/main.cpp
@@ -1144,8 +1144,8 @@ static int ContactSettingChanged( WPARAM wParam, LPARAM lParam )
static int ModuleLoad(WPARAM wParam, LPARAM lParam)
{
- bPopUpService = ServiceExists(MS_POPUP_ADDPOPUPEX) != 0;
- bMetaContacts = ServiceExists(MS_MC_GETMETACONTACT) != 0;
+ bPopUpService = ServiceExists(MS_POPUP_ADDPOPUP);
+ bMetaContacts = ServiceExists(MS_MC_GETMETACONTACT);
return 0;
}
diff --git a/plugins/NewEventNotify/src/options.cpp b/plugins/NewEventNotify/src/options.cpp
index 648e15c7de..8df56a94e3 100644
--- a/plugins/NewEventNotify/src/options.cpp
+++ b/plugins/NewEventNotify/src/options.cpp
@@ -296,9 +296,8 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hWnd, UINT message, WPARAM wParam, L
int OptionsAdd(HINSTANCE hInst, WPARAM addInfo)
{
- if (ServiceExists(MS_POPUP_ADDPOPUP)) {
- OPTIONSDIALOGPAGE odp = { 0 };
- odp.cbSize = sizeof(odp);
+ if ( ServiceExists(MS_POPUP_ADDPOPUP)) {
+ OPTIONSDIALOGPAGE odp = { sizeof(odp) };
odp.hInstance = hInst;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT);
odp.pszTitle = LPGEN("Event Notify");
diff --git a/plugins/NewXstatusNotify/src/options.cpp b/plugins/NewXstatusNotify/src/options.cpp
index e58de111c7..89eda8711d 100644
--- a/plugins/NewXstatusNotify/src/options.cpp
+++ b/plugins/NewXstatusNotify/src/options.cpp
@@ -1047,7 +1047,7 @@ int OptionsInitialize(WPARAM wParam, LPARAM lParam)
odp.pfnDlgProc = DlgProcXLogOpts;
Options_AddPage(wParam, &odp);
- if (ServiceExists(MS_POPUP_ADDPOPUP)) {
+ if ( ServiceExists(MS_POPUP_ADDPOPUP)) {
odp.pszTitle = LPGEN("Status Notify");
odp.pszGroup = LPGEN("PopUps");
odp.pszTab = LPGEN("General");
diff --git a/plugins/NotifyAnything/src/main.cpp b/plugins/NotifyAnything/src/main.cpp
index e82a525b98..3d020de41f 100644
--- a/plugins/NotifyAnything/src/main.cpp
+++ b/plugins/NotifyAnything/src/main.cpp
@@ -528,7 +528,7 @@ static int CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM
int showMessage(const popup_t &msg)
{
- POPUPDATAEX ppd = { 0 };
+ POPUPDATA ppd = { 0 };
strncpy(ppd.lpzText, strip(msg.message).c_str(), MAX_SECONDLINE);
strncpy(ppd.lpzContactName, msg.contact.c_str(), MAX_CONTACTNAME);
ppd.colorBack = msg.background;
@@ -548,7 +548,7 @@ int showMessage(const popup_t &msg)
LeaveCS(&g_popups_cs);
- return CallServiceSync(MS_POPUP_ADDPOPUPEX, (WPARAM)&ppd, 0);
+ return PUAddPopUp(&ppd);
}
void replaceMessage(const popup_t &msg)
diff --git a/plugins/PackUpdater/Src/Notifications.cpp b/plugins/PackUpdater/Src/Notifications.cpp
index 9896404b00..ac9ccdce3d 100644
--- a/plugins/PackUpdater/Src/Notifications.cpp
+++ b/plugins/PackUpdater/Src/Notifications.cpp
@@ -211,10 +211,9 @@ INT_PTR CALLBACK DlgDownloadPop(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
static void __stdcall CreateDownloadDialog(void*)
{
- if (ServiceExists(MS_POPUP_ADDPOPUPEX) && DBGetContactSettingByte(NULL, "PopUp", "ModuleIsEnabled", 1) && DBGetContactSettingByte(NULL,MODNAME, "Popups3", DEFAULT_POPUP_ENABLED))
+ if ( ServiceExists(MS_POPUP_ADDPOPUP) && DBGetContactSettingByte(NULL, "PopUp", "ModuleIsEnabled", 1) && DBGetContactSettingByte(NULL,MODNAME, "Popups3", DEFAULT_POPUP_ENABLED))
hDlgDld = CreateDialog(hInst, MAKEINTRESOURCE(IDD_POPUPDUMMI), NULL, DlgDownloadPop);
- else if (DBGetContactSettingByte(NULL,MODNAME, "Popups3M", DEFAULT_MESSAGE_ENABLED))
- {
+ else if (DBGetContactSettingByte(NULL,MODNAME, "Popups3M", DEFAULT_MESSAGE_ENABLED)) {
lstrcpyn(tszDialogMsg, Text, SIZEOF(tszDialogMsg));
hDlgDld = CreateDialog(hInst, MAKEINTRESOURCE(IDD_DOWNLOAD), NULL, DlgDownload);
}
@@ -232,7 +231,7 @@ void DlgDownloadProc()
{
Title = TranslateT("Pack Updater");
Text = TranslateT("An error occured while downloading the update.");
- if (ServiceExists(MS_POPUP_ADDPOPUPEX) && DBGetContactSettingByte(NULL, "PopUp", "ModuleIsEnabled", 1) && DBGetContactSettingByte(NULL, MODNAME, "Popups1", DEFAULT_POPUP_ENABLED))
+ if ( ServiceExists(MS_POPUP_ADDPOPUP) && DBGetContactSettingByte(NULL, "PopUp", "ModuleIsEnabled", 1) && DBGetContactSettingByte(NULL, MODNAME, "Popups1", DEFAULT_POPUP_ENABLED))
{
Number = 1;
show_popup(0, Title, Text, Number, 0);
@@ -534,7 +533,7 @@ INT_PTR CALLBACK DlgUpdate(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam
INT rc = -1;
Title = TranslateT("Pack Updater");
Text = tszBuff;
- if (ServiceExists(MS_POPUP_ADDPOPUPEX) && ServiceExists(MS_POPUP_REGISTERACTIONS) && DBGetContactSettingByte(NULL, "PopUp", "ModuleIsEnabled", 1) && DBGetContactSettingByte(NULL,MODNAME, "Popups0", DEFAULT_POPUP_ENABLED) && (DBGetContactSettingDword(NULL, "PopUp", "Actions", 0) & 1))
+ if ( ServiceExists(MS_POPUP_ADDPOPUP) && ServiceExists(MS_POPUP_REGISTERACTIONS) && DBGetContactSettingByte(NULL, "PopUp", "ModuleIsEnabled", 1) && DBGetContactSettingByte(NULL,MODNAME, "Popups0", DEFAULT_POPUP_ENABLED) && (DBGetContactSettingDword(NULL, "PopUp", "Actions", 0) & 1))
rc = DialogBox(hInst, MAKEINTRESOURCE(IDD_POPUPDUMMI), NULL, DlgMsgPop);
else
rc = MessageBox(NULL, tszBuff, Title, MB_YESNO | MB_ICONQUESTION);
@@ -620,7 +619,7 @@ INT_PTR CALLBACK DlgUpdate(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam
mir_sntprintf(tszBuff, SIZEOF(tszBuff), TranslateT("You have chosen not to install the pack update immediately.\nYou can install it manually from this location:\n\n%s"), arFilePath[0].c_str());
Title = TranslateT("Pack Updater");
Text = tszBuff;
- if (ServiceExists(MS_POPUP_ADDPOPUPEX) && DBGetContactSettingByte(NULL, "PopUp", "ModuleIsEnabled", 1) && DBGetContactSettingByte(NULL, MODNAME, "Popups2", DEFAULT_POPUP_ENABLED))
+ if ( ServiceExists(MS_POPUP_ADDPOPUP) && DBGetContactSettingByte(NULL, "PopUp", "ModuleIsEnabled", 1) && DBGetContactSettingByte(NULL, MODNAME, "Popups2", DEFAULT_POPUP_ENABLED))
{
Number = 2;
show_popup(0, Title, Text, Number, 0);
diff --git a/plugins/PackUpdater/Src/Options.cpp b/plugins/PackUpdater/Src/Options.cpp
index e3634f32c5..3460ef1dcb 100644
--- a/plugins/PackUpdater/Src/Options.cpp
+++ b/plugins/PackUpdater/Src/Options.cpp
@@ -21,8 +21,7 @@ Boston, MA 02111-1307, USA.
LRESULT CALLBACK MyEditProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
- switch (message)
- {
+ switch (message) {
case WM_KEYDOWN:
SendMessage(GetParent(GetParent(hwnd)), PSM_CHANGED, 0, 0);
break;
@@ -32,64 +31,56 @@ LRESULT CALLBACK MyEditProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPara
INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
- WORD i = 0;
- char str[20] = {0};
- switch (msg)
- {
+ char str[20];
+
+ switch (msg) {
case WM_INITDIALOG:
- {
- TranslateDialogDefault(hwndDlg);
- CheckDlgButton(hwndDlg, IDC_UPDATEONSTARTUP, (int)UpdateOnStartup);
- CheckDlgButton(hwndDlg, IDC_ONLYONCEADAY, (int)OnlyOnceADay);
- EnableWindow(GetDlgItem(hwndDlg, IDC_ONLYONCEADAY), UpdateOnStartup);
- CheckDlgButton(hwndDlg, IDC_UPDATEONPERIOD, (int)UpdateOnPeriod);
- EnableWindow(GetDlgItem(hwndDlg, IDC_PERIOD), UpdateOnPeriod);
- EnableWindow(GetDlgItem(hwndDlg, IDC_PERIODSPIN), UpdateOnPeriod);
- EnableWindow(GetDlgItem(hwndDlg, IDC_PERIODMEASURE), UpdateOnPeriod);
+ TranslateDialogDefault(hwndDlg);
+ CheckDlgButton(hwndDlg, IDC_UPDATEONSTARTUP, (int)UpdateOnStartup);
+ CheckDlgButton(hwndDlg, IDC_ONLYONCEADAY, (int)OnlyOnceADay);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_ONLYONCEADAY), UpdateOnStartup);
+ CheckDlgButton(hwndDlg, IDC_UPDATEONPERIOD, (int)UpdateOnPeriod);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_PERIOD), UpdateOnPeriod);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_PERIODSPIN), UpdateOnPeriod);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_PERIODMEASURE), UpdateOnPeriod);
- SendDlgItemMessage(hwndDlg, IDC_PERIODSPIN, UDM_SETRANGE, 0, MAKELONG(99, 1));
- SendDlgItemMessage(hwndDlg, IDC_PERIODSPIN, UDM_SETPOS, 0, (LPARAM)Period);
+ SendDlgItemMessage(hwndDlg, IDC_PERIODSPIN, UDM_SETRANGE, 0, MAKELONG(99, 1));
+ SendDlgItemMessage(hwndDlg, IDC_PERIODSPIN, UDM_SETPOS, 0, (LPARAM)Period);
- Edit_LimitText(GetDlgItem(hwndDlg, IDC_PERIOD), 2);
- mir_subclassWindow(GetDlgItem(hwndDlg, IDC_PERIOD), MyEditProc);
+ Edit_LimitText(GetDlgItem(hwndDlg, IDC_PERIOD), 2);
+ mir_subclassWindow(GetDlgItem(hwndDlg, IDC_PERIOD), MyEditProc);
- ComboBox_InsertString(GetDlgItem(hwndDlg, IDC_PERIODMEASURE), 0, TranslateT("hours"));
- ComboBox_InsertString(GetDlgItem(hwndDlg, IDC_PERIODMEASURE), 1, TranslateT("days"));
- ComboBox_SetCurSel(GetDlgItem(hwndDlg, IDC_PERIODMEASURE), PeriodMeasure);
+ ComboBox_InsertString(GetDlgItem(hwndDlg, IDC_PERIODMEASURE), 0, TranslateT("hours"));
+ ComboBox_InsertString(GetDlgItem(hwndDlg, IDC_PERIODMEASURE), 1, TranslateT("days"));
+ ComboBox_SetCurSel(GetDlgItem(hwndDlg, IDC_PERIODMEASURE), PeriodMeasure);
- CheckDlgButton(hwndDlg, IDC_REMINDER, (int)Reminder);
- if (ServiceExists(MS_POPUP_ADDPOPUP))
- {
- ShowWindow(GetDlgItem(hwndDlg, IDC_NOTIFY2), SW_HIDE);
- ShowWindow(GetDlgItem(hwndDlg, IDC_MSG_BOXES2), SW_HIDE);
- ShowWindow(GetDlgItem(hwndDlg, IDC_ERRORS2), SW_HIDE);
- ShowWindow(GetDlgItem(hwndDlg, IDC_INFO_MESSAGES2), SW_HIDE);
- ShowWindow(GetDlgItem(hwndDlg, IDC_PROGR_DLG2), SW_HIDE);
- }
- else
- {
- for (i = 1; i < POPUPS; i++)
- {
- mir_snprintf(str, SIZEOF(str), "Popups%dM", i);
- CheckDlgButton(hwndDlg, (i+1029), (DBGetContactSettingByte(NULL, MODNAME, str, DEFAULT_MESSAGE_ENABLED)) ? BST_CHECKED: BST_UNCHECKED);
- }
+ CheckDlgButton(hwndDlg, IDC_REMINDER, (int)Reminder);
+ if ( ServiceExists(MS_POPUP_ADDPOPUP)) {
+ ShowWindow(GetDlgItem(hwndDlg, IDC_NOTIFY2), SW_HIDE);
+ ShowWindow(GetDlgItem(hwndDlg, IDC_MSG_BOXES2), SW_HIDE);
+ ShowWindow(GetDlgItem(hwndDlg, IDC_ERRORS2), SW_HIDE);
+ ShowWindow(GetDlgItem(hwndDlg, IDC_INFO_MESSAGES2), SW_HIDE);
+ ShowWindow(GetDlgItem(hwndDlg, IDC_PROGR_DLG2), SW_HIDE);
+ }
+ else {
+ for (int i = 1; i < POPUPS; i++) {
+ mir_snprintf(str, SIZEOF(str), "Popups%dM", i);
+ CheckDlgButton(hwndDlg, (i+1029), (DBGetContactSettingByte(NULL, MODNAME, str, DEFAULT_MESSAGE_ENABLED)) ? BST_CHECKED: BST_UNCHECKED);
}
- return TRUE;
}
+ return TRUE;
case WM_COMMAND:
- {
- switch (LOWORD(wParam))
- {
+ switch (LOWORD(wParam)) {
case IDC_UPDATEONSTARTUP:
- {
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
- EnableWindow(GetDlgItem(hwndDlg, IDC_ONLYONCEADAY), IsDlgButtonChecked(hwndDlg, IDC_UPDATEONSTARTUP));
- }
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_ONLYONCEADAY), IsDlgButtonChecked(hwndDlg, IDC_UPDATEONSTARTUP));
break;
+
case IDC_ONLYONCEADAY:
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
break;
+
case IDC_UPDATEONPERIOD:
{
BOOL value = IsDlgButtonChecked(hwndDlg, IDC_UPDATEONPERIOD);
@@ -99,22 +90,25 @@ INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
}
break;
+
case IDC_PERIODMEASURE:
if (HIWORD(wParam) == CBN_SELCHANGE)
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
break;
+
case IDC_REMINDER:
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
break;
+
case IDC_LINK_HOTKEY:
{
- OPENOPTIONSDIALOG ood = {0};
- ood.cbSize = sizeof(ood);
+ OPENOPTIONSDIALOG ood = { sizeof(ood) };
ood.pszGroup = "Customize";
ood.pszPage = "Hotkeys";
Options_Open(&ood);
- return (true);
}
+ return true;
+
case IDC_MSG_BOXES2:
case IDC_ERRORS2:
case IDC_INFO_MESSAGES2:
@@ -124,27 +118,25 @@ INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
break;
}
break;
- }
+
case WM_NOTIFY:
{
NMHDR *hdr = (NMHDR *)lParam;
if(hdr && hdr->code == UDN_DELTAPOS)
- {
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
- }
- if (hdr && hdr->code == PSN_APPLY)
- {
+
+ if (hdr && hdr->code == PSN_APPLY) {
UpdateOnStartup = IsDlgButtonChecked(hwndDlg, IDC_UPDATEONSTARTUP);
OnlyOnceADay = IsDlgButtonChecked(hwndDlg, IDC_ONLYONCEADAY);
UpdateOnPeriod = IsDlgButtonChecked(hwndDlg, IDC_UPDATEONPERIOD);
-
+
char buffer[3] = {0};
Edit_GetText(GetDlgItem(hwndDlg, IDC_PERIOD), (LPWSTR)&buffer, 2);
Period = atoi(buffer);
PeriodMeasure = ComboBox_GetCurSel(GetDlgItem(hwndDlg, IDC_PERIODMEASURE));
-
+
InitTimer();
DBWriteContactSettingByte(NULL, MODNAME, "UpdateOnStartup", UpdateOnStartup);
@@ -154,10 +146,8 @@ INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
DBWriteContactSettingByte(NULL, MODNAME, "PeriodMeasure", PeriodMeasure);
Reminder = IsDlgButtonChecked(hwndDlg, IDC_REMINDER);
DBWriteContactSettingByte(NULL, MODNAME, "Reminder", Reminder);
- if (!ServiceExists(MS_POPUP_ADDPOPUP))
- {
- for (i = 1; i < POPUPS; i++)
- {
+ if ( !ServiceExists(MS_POPUP_ADDPOPUP)) {
+ for (int i = 1; i < POPUPS; i++) {
mir_snprintf(str, SIZEOF(str), "Popups%dM", i);
DBWriteContactSettingByte(NULL, MODNAME, str, (BYTE)(IsDlgButtonChecked(hwndDlg, (i+1029))));
}
@@ -165,7 +155,7 @@ INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
}
break;
}
- }//end* switch (msg)
+ }
return FALSE;
}
@@ -441,7 +431,7 @@ int OptInit(WPARAM wParam, LPARAM lParam)
odp.pfnDlgProc = UpdateNotifyOptsProc;
Options_AddPage(wParam, &odp);
- if (ServiceExists(MS_POPUP_ADDPOPUP)) {
+ if ( ServiceExists(MS_POPUP_ADDPOPUP)) {
odp.pszTemplate = MAKEINTRESOURCEA(IDD_POPUP);
odp.ptszGroup = LPGENT("PopUps");
odp.ptszTitle = LPGENT("Pack Updater");
diff --git a/plugins/PackUpdater/Src/Utils.cpp b/plugins/PackUpdater/Src/Utils.cpp
index f68f2ba46b..3b322ab4be 100644
--- a/plugins/PackUpdater/Src/Utils.cpp
+++ b/plugins/PackUpdater/Src/Utils.cpp
@@ -202,7 +202,7 @@ static void CheckUpdates(void *)
{
Title=TranslateT("Pack Updater");
Text = TranslateT("URL for checking updates not found.");
- if (ServiceExists(MS_POPUP_ADDPOPUPEX) && DBGetContactSettingByte(NULL, "PopUp", "ModuleIsEnabled", 1) && DBGetContactSettingByte(NULL, MODNAME, "Popups1", DEFAULT_POPUP_ENABLED))
+ if ( ServiceExists(MS_POPUP_ADDPOPUP) && DBGetContactSettingByte(NULL, "PopUp", "ModuleIsEnabled", 1) && DBGetContactSettingByte(NULL, MODNAME, "Popups1", DEFAULT_POPUP_ENABLED))
{
Number = 1;
show_popup(0, Title, Text, Number, 0);
@@ -268,7 +268,7 @@ static void CheckUpdates(void *)
{
Title = TranslateT("Pack Updater");
Text = TranslateT("Name of Update's file is not supported.");
- if (ServiceExists(MS_POPUP_ADDPOPUPEX) && DBGetContactSettingByte(NULL, "PopUp", "ModuleIsEnabled", 1) && DBGetContactSettingByte(NULL, MODNAME, "Popups1", DEFAULT_POPUP_ENABLED))
+ if ( ServiceExists(MS_POPUP_ADDPOPUP) && DBGetContactSettingByte(NULL, "PopUp", "ModuleIsEnabled", 1) && DBGetContactSettingByte(NULL, MODNAME, "Popups1", DEFAULT_POPUP_ENABLED))
{
Number = 1;
show_popup(0, Title, Text, Number, 0);
@@ -372,7 +372,7 @@ static void CheckUpdates(void *)
{
Title = TranslateT("Pack Updater");
Text = TranslateT("No updates found.");
- if (ServiceExists(MS_POPUP_ADDPOPUPEX) && DBGetContactSettingByte(NULL, "PopUp", "ModuleIsEnabled", 1) && DBGetContactSettingByte(NULL, MODNAME, "Popups2", DEFAULT_POPUP_ENABLED))
+ if ( ServiceExists(MS_POPUP_ADDPOPUP) && DBGetContactSettingByte(NULL, "PopUp", "ModuleIsEnabled", 1) && DBGetContactSettingByte(NULL, MODNAME, "Popups2", DEFAULT_POPUP_ENABLED))
{
Number = 2;
show_popup(0, Title, Text, Number, 0);
@@ -384,7 +384,7 @@ static void CheckUpdates(void *)
{
Title = TranslateT("Pack Updater");
Text = TranslateT("No files for update.");
- if (ServiceExists(MS_POPUP_ADDPOPUPEX) && DBGetContactSettingByte(NULL, "PopUp", "ModuleIsEnabled", 1) && DBGetContactSettingByte(NULL, MODNAME, "Popups2", DEFAULT_POPUP_ENABLED))
+ if ( ServiceExists(MS_POPUP_ADDPOPUP) && DBGetContactSettingByte(NULL, "PopUp", "ModuleIsEnabled", 1) && DBGetContactSettingByte(NULL, MODNAME, "Popups2", DEFAULT_POPUP_ENABLED))
{
Number = 2;
show_popup(0, Title, Text, Number, 0);
@@ -401,7 +401,7 @@ void DoCheck(int iFlag)
{
Title = TranslateT("Pack Updater");
Text = TranslateT("Update checking already started!");
- if (ServiceExists(MS_POPUP_ADDPOPUPEX) && DBGetContactSettingByte(NULL, "PopUp", "ModuleIsEnabled", 1) && DBGetContactSettingByte(NULL, MODNAME, "Popups2", DEFAULT_POPUP_ENABLED))
+ if ( ServiceExists(MS_POPUP_ADDPOPUP) && DBGetContactSettingByte(NULL, "PopUp", "ModuleIsEnabled", 1) && DBGetContactSettingByte(NULL, MODNAME, "Popups2", DEFAULT_POPUP_ENABLED))
{
Number = 2;
show_popup(0, Title, Text, Number, 0);
diff --git a/plugins/Ping/src/options.cpp b/plugins/Ping/src/options.cpp
index 578c2a174f..c4433e7a9d 100644
--- a/plugins/Ping/src/options.cpp
+++ b/plugins/Ping/src/options.cpp
@@ -44,7 +44,7 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
EnableWindow(hw, FALSE);
}
- if(!ServiceExists( MS_POPUP_ADDPOPUP )) {
+ if( !ServiceExists( MS_POPUP_ADDPOPUP )) {
hw = GetDlgItem(hwndDlg, IDC_CHECKPOPUP);
EnableWindow(hw, FALSE);
hw = GetDlgItem(hwndDlg, IDC_CHECKPOPUP2);
diff --git a/plugins/Ping/src/utils.cpp b/plugins/Ping/src/utils.cpp
index 425aef76a2..a193888635 100644
--- a/plugins/Ping/src/utils.cpp
+++ b/plugins/Ping/src/utils.cpp
@@ -18,10 +18,10 @@ LRESULT CALLBACK NullWindowProc( HWND hWnd, UINT message, WPARAM wParam, LPARAM
void CALLBACK sttMainThreadCallback( ULONG_PTR dwParam )
{
- POPUPDATAEX* ppd = ( POPUPDATAEX* )dwParam;
+ POPUPDATA* ppd = ( POPUPDATA* )dwParam;
- if ( ServiceExists(MS_POPUP_ADDPOPUPEX) )
- PUAddPopUpEx(ppd);
+ if ( ServiceExists(MS_POPUP_ADDPOPUP))
+ PUAddPopUp(ppd);
free( ppd );
}
@@ -30,8 +30,8 @@ void __stdcall ShowPopup( const char* line1, const char* line2, int flags )
{
if(CallService(MS_SYSTEM_TERMINATED, 0, 0)) return;
- if ( ServiceExists( MS_POPUP_ADDPOPUP )) {
- POPUPDATAEX* ppd = ( POPUPDATAEX* )calloc( sizeof( POPUPDATAEX ), 1 );
+ if ( ServiceExists(MS_POPUP_ADDPOPUP)) {
+ POPUPDATA* ppd = ( POPUPDATA* )calloc( sizeof( POPUPDATA ), 1 );
ppd->lchContact = NULL;
ppd->lchIcon = (flags ? hIconResponding : hIconNotResponding);
diff --git a/plugins/PluginUpdater/src/Notifications.cpp b/plugins/PluginUpdater/src/Notifications.cpp
index a45303d957..184ec0aae2 100644
--- a/plugins/PluginUpdater/src/Notifications.cpp
+++ b/plugins/PluginUpdater/src/Notifications.cpp
@@ -116,7 +116,7 @@ static void MakePopupAction(POPUPACTION &pa, int id)
void ShowPopup(HWND hDlg, LPCTSTR ptszTitle, LPCTSTR ptszText, int Number, int ActType)
{
- if ( !ServiceExists(MS_POPUP_ADDPOPUPEX) || !DBGetContactSettingByte(NULL, "PopUp", "ModuleIsEnabled", 1) ) {
+ if ( !ServiceExists(MS_POPUP_ADDPOPUP) || !DBGetContactSettingByte(NULL, "PopUp", "ModuleIsEnabled", 1) ) {
char setting[100];
mir_snprintf(setting, SIZEOF(setting), "Popups%dM", Number);
if (DBGetContactSettingByte(NULL, MODNAME, setting, DEFAULT_MESSAGE_ENABLED)) {
diff --git a/plugins/Popup/src/main.cpp b/plugins/Popup/src/main.cpp
index 6e959b438b..4de24b0646 100644
--- a/plugins/Popup/src/main.cpp
+++ b/plugins/Popup/src/main.cpp
@@ -389,7 +389,6 @@ MIRAPI int Load(void)
//Service Functions
CreateServiceFunction(MS_POPUP_ADDPOPUP, PopUp_AddPopUp);
- CreateServiceFunction(MS_POPUP_ADDPOPUPEX, PopUp_AddPopUpEx);
CreateServiceFunction(MS_POPUP_ADDPOPUPW, PopUp_AddPopUpW);
CreateServiceFunction(MS_POPUP_ADDPOPUP2, PopUp_AddPopUp2);
diff --git a/plugins/Popup/src/popup_wnd2.cpp b/plugins/Popup/src/popup_wnd2.cpp
index d862b88d2b..cc4a55d55b 100644
--- a/plugins/Popup/src/popup_wnd2.cpp
+++ b/plugins/Popup/src/popup_wnd2.cpp
@@ -749,35 +749,6 @@ void PopupWnd2::setIcon(HICON hNewIcon)
}
}
-void PopupWnd2::updateData(POPUPDATA *ppd)
-{
- m_hContact = ppd->lchContact;
-
- m_clBack = ppd->colorBack;
- m_clClock = m_clTitle = m_clText = ppd->colorText;
- m_iTimeout = m_options->DisplayTime;
-
- mir_free(m_lpzText); mir_free(m_lpzTitle);
- mir_free(m_lpwzText); mir_free(m_lpwzTitle);
- if (m_textType == TT_NONE)
- m_textType = TT_ANSI;
- m_lpzTitle = mir_strdup(ppd->lpzContactName);
- m_lpzText = mir_strdup(ppd->lpzText);
- m_lpwzTitle = m_lpwzText = NULL;
- setIcon(ppd->lchIcon);
-
- 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();
-
- if (m_textType == TT_MTEXT) buildMText();
-}
-
void PopupWnd2::updateData(POPUPDATAEX_V2 *ppd)
{
m_hContact = ppd->lchContact;
@@ -1447,7 +1418,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_DATA: updateData((POPUPDATA *)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;
}
diff --git a/plugins/Popup/src/popup_wnd2.h b/plugins/Popup/src/popup_wnd2.h
index 0091afe1c0..6fcd148707 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(POPUPDATA *ppd);
void updateData(POPUPDATAEX_V2 *ppd);
void updateData(POPUPDATAW_V2 *ppd);
void updateData(POPUPDATA2 *ppd);
@@ -216,7 +215,6 @@ public:
SendMessage(m_hwnd, UM_CALLMETHOD, (WPARAM)method_copy, (LPARAM)lParam);
}
- LRESULT m_updateData_POPUPDATA(LPARAM arg) { updateData((POPUPDATA *)arg); update(); return 0; }
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; }
diff --git a/plugins/Popup/src/services.cpp b/plugins/Popup/src/services.cpp
index 6e693b8ec8..74301c89bb 100644
--- a/plugins/Popup/src/services.cpp
+++ b/plugins/Popup/src/services.cpp
@@ -89,45 +89,10 @@ INT_PTR PopUp_AddPopUp(WPARAM wParam, LPARAM lParam)
{
if (!gbPopupLoaded) return -1;
- POPUPDATA *ppd = (POPUPDATA*)wParam;
- if (!ppd) return -1;
-
- POPUPDATA2 ppd2 = {0};
- ppd2.cbSize = sizeof(ppd2);
- ppd2.flags = PU2_ANSI;
- ppd2.lchContact = ppd->lchContact;
- ppd2.lchIcon = ppd->lchIcon;
- ppd2.lpzTitle = ppd->lpzContactName;
- ppd2.lpzText = ppd->lpzText;
- ppd2.colorBack = ppd->colorBack;
- ppd2.colorText = ppd->colorText;
- ppd2.PluginWindowProc = ppd->PluginWindowProc;
- ppd2.PluginData = ppd->PluginData;
- ppd2.iSeconds = PopUpOptions.Seconds;
- return PopUp_AddPopUp2((WPARAM)&ppd2, lParam);
-/*
- PopupWnd2 *wnd = new PopupWnd2(ppd);
-
- if (lParam & APF_RETURN_HWND)
- {
- while (!wnd->bWindowCreated) Sleep(1);
- return (int)wnd->getHwnd();
- }
-
- return 1;
-*/
-}
-
-//===== PopUp/AddPopUpEx
-INT_PTR PopUp_AddPopUpEx(WPARAM wParam, LPARAM lParam)
-{
- if (!gbPopupLoaded) return -1;
-
POPUPDATAEX_V2 *ppd = (POPUPDATAEX_V2*)wParam;
if (!ppd) return -1;
- POPUPDATA2 ppd2 = {0};
- ppd2.cbSize = sizeof(ppd2);
+ POPUPDATA2 ppd2 = { sizeof(ppd2) };
ppd2.flags = PU2_ANSI;
ppd2.lchContact = ppd->lchContact;
ppd2.lchIcon = ppd->lchIcon;
diff --git a/plugins/Popup/src/services.h b/plugins/Popup/src/services.h
index 16828b36b9..ab0f0ddb43 100644
--- a/plugins/Popup/src/services.h
+++ b/plugins/Popup/src/services.h
@@ -26,10 +26,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
extern int num_classes; //for core class api support
-INT_PTR PopUp_AddPopUp(WPARAM, LPARAM);
INT_PTR PopUp_AddPopUpW(WPARAM, LPARAM);
-INT_PTR PopUp_AddPopUpEx(WPARAM, LPARAM);
+INT_PTR PopUp_AddPopUp(WPARAM, LPARAM);
INT_PTR PopUp_AddPopUp2(WPARAM, LPARAM);
INT_PTR PopUp_GetContact(WPARAM, LPARAM);
diff --git a/plugins/Scriver/src/msgs.cpp b/plugins/Scriver/src/msgs.cpp
index 93aca689e1..41ac0e86d0 100644
--- a/plugins/Scriver/src/msgs.cpp
+++ b/plugins/Scriver/src/msgs.cpp
@@ -473,9 +473,9 @@ int StatusIconPressed(WPARAM wParam, LPARAM lParam) {
static int ModuleLoad(WPARAM wParam, LPARAM lParam)
{
- g_dat.smileyAddInstalled = ServiceExists(MS_SMILEYADD_SHOWSELECTION) && ServiceExists(MS_SMILEYADD_REPLACESMILEYS) != 0;
- g_dat.popupInstalled = ServiceExists(MS_POPUP_ADDPOPUPEX) != 0;
- g_dat.ieviewInstalled = ServiceExists(MS_IEVIEW_WINDOW) != 0;
+ g_dat.smileyAddInstalled = ServiceExists(MS_SMILEYADD_SHOWSELECTION) && ServiceExists(MS_SMILEYADD_REPLACESMILEYS);
+ g_dat.popupInstalled = ServiceExists(MS_POPUP_ADDPOPUP);
+ g_dat.ieviewInstalled = ServiceExists(MS_IEVIEW_WINDOW);
return 0;
}
diff --git a/plugins/SecureIM/src/main.cpp b/plugins/SecureIM/src/main.cpp
index 7ef088c832..87370c7260 100644
--- a/plugins/SecureIM/src/main.cpp
+++ b/plugins/SecureIM/src/main.cpp
@@ -148,8 +148,8 @@ extern "C" __declspec(dllexport) int __cdecl Unload()
int ModuleLoad(WPARAM wParam, LPARAM lParam)
{
- bPopupExists = ServiceExists(MS_POPUP_ADDPOPUPEX) != 0;
- bMetaContacts = ServiceExists(MS_MC_GETMETACONTACT) != 0;
+ bPopupExists = ServiceExists(MS_POPUP_ADDPOPUP);
+ bMetaContacts = ServiceExists(MS_MC_GETMETACONTACT);
return 0;
}
diff --git a/plugins/SendScreenshotPlus/src/Main.cpp b/plugins/SendScreenshotPlus/src/Main.cpp
index 362f698362..7048794d81 100644
--- a/plugins/SendScreenshotPlus/src/Main.cpp
+++ b/plugins/SendScreenshotPlus/src/Main.cpp
@@ -31,7 +31,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
FI_INTERFACE *FIP = 0;
HINSTANCE hInst; //!< Global reference to the application
MGLOBAL myGlobals;
-int hLangpack;
+int hLangpack;
//Information gathered by Miranda, displayed in the plugin pane of the Option Dialog
@@ -59,10 +59,6 @@ HANDLE hsvc_Send2ImageShack=0;
HANDLE hNetlibUser = 0; //!< Netlib Register User
HANDLE hFolderScreenshot=0;
-HANDLE hhook_ModulesLoad=0;
-HANDLE hhook_SystemPShutdown=0;
-
-
// Functions ////////////////////////////////////////////////////////////////////////////
/*---------------------------------------------------------------------------
@@ -102,10 +98,8 @@ extern "C" int __declspec(dllexport) Load(void)
// load icon library (use UserInfoEx icon Pack)
IcoLib_LoadModule();
- hhook_ModulesLoad = HookEvent(ME_SYSTEM_MODULESLOADED, hook_ModulesLoaded);
- //hhook_options_init = HookEvent(ME_OPT_INITIALISE, hook_options_init);
- //hhook_OkToExit = HookEvent(ME_SYSTEM_OKTOEXIT, hook_OkToExit);
- hhook_SystemPShutdown = HookEvent(ME_SYSTEM_PRESHUTDOWN, hook_SystemPShutdown);
+ HookEvent(ME_SYSTEM_MODULESLOADED, hook_ModulesLoaded);
+ HookEvent(ME_SYSTEM_PRESHUTDOWN, hook_SystemPShutdown);
AddMenuItems();
RegisterServices();
@@ -115,26 +109,21 @@ extern "C" int __declspec(dllexport) Load(void)
int hook_ModulesLoaded(WPARAM, LPARAM)
{
-
myGlobals.PopUpExist = ServiceExists(MS_POPUP_ADDPOPUP);
myGlobals.PopUpActionsExist = ServiceExists(MS_POPUP_REGISTERACTIONS);
myGlobals.PluginHTTPExist = ServiceExists(MS_HTTP_ACCEPT_CONNECTIONS);
myGlobals.PluginFTPExist = ServiceExists(MS_FTPFILE_SHAREFILE);
-// myGlobals.PluginUserinfoEx = ServiceExists(MS_USERINFO_VCARD_EXPORT);
// Netlib register
- if (!NetlibInit()){
- ;
- }
+ NetlibInit();
// load my button class
- if(!ServiceExists("UserInfo/vCard/Export")) {
+ if(!ServiceExists("UserInfo/vCard/Export"))
CtrlButtonLoadModule();
- }
// Folders plugin support
hFolderScreenshot = FoldersRegisterCustomPathT(LPGEN("SendSS"), LPGEN("Screenshots"),
- _T(PROFILE_PATH)_T("\\")_T(CURRENT_PROFILE)_T("\\Screenshots"));
+ _T(PROFILE_PATH)_T("\\")_T(CURRENT_PROFILE)_T("\\Screenshots"));
return 0;
}
@@ -143,34 +132,27 @@ int hook_ModulesLoaded(WPARAM, LPARAM)
* Prepare the plugin to stop
* Called by Miranda when it will exit or when the plugin gets deselected
*/
+
extern "C" int __declspec(dllexport) Unload(void)
{
- UnhookEvent(hhook_SystemPShutdown);
-
- DestroyServiceFunction(MS_SENDSS_OPENDIALOG);
- DestroyServiceFunction(MS_SENDSS_EDITBITMAP);
- DestroyServiceFunction(MS_SENDSS_SENDDESKTOP);
- DestroyServiceFunction(MS_SENDSS_SEND2IMAGESHACK);
return 0;
}
-int hook_SystemPShutdown(WPARAM wParam, LPARAM lParam) {
- UnhookEvent(hhook_ModulesLoad);
-
+int hook_SystemPShutdown(WPARAM wParam, LPARAM lParam)
+{
// Netlib unregister
NetlibClose();
// uninitialize classes
CtrlButtonUnloadModule();
-
return 0;
}
//---------------------------------------------------------------------------
// Netlib
-HANDLE NetlibInit(void) {
- NETLIBUSER nlu = {0};
- nlu.cbSize = sizeof(nlu);
+HANDLE NetlibInit(void)
+{
+ NETLIBUSER nlu = { sizeof(nlu) };
nlu.szSettingsModule = __PLUGIN_NAME;
nlu.ptszDescriptiveName = TranslateT("SendSS HTTP connections");
nlu.flags = NUF_OUTGOING|NUF_HTTPCONNS|NUF_TCHAR; //|NUF_NOHTTPSOPTION;
diff --git a/plugins/SendScreenshotPlus/src/Utils.cpp b/plugins/SendScreenshotPlus/src/Utils.cpp
index 3758c1e18e..63affd0132 100644
--- a/plugins/SendScreenshotPlus/src/Utils.cpp
+++ b/plugins/SendScreenshotPlus/src/Utils.cpp
@@ -537,18 +537,3 @@ INT_PTR SaveTIF(HBITMAP hBmp, LPTSTR szFilename) {
Gdiplus::GdiplusShutdown(gdiplusToken);
return 0;
}
-
-//---------------------------------------------------------------------------
-/* Old stuff from Borland C++ */
-//---------------------------------------------------------------------------
-/*/Popup
-void ShowPopUp(char *title, char *text) {
- POPUPDATAEX pude={0};
-
- strcpy(pude.lpzText, text);
- strcpy(pude.lpzContactName, title);
- pude.lchIcon = LoadIcon(g_hAppInstance, MAKEINTRESOURCE(MAIN));
- pude.colorBack = POPUP_USE_SKINNED_BG;
-
- CallService(MS_POPUP_ADDPOPUP, (WPARAM)&pude, 0);
-}*/
diff --git a/plugins/SendScreenshotPlus/src/global.h b/plugins/SendScreenshotPlus/src/global.h
index b6301a8caf..2cf2a12374 100644
--- a/plugins/SendScreenshotPlus/src/global.h
+++ b/plugins/SendScreenshotPlus/src/global.h
@@ -99,7 +99,7 @@ using namespace std;
#define MSGINFO (text) MessageBox(NULL, text, _T("SendSS"), MB_OK | MB_ICONINFORMATION)
typedef struct _MGLOBAL {
- DWORD mirandaVersion; // mirandaVersion
+ DWORD mirandaVersion; // mirandaVersion
BOOLEAN PopUpExist : 1; // Popup or MS_POPUP_ADDPOPUP exist
BOOLEAN PopUpActionsExist : 1; // Popup++ or MS_POPUP_REGISTERACTIONS exist
BOOLEAN PluginHTTPExist : 1; // HTTPServer or MS_HTTP_ACCEPT_CONNECTIONS exist
diff --git a/plugins/SplashScreen/src/debug.h b/plugins/SplashScreen/src/debug.h
index 70e36dfaed..7338f644f0 100644
--- a/plugins/SplashScreen/src/debug.h
+++ b/plugins/SplashScreen/src/debug.h
@@ -13,16 +13,14 @@ extern TCHAR szLogFile[MAX_PATH];
int inline _DebugPopup(HANDLE hContact, TCHAR *fmt, ...)
{
- POPUPDATAT ppd;
va_list va;
TCHAR debug[1024];
va_start(va, fmt);
mir_sntprintf(debug, SIZEOF(debug), fmt, va);
- if(CallService(MS_POPUP_QUERY, PUQS_GETSTATUS, 0) == 1)
- {
- ZeroMemory((void *)&ppd, sizeof(ppd));
+ if(CallService(MS_POPUP_QUERY, PUQS_GETSTATUS, 0) == 1) {
+ POPUPDATAT ppd = { 0 };
ppd.lchContact = hContact;
ppd.lchIcon = LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
if(hContact != 0)
@@ -32,7 +30,7 @@ int inline _DebugPopup(HANDLE hContact, TCHAR *fmt, ...)
_tcsncpy_s(ppd.lptzText, debug, MAX_SECONDLINE - 20);
ppd.colorText = RGB(255,255,255);
ppd.colorBack = RGB(255,0,0);
- CallService(MS_POPUP_ADDPOPUP, (WPARAM)&ppd, 0);
+ PUAddPopUpT(&ppd);
}
return 0;
}
diff --git a/plugins/StatusPlugins/KeepStatus/keepstatus.cpp b/plugins/StatusPlugins/KeepStatus/keepstatus.cpp
index 396fd04963..9d3ca24c14 100644
--- a/plugins/StatusPlugins/KeepStatus/keepstatus.cpp
+++ b/plugins/StatusPlugins/KeepStatus/keepstatus.cpp
@@ -1045,7 +1045,7 @@ static int ProcessPopup(int reason, LPARAM lParam)
static INT_PTR ShowPopup(char* msg, HICON hIcon)
{
- POPUPDATAEX ppd = { NULL };
+ POPUPDATA ppd = { NULL };
ppd.lchContact = NULL;
ppd.lchIcon = hIcon;
memset(ppd.lpzContactName, '\0', sizeof(ppd.lpzContactName));
@@ -1084,7 +1084,7 @@ static INT_PTR ShowPopup(char* msg, HICON hIcon)
ppd.iSeconds = 0;
break;
}
- return PUAddPopUpEx(&ppd);
+ return PUAddPopUp(&ppd);
}
LRESULT CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
diff --git a/plugins/StatusPlugins/KeepStatus/options.cpp b/plugins/StatusPlugins/KeepStatus/options.cpp
index 03391e70e4..c62510fade 100644
--- a/plugins/StatusPlugins/KeepStatus/options.cpp
+++ b/plugins/StatusPlugins/KeepStatus/options.cpp
@@ -401,14 +401,14 @@ INT_PTR CALLBACK PopupOptDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lPar
break;
}
// delay
- EnableWindow(GetDlgItem(hwndDlg, IDC_DELAYCUSTOM), ServiceExists(MS_POPUP_ADDPOPUPEX));
- EnableWindow(GetDlgItem(hwndDlg, IDC_DELAYFROMPU), ServiceExists(MS_POPUP_ADDPOPUPEX));
- EnableWindow(GetDlgItem(hwndDlg, IDC_DELAYPERMANENT), ServiceExists(MS_POPUP_ADDPOPUPEX));
- EnableWindow(GetDlgItem(hwndDlg, IDC_DELAY), ServiceExists(MS_POPUP_ADDPOPUPEX));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_DELAYCUSTOM), ServiceExists(MS_POPUP_ADDPOPUP));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_DELAYFROMPU), ServiceExists(MS_POPUP_ADDPOPUP));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_DELAYPERMANENT), ServiceExists(MS_POPUP_ADDPOPUP));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_DELAY), ServiceExists(MS_POPUP_ADDPOPUP));
switch (DBGetContactSettingByte(NULL, MODULENAME, SETTING_POPUP_DELAYTYPE, POPUP_DELAYFROMPU)) {
case POPUP_DELAYCUSTOM:
CheckDlgButton(hwndDlg, IDC_DELAYCUSTOM, BST_CHECKED);
- EnableWindow(GetDlgItem(hwndDlg, IDC_DELAY), ServiceExists(MS_POPUP_ADDPOPUPEX));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_DELAY), ServiceExists(MS_POPUP_ADDPOPUP));
break;
case POPUP_DELAYPERMANENT:
diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp
index b8329eb8e1..9fad90a235 100644
--- a/plugins/TabSRMM/src/globals.cpp
+++ b/plugins/TabSRMM/src/globals.cpp
@@ -201,8 +201,8 @@ void CGlobals::reloadSystemModulesChanged()
bMetaEnabled = 0;
}
- g_PopupAvail = (ServiceExists(MS_POPUP_ADDPOPUPEX) ? 1 : 0);
- g_PopupWAvail = (ServiceExists(MS_POPUP_ADDPOPUPW) ? 1 : 0);
+ g_PopupAvail = ServiceExists(MS_POPUP_ADDPOPUP);
+ g_PopupWAvail = ServiceExists(MS_POPUP_ADDPOPUPW);
CLISTMENUITEM mi = { sizeof(mi) };
mi.position = -2000090000;
diff --git a/plugins/TabSRMM/src/typingnotify.cpp b/plugins/TabSRMM/src/typingnotify.cpp
index 8344486540..4ce0796936 100644
--- a/plugins/TabSRMM/src/typingnotify.cpp
+++ b/plugins/TabSRMM/src/typingnotify.cpp
@@ -488,9 +488,8 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
int TN_OptionsInitialize(WPARAM wParam, LPARAM lParam)
{
- if (ServiceExists(MS_POPUP_ADDPOPUP)) {
- OPTIONSDIALOGPAGE odp = { 0 };
- odp.cbSize = sizeof(odp);
+ if ( ServiceExists(MS_POPUP_ADDPOPUP)) {
+ OPTIONSDIALOGPAGE odp = { sizeof(odp) };
odp.position = 100000000;
odp.hInstance = g_hInst;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_TYPINGNOTIFYPOPUP);
diff --git a/plugins/TrafficCounter/src/TrafficCounter.cpp b/plugins/TrafficCounter/src/TrafficCounter.cpp
index e51b61a644..994752626b 100644
--- a/plugins/TrafficCounter/src/TrafficCounter.cpp
+++ b/plugins/TrafficCounter/src/TrafficCounter.cpp
@@ -181,9 +181,9 @@ int TrafficCounterShutdown(WPARAM wParam, LPARAM lParam)
int ModuleLoad(WPARAM wParam, LPARAM lParam)
{
- bPopupExists = ServiceExists(MS_POPUP_ADDPOPUPEX) != 0;
- bVariablesExists = ServiceExists(MS_VARS_FORMATSTRING) && ServiceExists(MS_VARS_REGISTERTOKEN) != 0;
- bTooltipExists = ServiceExists("mToolTip/ShowTipW") || ServiceExists("mToolTip/ShowTip") != 0;
+ bPopupExists = ServiceExists(MS_POPUP_ADDPOPUP);
+ bVariablesExists = ServiceExists(MS_VARS_FORMATSTRING) && ServiceExists(MS_VARS_REGISTERTOKEN);
+ bTooltipExists = ServiceExists("mToolTip/ShowTipW") || ServiceExists("mToolTip/ShowTip");
return 0;
}
diff --git a/plugins/WhenWasIt/src/dlg_handlers.cpp b/plugins/WhenWasIt/src/dlg_handlers.cpp
index b464e320f7..bd987f61fe 100644
--- a/plugins/WhenWasIt/src/dlg_handlers.cpp
+++ b/plugins/WhenWasIt/src/dlg_handlers.cpp
@@ -217,7 +217,7 @@ INT_PTR CALLBACK DlgProcOptions(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPara
CheckDlgButton(hWnd, IDC_USE_DIALOG, (commonData.bUseDialog) ? BST_CHECKED : BST_UNCHECKED);
EnableDialogGroup(hWnd, commonData.bUseDialog);
- if (ServiceExists(MS_POPUP_ADDPOPUPEX)) {
+ if ( ServiceExists(MS_POPUP_ADDPOPUP)) {
CheckDlgButton(hWnd, IDC_USE_POPUPS, commonData.bUsePopups ? BST_CHECKED : BST_UNCHECKED);
EnablePopupsGroup(hWnd, commonData.bUsePopups);
}
diff --git a/plugins/WhoUsesMyFiles/src/wumfplug.cpp b/plugins/WhoUsesMyFiles/src/wumfplug.cpp
index ea9e3d5706..62b8f112cc 100644
--- a/plugins/WhoUsesMyFiles/src/wumfplug.cpp
+++ b/plugins/WhoUsesMyFiles/src/wumfplug.cpp
@@ -26,13 +26,10 @@ void LoadOptions()
dbv.type = DBVT_TCHAR;
ZeroMemory(&WumfOptions, sizeof(WumfOptions));
if (DBGetContactSetting(NULL, ModuleName, OPT_FILE, &dbv) == 0)
- {
_tcsncpy(WumfOptions.LogFile, dbv.ptszVal, 255);
- }
else
- {
WumfOptions.LogFile[0] = '\0';
- };
+
WumfOptions.PopupsEnabled = DBGetContactSettingByte(NULL,ModuleName, POPUPS_ENABLED, TRUE);
WumfOptions.UseDefColor = DBGetContactSettingByte(NULL,ModuleName, COLOR_DEF, TRUE);
@@ -46,8 +43,7 @@ void LoadOptions()
WumfOptions.DelayInf = DBGetContactSettingByte(NULL,ModuleName, DELAY_INF, FALSE);
WumfOptions.DelaySet = DBGetContactSettingByte(NULL,ModuleName, DELAY_SET, FALSE);
WumfOptions.DelaySec = DBGetContactSettingByte(NULL,ModuleName, DELAY_SEC, 0);
- if(!ServiceExists(MS_POPUP_ADDPOPUPEX))
- {
+ if( !ServiceExists(MS_POPUP_ADDPOPUP)) {
WumfOptions.DelayDef = TRUE;
WumfOptions.DelaySet = FALSE;
WumfOptions.DelayInf = FALSE;
@@ -180,35 +176,35 @@ void ShowThePopUp(PWumf w, LPTSTR title, LPTSTR text)
void ShowThePreview()
{
- if(!ServiceExists(MS_POPUP_ADDPOPUP))
- {
+ if( !ServiceExists(MS_POPUP_ADDPOPUP)) {
MessageBox(NULL, TranslateT("PopUp plugin not found!"), TranslateT("WUMF plugin"), MB_OK|MB_ICONSTOP);
return;
- };
+ }
+
if(WumfOptions.AlertFolders)
{
- ShowThePopUp(NULL, _T("Guest"), _T("C:\\My Share"));
- Sleep(300);
- ShowThePopUp(NULL, _T("Guest"), _T("C:\\My Share\\Photos"));
- Sleep(300);
+ ShowThePopUp(NULL, _T("Guest"), _T("C:\\My Share"));
+ Sleep(300);
+ ShowThePopUp(NULL, _T("Guest"), _T("C:\\My Share\\Photos"));
+ Sleep(300);
}
ShowThePopUp(NULL, _T("Guest"), _T("C:\\Share\\My Photos\\photo.jpg"));
Sleep(300);
if(WumfOptions.AlertFolders)
{
- ShowThePopUp(NULL, _T("User"), _T("C:\\My Share"));
- Sleep(300);
- ShowThePopUp(NULL, _T("User"), _T("C:\\My Share\\Movies"));
- Sleep(300);
+ ShowThePopUp(NULL, _T("User"), _T("C:\\My Share"));
+ Sleep(300);
+ ShowThePopUp(NULL, _T("User"), _T("C:\\My Share\\Movies"));
+ Sleep(300);
}
ShowThePopUp(NULL, _T("User"), _T("C:\\My Share\\Movies\\The Two Towers.avi"));
Sleep(300);
if(WumfOptions.AlertFolders)
{
- ShowThePopUp(NULL, _T("Administrator"), _T("C:\\Distributives"));
- Sleep(300);
- ShowThePopUp(NULL, _T("Administrator"), _T("C:\\Distributives\\Win2k"));
- Sleep(300);
+ ShowThePopUp(NULL, _T("Administrator"), _T("C:\\Distributives"));
+ Sleep(300);
+ ShowThePopUp(NULL, _T("Administrator"), _T("C:\\Distributives\\Win2k"));
+ Sleep(300);
}
ShowThePopUp(NULL, _T("Administrator"), _T("C:\\Distributives\\Win2k\\setup.exe"));
};
@@ -230,9 +226,9 @@ DWORD WINAPI ThreadProc(LPVOID lpParameter)
SetForegroundWindow(hDlg);
return (int)(1);
}
- hDlg = CreateDialog(hInst, MAKEINTRESOURCE(IDD_CONNLIST), NULL, (DLGPROC)ConnDlgProc);
- SendMessage(hDlg, WM_SETICON, ICON_SMALL, (LPARAM)LoadIcon(hInst,MAKEINTRESOURCE(IDI_DRIVE)));
- ShowWindow(hDlg, SW_SHOW);
+ hDlg = CreateDialog(hInst, MAKEINTRESOURCE(IDD_CONNLIST), NULL, (DLGPROC)ConnDlgProc);
+ SendMessage(hDlg, WM_SETICON, ICON_SMALL, (LPARAM)LoadIcon(hInst,MAKEINTRESOURCE(IDI_DRIVE)));
+ ShowWindow(hDlg, SW_SHOW);
while(GetMessage(&msg, NULL, 0, 0) == TRUE)
{
TranslateMessage(&msg);
@@ -240,11 +236,10 @@ DWORD WINAPI ThreadProc(LPVOID lpParameter)
}
hDlg = NULL;
ExitThread(0);
-
+
return (int)(1);
}
-
static INT_PTR WumfShowConnections(WPARAM wParam,LPARAM lParam)
{
DWORD threadID = 0;
@@ -351,13 +346,11 @@ INT_PTR CALLBACK OptionsDlgProc(HWND hwndDlg,UINT msg,WPARAM wparam,LPARAM lpara
CheckDlgButton(hwndDlg, IDC_COLOR_SET, WumfOptions.SelectColor?BST_CHECKED:BST_UNCHECKED);
EnableWindow(GetDlgItem(hwndDlg, IDC_COLOR_BACK), WumfOptions.SelectColor);
EnableWindow(GetDlgItem(hwndDlg, IDC_COLOR_TEXT), WumfOptions.SelectColor);
- if(WumfOptions.SelectColor)
- {
+ if(WumfOptions.SelectColor) {
SendDlgItemMessage(hwndDlg,IDC_COLOR_BACK,CPM_SETCOLOUR,0,WumfOptions.ColorBack);
SendDlgItemMessage(hwndDlg,IDC_COLOR_TEXT,CPM_SETCOLOUR,0,WumfOptions.ColorText);
}
- if(!ServiceExists(MS_POPUP_ADDPOPUPEX))
- {
+ if( !ServiceExists(MS_POPUP_ADDPOPUP)) {
DisableDelayOptions(hwndDlg);
break;
}
diff --git a/plugins/YAMN/src/proto/pop3/pop3opt.cpp b/plugins/YAMN/src/proto/pop3/pop3opt.cpp
index 5f0cf9230e..baebcd0bbd 100644
--- a/plugins/YAMN/src/proto/pop3/pop3opt.cpp
+++ b/plugins/YAMN/src/proto/pop3/pop3opt.cpp
@@ -187,7 +187,7 @@ int YAMNOptInitSvc(WPARAM wParam,LPARAM lParam)
odp.pfnDlgProc = DlgProcPluginOpt;
Options_AddPage(wParam, &odp);
- if ( ServiceExists(MS_POPUP_ADDPOPUPEX)) {
+ if ( ServiceExists(MS_POPUP_ADDPOPUP)) {
odp.pszGroup = LPGEN("PopUps");
odp.pszTab = LPGEN("YAMN");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_POP3ACCOUNTPOPUP);
diff --git a/plugins/YAPP/src/services.cpp b/plugins/YAPP/src/services.cpp
index 8d5f962b69..0dab66ce86 100644
--- a/plugins/YAPP/src/services.cpp
+++ b/plugins/YAPP/src/services.cpp
@@ -38,7 +38,7 @@ void StripBBCodesInPlace(wchar_t *text)
}
}
-INT_PTR CreatePopupA(WPARAM wParam, LPARAM lParam)
+static INT_PTR CreatePopup(WPARAM wParam, LPARAM lParam)
{
POPUPDATA *pd_in = (POPUPDATA *)wParam;
PopupData *pd_out = (PopupData *)mir_calloc(sizeof(PopupData));
@@ -60,44 +60,6 @@ INT_PTR CreatePopupA(WPARAM wParam, LPARAM lParam)
}
pd_out->windowProc = pd_in->PluginWindowProc;
pd_out->opaque = pd_in->PluginData;
- pd_out->timeout = 0;
-
- lstPopupHistory.Add(pd_out->pwzTitle, pd_out->pwzText, time(0));
-
- if (!db_get_b(0, MODULE, "Enabled", 1)) {
- mir_free(pd_out->pwzTitle);
- mir_free(pd_out->pwzText);
- mir_free(pd_out);
- return -1;
- }
-
- //MessageBox(0, pd_out->lpwzContactName, _T("CreatePopupA"), MB_OK);
- PostMPMessage(MUM_CREATEPOPUP, 0, (LPARAM)pd_out);
- return 0;
-}
-
-INT_PTR CreatePopupExA(WPARAM wParam, LPARAM lParam) {
-
- POPUPDATAEX *pd_in = (POPUPDATAEX *)wParam;
- PopupData *pd_out = (PopupData *)mir_calloc(sizeof(PopupData));
-
- 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->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));
@@ -108,12 +70,11 @@ INT_PTR CreatePopupExA(WPARAM wParam, LPARAM lParam) {
return -1;
}
- //MessageBox(0, pd_out->lpwzContactName, _T("CreatePopupExA"), MB_OK);
PostMPMessage(MUM_CREATEPOPUP, 0, (LPARAM)pd_out);
return 0;
}
-INT_PTR CreatePopupW(WPARAM wParam, LPARAM lParam)
+static INT_PTR CreatePopupW(WPARAM wParam, LPARAM lParam)
{
POPUPDATAW *pd_in = (POPUPDATAW *)wParam;
PopupData *pd_out = (PopupData *)mir_calloc(sizeof(PopupData));
@@ -145,12 +106,11 @@ INT_PTR CreatePopupW(WPARAM wParam, LPARAM lParam)
return -1;
}
- //MessageBox(0, pd_out->lpwzContactName, _T("CreatePopupW"), MB_OK);
PostMPMessage(MUM_CREATEPOPUP, 0, (LPARAM)pd_out);
return 0;
}
-INT_PTR ChangeTextW(WPARAM wParam, LPARAM lParam)
+static INT_PTR ChangeTextW(WPARAM wParam, LPARAM lParam)
{
HWND hwndPop = (HWND)wParam;
wchar_t *newText = NEWWSTR_ALLOCA((wchar_t *)lParam);
@@ -161,7 +121,7 @@ INT_PTR ChangeTextW(WPARAM wParam, LPARAM lParam)
return 0;
}
-INT_PTR ChangeTextA(WPARAM wParam, LPARAM lParam)
+static INT_PTR ChangeTextA(WPARAM wParam, LPARAM lParam)
{
HWND hwndPop = (HWND)wParam;
char *newText = (char *)lParam;
@@ -200,7 +160,8 @@ void ShowPopup(PopupData &pd_in)
PostMPMessage(MUM_CREATEPOPUP, 0, (LPARAM)pd_out);
}
-INT_PTR GetContact(WPARAM wParam, LPARAM lParam) {
+static INT_PTR GetContact(WPARAM wParam, LPARAM lParam)
+{
HWND hwndPop = (HWND)wParam;
HANDLE hContact;
if (GetCurrentThreadId() == message_pump_thread_id) {
@@ -215,7 +176,8 @@ INT_PTR GetContact(WPARAM wParam, LPARAM lParam) {
return (INT_PTR)hContact;
}
-INT_PTR GetOpaque(WPARAM wParam, LPARAM lParam) {
+static INT_PTR GetOpaque(WPARAM wParam, LPARAM lParam)
+{
HWND hwndPop = (HWND)wParam;
void *data = 0;
if (GetCurrentThreadId() == message_pump_thread_id) {
@@ -230,7 +192,8 @@ INT_PTR GetOpaque(WPARAM wParam, LPARAM lParam) {
return (INT_PTR)data;
}
-INT_PTR IsSecondLineShown(WPARAM wParam, LPARAM lParam) {
+static INT_PTR IsSecondLineShown(WPARAM wParam, LPARAM lParam)
+{
return TRUE;
}
@@ -244,39 +207,43 @@ void UpdateMenu()
INT_PTR PopupQuery(WPARAM wParam, LPARAM lParam) {
switch(wParam) {
- case PUQS_ENABLEPOPUPS:
- {
- bool enabled = db_get_b(0, MODULE, "Enabled", 1) != 0;
- if (!enabled) db_set_b(0, MODULE, "Enabled", 1);
- return !enabled;
- }
- break;
- case PUQS_DISABLEPOPUPS:
- {
- bool enabled = db_get_b(0, MODULE, "Enabled", 1) != 0;
- if (enabled) db_set_b(0, MODULE, "Enabled", 0);
- return enabled;
- }
- break;
- case PUQS_GETSTATUS:
- return db_get_b(0, MODULE, "Enabled", 1);
- default:
- return 1;
+ case PUQS_ENABLEPOPUPS:
+ {
+ bool enabled = db_get_b(0, MODULE, "Enabled", 1) != 0;
+ if (!enabled) db_set_b(0, MODULE, "Enabled", 1);
+ return !enabled;
+ }
+ break;
+ case PUQS_DISABLEPOPUPS:
+ {
+ bool enabled = db_get_b(0, MODULE, "Enabled", 1) != 0;
+ if (enabled) db_set_b(0, MODULE, "Enabled", 0);
+ return enabled;
+ }
+ break;
+
+ case PUQS_GETSTATUS:
+ return db_get_b(0, MODULE, "Enabled", 1);
+
+ default:
+ return 1;
}
UpdateMenu();
return 0;
}
-INT_PTR TogglePopups(WPARAM wParam, LPARAM lParam) {
+static INT_PTR TogglePopups(WPARAM wParam, LPARAM lParam)
+{
BYTE val = db_get_b(0, MODULE, "Enabled", 1);
db_set_b(0, MODULE, "Enabled", !val);
UpdateMenu();
return 0;
}
-INT_PTR PopupChangeA(WPARAM wParam, LPARAM lParam) {
+static INT_PTR PopupChangeA(WPARAM wParam, LPARAM lParam)
+{
HWND hwndPop = (HWND)wParam;
- POPUPDATAEX *pd_in = (POPUPDATAEX *)lParam;
+ POPUPDATA *pd_in = (POPUPDATA *)lParam;
if (IsWindow(hwndPop)) {
PopupData pd_out;
@@ -309,7 +276,8 @@ INT_PTR PopupChangeA(WPARAM wParam, LPARAM lParam) {
return 0;
}
-INT_PTR PopupChangeW(WPARAM wParam, LPARAM lParam) {
+static INT_PTR PopupChangeW(WPARAM wParam, LPARAM lParam)
+{
HWND hwndPop = (HWND)wParam;
POPUPDATAW *pd_in = (POPUPDATAW *)lParam;
@@ -344,7 +312,8 @@ INT_PTR PopupChangeW(WPARAM wParam, LPARAM lParam) {
return 0;
}
-INT_PTR ShowMessage(WPARAM wParam, LPARAM lParam) {
+static INT_PTR ShowMessage(WPARAM wParam, LPARAM lParam)
+{
if ( !db_get_b(0, MODULE, "Enabled", 1)) return 0;
POPUPDATAT pd = {0};
@@ -355,7 +324,7 @@ INT_PTR ShowMessage(WPARAM wParam, LPARAM lParam) {
return 0;
}
-INT_PTR ShowMessageW(WPARAM wParam, LPARAM lParam)
+static INT_PTR ShowMessageW(WPARAM wParam, LPARAM lParam)
{
if ( !db_get_b(0, MODULE, "Enabled", 1)) return 0;
@@ -371,9 +340,9 @@ INT_PTR ShowMessageW(WPARAM wParam, LPARAM lParam)
INT_PTR PopUp_ShowHistory(WPARAM wParam, LPARAM lParam)
{
- if (!hHistoryWindow) {
+ if (!hHistoryWindow)
hHistoryWindow = CreateDialog(hInst, MAKEINTRESOURCE(IDD_LST_HISTORY), NULL, DlgProcHistLst);
- }
+
ShowWindow(hHistoryWindow, SW_SHOW);
return 0;
}
@@ -381,7 +350,7 @@ INT_PTR PopUp_ShowHistory(WPARAM wParam, LPARAM lParam)
int num_classes = 0;
POPUPCLASS *classes = 0;
-INT_PTR RegisterPopupClass(WPARAM wParam, LPARAM lParam)
+static INT_PTR RegisterPopupClass(WPARAM wParam, LPARAM lParam)
{
classes = (POPUPCLASS *)mir_realloc(classes, sizeof(POPUPCLASS) * (num_classes + 1));
memcpy(classes + num_classes, (PVOID)lParam, sizeof(POPUPCLASS));
@@ -406,7 +375,7 @@ INT_PTR RegisterPopupClass(WPARAM wParam, LPARAM lParam)
return 0;
}
-INT_PTR CreateClassPopup(WPARAM wParam, LPARAM lParam)
+static INT_PTR CreateClassPopup(WPARAM wParam, LPARAM lParam)
{
POPUPDATACLASS *pdc = (POPUPDATACLASS *)lParam;
if (pdc->cbSize < sizeof(POPUPDATACLASS)) return 1;
@@ -447,8 +416,7 @@ void InitServices()
{
CreateServiceFunction(MS_POPUP_REGISTERCLASS, RegisterPopupClass);
CreateServiceFunction(MS_POPUP_ADDPOPUPCLASS, CreateClassPopup);
- CreateServiceFunction(MS_POPUP_ADDPOPUP, CreatePopupA);
- CreateServiceFunction(MS_POPUP_ADDPOPUPEX, CreatePopupExA);
+ CreateServiceFunction(MS_POPUP_ADDPOPUP, CreatePopup);
CreateServiceFunction(MS_POPUP_ADDPOPUPW, CreatePopupW);
CreateServiceFunction(MS_POPUP_CHANGETEXTW, ChangeTextW);
CreateServiceFunction(MS_POPUP_CHANGETEXT, ChangeTextA);
diff --git a/protocols/IcqOscarJ/src/icq_popups.cpp b/protocols/IcqOscarJ/src/icq_popups.cpp
index fe2337daca..e978f6e5af 100644
--- a/protocols/IcqOscarJ/src/icq_popups.cpp
+++ b/protocols/IcqOscarJ/src/icq_popups.cpp
@@ -204,13 +204,10 @@ int CIcqProto::ShowPopUpMsg(HANDLE hContact, const char *szTitle, const char *sz
{
if (bPopUpService && getSettingByte(NULL, "PopupsEnabled", DEFAULT_POPUPS_ENABLED))
{
- POPUPDATAEX ppd = {0};
- POPUPDATAW ppdw = {0};
+ POPUPDATAT ppd = { 0 };
LPCTSTR rsIcon;
char szPrefix[32], szSetting[32];
-
strcpy(szPrefix, "Popups");
- ppd.iSeconds = 0;
switch(bType) {
case LOG_NOTE:
@@ -254,20 +251,17 @@ int CIcqProto::ShowPopUpMsg(HANDLE hContact, const char *szTitle, const char *sz
ppd.lchIcon = Skin_GetIconByHandle(m_hProtoIcon);
else
ppd.lchIcon = (HICON)LoadImage( NULL, rsIcon, IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), LR_SHARED);
- if (getSettingByte(NULL, "PopupsWinColors", DEFAULT_POPUPS_WIN_COLORS))
- {
+
+ if (getSettingByte(NULL, "PopupsWinColors", DEFAULT_POPUPS_WIN_COLORS)) {
ppd.colorText = GetSysColor(COLOR_WINDOWTEXT);
ppd.colorBack = GetSysColor(COLOR_WINDOW);
}
- else
- {
- if (getSettingByte(NULL, "PopupsDefColors", DEFAULT_POPUPS_DEF_COLORS))
- {
+ else {
+ if (getSettingByte(NULL, "PopupsDefColors", DEFAULT_POPUPS_DEF_COLORS)) {
ppd.colorText = NULL;
ppd.colorBack = NULL;
}
- else
- {
+ else {
strcpy(szSetting, szPrefix);
strcat(szSetting, "TextColor");
ppd.colorText = getSettingDword(NULL, szSetting, ppd.colorText);
@@ -280,36 +274,17 @@ int CIcqProto::ShowPopUpMsg(HANDLE hContact, const char *szTitle, const char *sz
strcat(szSetting, "Timeout");
ppd.iSeconds = getSettingDword(NULL, szSetting, ppd.iSeconds);
- // call unicode popup module - only on unicode OS otherwise it will not work properly :(
- // due to Popup Plug bug in ADDPOPUPW implementation
- if ( ServiceExists( MS_POPUP_ADDPOPUPW ))
- {
- char str[4096];
-
- make_unicode_string_static(ICQTranslateUtfStatic(szTitle, str, sizeof(str)), ppdw.lpwzContactName, MAX_CONTACTNAME);
- make_unicode_string_static(ICQTranslateUtfStatic(szMsg, str, sizeof(str)), ppdw.lpwzText, MAX_SECONDLINE);
- ppdw.lchContact = hContact;
- ppdw.lchIcon = ppd.lchIcon;
- ppdw.colorBack = ppd.colorBack;
- ppdw.colorText = ppd.colorText;
- ppdw.PluginWindowProc = NULL;
- ppdw.PluginData = NULL;
- ppdw.iSeconds = ppd.iSeconds;
- return CallService(MS_POPUP_ADDPOPUPW, (WPARAM)&ppdw, 0);
- }
- else
-
- {
- char str[MAX_PATH];
-
- utf8_decode_static(ICQTranslateUtfStatic(szTitle, str, MAX_PATH), ppd.lpzContactName, MAX_CONTACTNAME);
- utf8_decode_static(ICQTranslateUtfStatic(szMsg, str, MAX_PATH), ppd.lpzText, MAX_SECONDLINE);
- ppd.lchContact = hContact;
- ppd.PluginWindowProc = NULL;
- ppd.PluginData = NULL;
-
- return CallService(MS_POPUP_ADDPOPUPEX, (WPARAM)&ppd, 0);
- }
+ char str[4096];
+ make_unicode_string_static( ICQTranslateUtfStatic(szTitle, str, sizeof(str)), ppd.lpwzContactName, MAX_CONTACTNAME);
+ make_unicode_string_static( ICQTranslateUtfStatic(szMsg, str, sizeof(str)), ppd.lpwzText, MAX_SECONDLINE);
+ ppd.lchContact = hContact;
+ ppd.lchIcon = ppd.lchIcon;
+ ppd.colorBack = ppd.colorBack;
+ ppd.colorText = ppd.colorText;
+ ppd.PluginWindowProc = NULL;
+ ppd.PluginData = NULL;
+ ppd.iSeconds = ppd.iSeconds;
+ return PUAddPopUpT(&ppd);
}
return -1; // Failure
}
diff --git a/protocols/IcqOscarJ/src/init.cpp b/protocols/IcqOscarJ/src/init.cpp
index 45bbc15bec..a92d3faba1 100644
--- a/protocols/IcqOscarJ/src/init.cpp
+++ b/protocols/IcqOscarJ/src/init.cpp
@@ -91,7 +91,7 @@ IconItem g_IconsList[4] =
int ModuleLoad(WPARAM wParam, LPARAM lParam)
{
- bPopUpService = ServiceExists(MS_POPUP_ADDPOPUPEX) != 0;
+ bPopUpService = ServiceExists(MS_POPUP_ADDPOPUP);
return 0;
}
diff --git a/protocols/MRA/src/MraPopUp.cpp b/protocols/MRA/src/MraPopUp.cpp
index d8335d63bd..40f97d82c8 100644
--- a/protocols/MRA/src/MraPopUp.cpp
+++ b/protocols/MRA/src/MraPopUp.cpp
@@ -128,8 +128,7 @@ INT_PTR CALLBACK MraPopupDlgProcOpts(HWND hWndDlg, UINT msg, WPARAM wParam, LPAR
int CMraProto::OnPopupOptInit(WPARAM wParam, LPARAM lParam)
{
if ( ServiceExists(MS_POPUP_ADDPOPUP)) {
- OPTIONSDIALOGPAGE odp = {0};
- odp.cbSize = sizeof(odp);
+ OPTIONSDIALOGPAGE odp = { sizeof(odp) };
odp.dwInitParam = (LPARAM)this;
odp.position = 100000000;
odp.hInstance = masMraSettings.hInstance;
diff --git a/protocols/Tlen/src/jabber_opt.cpp b/protocols/Tlen/src/jabber_opt.cpp
index ff6ea7620f..27075b1d03 100644
--- a/protocols/Tlen/src/jabber_opt.cpp
+++ b/protocols/Tlen/src/jabber_opt.cpp
@@ -100,21 +100,6 @@ int TlenOptionsInit(void *ptr, WPARAM wParam, LPARAM lParam)
odp.ptszTab = tabPages[i].tabName;
Options_AddPage(wParam, &odp);
}
-/*
- if (ServiceExists(MS_POPUP_ADDPOPUP)) {
- ZeroMemory(&odp,sizeof(odp));
- odp.cbSize = sizeof(odp);
- odp.position = 100000000;
- odp.hInstance = hInst;
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
- odp.ptszGroup = TranslateT("PopUps");
- odp.ptszTitle = proto->m_tszUserName;
- odp.dwInitParam = (LPARAM)proto;
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS_POPUPS);
- odp.pfnDlgProc = TlenPopupsDlgProc;
- Options_AddPage(wParam, &odp);
- }
-*/
return 0;
}
@@ -592,7 +577,7 @@ static INT_PTR CALLBACK TlenAdvOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam,
static void MailPopupPreview(DWORD colorBack, DWORD colorText, char *title, char *emailInfo, int delay)
{
- POPUPDATAEX ppd;
+ POPUPDATA ppd;
char * lpzContactName;
char * lpzText;
HICON hIcon;
@@ -609,12 +594,12 @@ static void MailPopupPreview(DWORD colorBack, DWORD colorText, char *title, char
ppd.colorText = colorText;
ppd.PluginWindowProc = NULL;
ppd.PluginData=NULL;
- if ( ServiceExists( MS_POPUP_ADDPOPUPEX )) {
+ if ( ServiceExists(MS_POPUP_ADDPOPUP)) {
ppd.iSeconds = delay;
- CallService(MS_POPUP_ADDPOPUPEX, (WPARAM)&ppd, 0);
+ CallService(MS_POPUP_ADDPOPUP, (WPARAM)&ppd, 0);
}
- else if ( ServiceExists( MS_POPUP_ADDPOPUP )) {
+ else if ( ServiceExists(MS_POPUP_ADDPOPUP)) {
CallService(MS_POPUP_ADDPOPUP, (WPARAM)&ppd, 0);
}
}
diff --git a/protocols/Tlen/src/jabber_thread.cpp b/protocols/Tlen/src/jabber_thread.cpp
index 36459ac744..d32bd35a32 100644
--- a/protocols/Tlen/src/jabber_thread.cpp
+++ b/protocols/Tlen/src/jabber_thread.cpp
@@ -1145,41 +1145,23 @@ static void TlenProcessM(XmlNode *node, ThreadData *info)
static void TlenMailPopup(TlenProtocol *proto, char *title, char *emailInfo)
{
- POPUPDATAEX ppd;
- char * lpzContactName;
- char * lpzText;
-
- if (!DBGetContactSettingByte(NULL, proto->m_szModuleName, "MailPopupEnabled", TRUE)) {
+ if ( !ServiceExists(MS_POPUP_ADDPOPUP))
return;
- }
- lpzContactName = title;
- lpzText = emailInfo;
- ZeroMemory(&ppd, sizeof(ppd));
- ppd.lchContact = NULL;
+ if (!DBGetContactSettingByte(NULL, proto->m_szModuleName, "MailPopupEnabled", TRUE))
+ return;
+
+ POPUPDATA ppd = { 0 };
ppd.lchIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_MAIL));
- strcpy(ppd.lpzContactName, lpzContactName);
- strcpy(ppd.lpzText, lpzText);
+ strcpy(ppd.lpzContactName, title);
+ strcpy(ppd.lpzText, emailInfo);
ppd.colorBack = DBGetContactSettingDword(NULL, proto->m_szModuleName, "MailPopupBack", 0);
ppd.colorText = DBGetContactSettingDword(NULL, proto->m_szModuleName, "MailPopupText", 0);
- ppd.PluginWindowProc = NULL;
- ppd.PluginData=NULL;
- if ( ServiceExists( MS_POPUP_ADDPOPUPEX )) {
- BYTE delayMode;
- int delay;
- delayMode = DBGetContactSettingByte(NULL, proto->m_szModuleName, "MailPopupDelayMode", 0);
- delay = 0;
- if (delayMode==1) {
- delay = DBGetContactSettingDword(NULL, proto->m_szModuleName, "MailPopupDelay", 4);
- } else if (delayMode==2) {
- delay = -1;
- }
- ppd.iSeconds = delay;
- CallService(MS_POPUP_ADDPOPUPEX, (WPARAM)&ppd, 0);
-
- }
- else if ( ServiceExists( MS_POPUP_ADDPOPUP )) {
- CallService(MS_POPUP_ADDPOPUP, (WPARAM)&ppd, 0);
- }
+ BYTE delayMode = DBGetContactSettingByte(NULL, proto->m_szModuleName, "MailPopupDelayMode", 0);
+ if (delayMode == 1)
+ ppd.iSeconds = DBGetContactSettingDword(NULL, proto->m_szModuleName, "MailPopupDelay", 4);
+ else if (delayMode == 2)
+ ppd.iSeconds = -1;
+ PUAddPopUp(&ppd);
}
/*
* Incoming e-mail notification
diff --git a/protocols/Xfire/src/tools.cpp b/protocols/Xfire/src/tools.cpp
index c5e6f01e8c..626745d3e9 100644
--- a/protocols/Xfire/src/tools.cpp
+++ b/protocols/Xfire/src/tools.cpp
@@ -91,7 +91,7 @@ int displayPopup(HWND hWnd, LPCSTR lpText, LPCSTR lpCaption, UINT uType,HICON hi
if ((uType&MB_TYPEMASK) == MB_OK)
{
- POPUPDATAEX ppd = {0};
+ POPUPDATA ppd = {0};
if (bIconsNotLoaded)
{
@@ -126,7 +126,7 @@ int displayPopup(HWND hWnd, LPCSTR lpText, LPCSTR lpCaption, UINT uType,HICON hi
if(hicon!=NULL)
ppd.lchIcon=hicon;
- PUAddPopUpEx(&ppd);
+ PUAddPopUp(&ppd);
}
return IDOK;
diff --git a/protocols/Yahoo/src/util.cpp b/protocols/Yahoo/src/util.cpp
index d0c54de4b4..bfbc5e61e8 100644
--- a/protocols/Yahoo/src/util.cpp
+++ b/protocols/Yahoo/src/util.cpp
@@ -246,7 +246,7 @@ int CYahooProto::ShowPopup(const TCHAR* nickname, const TCHAR* msg, const char *
}
else ppd.lchIcon = LoadIconEx("yahoo");
- DebugLog("[MS_POPUP_ADDPOPUPEX] Generating a popup for [%S] %S", nickname, msg);
+ DebugLog("[MS_POPUP_ADDPOPUP] Generating a popup for [%S] %S", nickname, msg);
PUAddPopUpT(&ppd);
return 1;
diff --git a/src/core/stdchat/src/services.cpp b/src/core/stdchat/src/services.cpp
index 0edfd6f0a0..9a65d483ac 100644
--- a/src/core/stdchat/src/services.cpp
+++ b/src/core/stdchat/src/services.cpp
@@ -743,7 +743,7 @@ static INT_PTR Service_GetAddEventPtr(WPARAM wParam, LPARAM lParam)
static int ModuleLoad(WPARAM wParam, LPARAM lParam)
{
- PopUpInstalled = ServiceExists(MS_POPUP_ADDPOPUPEX) != 0;
+ PopUpInstalled = ServiceExists(MS_POPUP_ADDPOPUP);
return 0;
}