summaryrefslogtreecommitdiff
path: root/yapp/services.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'yapp/services.cpp')
-rw-r--r--yapp/services.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/yapp/services.cpp b/yapp/services.cpp
index ff9bb9f..046a104 100644
--- a/yapp/services.cpp
+++ b/yapp/services.cpp
@@ -298,6 +298,19 @@ int ShowMessage(WPARAM wParam, LPARAM lParam) {
return 0;
}
+int ShowMessageW(WPARAM wParam, LPARAM lParam) {
+ if(!DBGetContactSettingByte(0, MODULE, "Enabled", 1)) return 0;
+
+ POPUPDATAW pd = {0};
+ wcscpy(pd.lpwzContactName, lParam == SM_WARNING ? L"Warning" : L"Notification");
+ pd.lchIcon = LoadIcon(0, lParam == SM_WARNING ? IDI_WARNING : IDI_INFORMATION);
+ wcsncpy(pd.lpwzText, (wchar_t *)wParam, MAX_SECONDLINE);
+
+ CallService(MS_POPUP_ADDPOPUPW, (WPARAM)&pd, 0);
+
+ return 0;
+}
+
//=====PopUp/ShowHistory
//extern BOOL CALLBACK DlgProcHistLstOpts(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
int PopUp_ShowHistory(WPARAM wParam, LPARAM lParam)
@@ -329,6 +342,7 @@ void InitServices() {
hService[i++] = CreateServiceFunction(MS_POPUP_QUERY, PopupQuery);
hService[i++] = CreateServiceFunction(MS_POPUP_SHOWMESSAGE, ShowMessage);
+ hService[i++] = CreateServiceFunction(MS_POPUP_SHOWMESSAGE"W", ShowMessageW);
hService[i++] = CreateServiceFunction(MS_POPUP_SHOWHISTORY, PopUp_ShowHistory);
hService[i++] = CreateServiceFunction("PopUp/ToggleEnabled", TogglePopups);