From cb4a46e7fbe62d788e66ed6121c717a2d22a4d7c Mon Sep 17 00:00:00 2001 From: watcherhd Date: Thu, 21 Apr 2011 14:14:52 +0000 Subject: svn.miranda.im is moving to a new home! git-svn-id: http://miranda-plugins.googlecode.com/svn/trunk@7 e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb --- popup/Deprecated/notify_imp.cpp | 296 ++++++++++++++++++++++++++ popup/Deprecated/notify_imp.h | 39 ++++ popup/Deprecated/opt_notify.cpp | 446 ++++++++++++++++++++++++++++++++++++++++ popup/Deprecated/opt_notify.h | 38 ++++ popup/Deprecated/res_notify.h | 36 ++++ popup/Deprecated/res_notify.rc | 135 ++++++++++++ 6 files changed, 990 insertions(+) create mode 100644 popup/Deprecated/notify_imp.cpp create mode 100644 popup/Deprecated/notify_imp.h create mode 100644 popup/Deprecated/opt_notify.cpp create mode 100644 popup/Deprecated/opt_notify.h create mode 100644 popup/Deprecated/res_notify.h create mode 100644 popup/Deprecated/res_notify.rc (limited to 'popup/Deprecated') diff --git a/popup/Deprecated/notify_imp.cpp b/popup/Deprecated/notify_imp.cpp new file mode 100644 index 0000000..071fb5d --- /dev/null +++ b/popup/Deprecated/notify_imp.cpp @@ -0,0 +1,296 @@ +/* +Popup Plus plugin for Miranda IM + +Copyright © 2002 Luca Santarelli, + © 2004-2007 Victor Pavlychko + © 2010 MPK + © 2010 Merlin_de + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*/ + +#include "headers.h" + +static HANDLE hhkShow=0, hhkUpdate=0, hhkRemove=0; + +//static void PopupThread(void *arg); +static INT_PTR Popup2Show(WPARAM wParam, LPARAM lParam); +static INT_PTR Popup2Update(WPARAM wParam, LPARAM lParam); +static INT_PTR Popup2Remove(WPARAM wParam, LPARAM lParam); +static INT_PTR svcPopup2DefaultActions(WPARAM wParam, LPARAM lParam); +static INT_PTR __stdcall PopupNotifyWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); + +void LoadNotifyImp() +{ + hhkShow = HookEvent(ME_NOTIFY_SHOW, (MIRANDAHOOK)Popup2Show); + hhkUpdate = HookEvent(ME_NOTIFY_UPDATE, (MIRANDAHOOK)Popup2Update); + hhkRemove = HookEvent(ME_NOTIFY_REMOVE, (MIRANDAHOOK)Popup2Remove); + + CreateServiceFunction("Popup2/DefaultActions", svcPopup2DefaultActions); + + CreateServiceFunction(MS_POPUP2_SHOW, Popup2Show); + CreateServiceFunction(MS_POPUP2_UPDATE, Popup2Update); + CreateServiceFunction(MS_POPUP2_REMOVE, Popup2Remove); +} + +void UnloadNotifyImp() +{ + UnhookEvent(hhkShow); + UnhookEvent(hhkUpdate); + UnhookEvent(hhkRemove); +} + +static INT_PTR svcPopup2DefaultActions(WPARAM wParam, LPARAM lParam) +{ + HWND hwnd = (HWND)MNotifyGetDWord((HANDLE)lParam, "Popup2/hwnd", (DWORD)NULL); + if (!hwnd) return 0; + + HANDLE hNotify = (HANDLE)PUGetPluginData(hwnd); + if (!hNotify || (hNotify == INVALID_HANDLE_VALUE)) return 0; + + switch (wParam) + { + case 0: + { // send message + if (HANDLE hContact = (HANDLE)MNotifyGetDWord(hNotify, NFOPT_CONTACT, 0)) + CallServiceSync(MS_MSG_SENDMESSAGE, (WPARAM)hContact, 0); + SendMessage(hwnd, UM_DESTROYPOPUP, 0, 0); + break; + } + case 1: + { // dismiss popup + SendMessage(hwnd, UM_DESTROYPOPUP, 0, 0); + break; + } + } + return 0; +} + +static INT_PTR __stdcall PopupNotifyWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) +{ + HANDLE hNotify = (HANDLE)PUGetPluginData(hwnd); + + if (!hNotify || (hNotify == INVALID_HANDLE_VALUE)) + return DefWindowProc(hwnd, msg, wParam, lParam); + + switch (msg) + { + case UM_INITPOPUP: + { + MNotifyAddRef(hNotify); + MNotifySetDWord(hNotify, "Popup2/hwnd", (DWORD)hwnd); + break; + } + case UM_FREEPLUGINDATA: + { + int result = 0; + if (WNDPROC PluginWndProc = (WNDPROC)MNotifyGetDWord(hNotify, NFOPT_POPUP2_WNDPROC, NULL)) + result = PluginWndProc(hwnd, msg, wParam, lParam); + result = DefWindowProc(hwnd, msg, wParam, lParam); + + MNotifySetDWord(hNotify, "Popup2/hwnd", (DWORD)NULL); + MNotifyRelease(hNotify); + + return result; + } + + case WM_LBUTTONDOWN: + { + const char *service = MNotifyGetString(hNotify, NFOPT_POPUP2_LCLICKSVC, "Popup2/DefaultActions"); + DWORD cookie = MNotifyGetDWord(hNotify, NFOPT_POPUP2_LCLICKCOOKIE, 0); + CallService(service, cookie, (LPARAM)hNotify); + break; + } + case WM_RBUTTONDOWN: + { + const char *service = MNotifyGetString(hNotify, NFOPT_POPUP2_LCLICKSVC, "Popup2/DefaultActions"); + DWORD cookie = MNotifyGetDWord(hNotify, NFOPT_POPUP2_LCLICKCOOKIE, 1); + CallService(service, cookie, (LPARAM)hNotify); + break; + } + } + + if (WNDPROC PluginWndProc = (WNDPROC)MNotifyGetDWord(hNotify, NFOPT_POPUP2_WNDPROC, NULL)) + return PluginWndProc(hwnd, msg, wParam, lParam); + + return DefWindowProc(hwnd, msg, wParam, lParam); +} + +static INT_PTR Popup2Show(WPARAM wParam, LPARAM lParam) +{ + if (!gbPopupLoaded) return -1; + + HANDLE hNotify = (HANDLE)lParam; + if (!hNotify) return -1; + + POPUPDATA2 ppd2 = {0}; + ppd2.cbSize = sizeof(ppd2); + ppd2.flags = 0; + ppd2.lchContact = (HANDLE)MNotifyGetDWord(hNotify, NFOPT_CONTACT, NULL);; + ppd2.lchEvent = (HANDLE)MNotifyGetDWord(hNotify, NFOPT_CONTACT, NULL); + ppd2.lchIcon = (HICON)MNotifyGetDWord(hNotify, NFOPT_ICON, (DWORD)LoadSkinnedIcon(SKINICON_OTHER_MIRANDA)); + + if (PopUpOptions.UseWinColors) + { + ppd2.colorBack = GetSysColor(COLOR_BTNFACE); + ppd2.colorText = GetSysColor(COLOR_WINDOWTEXT); + } else + { + ppd2.colorBack = fonts.clBack; + ppd2.colorText = fonts.clText; + } + ppd2.colorBack = (COLORREF)MNotifyGetDWord(hNotify, NFOPT_POPUP2_BACKCOLOR, MNotifyGetDWord(hNotify, NFOPT_BACKCOLOR, ppd2.colorBack)); + ppd2.colorText = (COLORREF)MNotifyGetDWord(hNotify, NFOPT_POPUP2_TEXTCOLOR, MNotifyGetDWord(hNotify, NFOPT_TEXTCOLOR, ppd2.colorText)); + ppd2.PluginWindowProc = (WNDPROC)MNotifyGetDWord(hNotify, NFOPT_POPUP2_WNDPROC, NULL); + ppd2.PluginData = (LPVOID)MNotifyGetDWord(hNotify, NFOPT_POPUP2_PLUGINDATA, NULL); + ppd2.iSeconds = (int)MNotifyGetDWord(hNotify, NFOPT_POPUP2_TIMEOUT, MNotifyGetDWord(hNotify, NFOPT_TIMEOUT, PopUpOptions.Seconds)); + + WCHAR *lpwzTitle, *lpwzText; + char *lpzTitle, *lpzText; + lpwzTitle = (WCHAR *)MNotifyGetWString(hNotify, NFOPT_TITLEW, NULL); + lpzTitle = (char *)MNotifyGetString(hNotify, NFOPT_TITLE, NULL); + lpwzText = (WCHAR *)MNotifyGetWString(hNotify, NFOPT_TEXTW, NULL); + lpzText = (char *)MNotifyGetString(hNotify, NFOPT_TEXT, NULL); + if (lpwzTitle && lpwzText) + { + ppd2.lpwzTitle = lpwzTitle; + ppd2.lpwzText = lpwzText; + ppd2.flags |= PU2_UNICODE; + } else + if (lpzTitle && lpzText) + { + ppd2.lpzTitle = lpzTitle; + ppd2.lpzText = lpzText; + ppd2.flags |= PU2_ANSI; + } else + { + ppd2.lpzText = ppd2.lpzTitle = Translate(""); + ppd2.flags |= PU2_ANSI; + } + + DWORD dwStatusMode = MNotifyGetDWord(hNotify, NFOPT_POPUP2_STATUSMODE, 0x3ff); + + DWORD dwFlags = APF_RETURN_HWND; + switch (PopUpOptions.CurrentStatus) + { + case ID_STATUS_OFFLINE: if (!(dwStatusMode&0x001)) dwFlags |= APF_NO_POPUP; break; + case ID_STATUS_ONLINE: if (!(dwStatusMode&0x002)) dwFlags |= APF_NO_POPUP; break; + case ID_STATUS_AWAY: if (!(dwStatusMode&0x004)) dwFlags |= APF_NO_POPUP; break; + case ID_STATUS_DND: if (!(dwStatusMode&0x008)) dwFlags |= APF_NO_POPUP; break; + case ID_STATUS_NA: if (!(dwStatusMode&0x010)) dwFlags |= APF_NO_POPUP; break; + case ID_STATUS_OCCUPIED: if (!(dwStatusMode&0x020)) dwFlags |= APF_NO_POPUP; break; + case ID_STATUS_FREECHAT: if (!(dwStatusMode&0x040)) dwFlags |= APF_NO_POPUP; break; + case ID_STATUS_INVISIBLE: if (!(dwStatusMode&0x080)) dwFlags |= APF_NO_POPUP; break; + case ID_STATUS_ONTHEPHONE: if (!(dwStatusMode&0x100)) dwFlags |= APF_NO_POPUP; break; + case ID_STATUS_OUTTOLUNCH: if (!(dwStatusMode&0x200)) dwFlags |= APF_NO_POPUP; break; + } + + ppd2.PluginData = hNotify; + ppd2.PluginWindowProc = (WNDPROC)PopupNotifyWndProc; + + return PopUp_AddPopUp2((WPARAM)&ppd2, dwFlags); +} + +static INT_PTR Popup2Update(WPARAM wParam, LPARAM lParam) +{ + if (!gbPopupLoaded) return -1; + + HANDLE hNotify = (HANDLE)lParam; + if (!hNotify) return -1; + + HWND hwnd = (HWND)MNotifyGetDWord(hNotify, "Popup2/hwnd", 0); + if (!hwnd) return -1; + + POPUPDATA2 ppd2 = {0}; + ppd2.cbSize = sizeof(ppd2); + ppd2.flags = 0; + ppd2.lchContact = (HANDLE)MNotifyGetDWord(hNotify, NFOPT_CONTACT, NULL);; + ppd2.lchEvent = (HANDLE)MNotifyGetDWord(hNotify, NFOPT_CONTACT, NULL); + ppd2.lchIcon = (HICON)MNotifyGetDWord(hNotify, NFOPT_ICON, (DWORD)LoadSkinnedIcon(SKINICON_OTHER_MIRANDA)); + + if (PopUpOptions.UseWinColors) + { + ppd2.colorBack = GetSysColor(COLOR_BTNFACE); + ppd2.colorText = GetSysColor(COLOR_WINDOWTEXT); + } else + { + ppd2.colorBack = fonts.clBack; + ppd2.colorText = fonts.clText; + } + ppd2.colorBack = (COLORREF)MNotifyGetDWord(hNotify, NFOPT_POPUP2_BACKCOLOR, MNotifyGetDWord(hNotify, NFOPT_BACKCOLOR, ppd2.colorBack)); + ppd2.colorText = (COLORREF)MNotifyGetDWord(hNotify, NFOPT_POPUP2_TEXTCOLOR, MNotifyGetDWord(hNotify, NFOPT_TEXTCOLOR, ppd2.colorText)); + ppd2.PluginWindowProc = (WNDPROC)MNotifyGetDWord(hNotify, NFOPT_POPUP2_WNDPROC, NULL); + ppd2.PluginData = (LPVOID)MNotifyGetDWord(hNotify, NFOPT_POPUP2_PLUGINDATA, NULL); + ppd2.iSeconds = (int)MNotifyGetDWord(hNotify, NFOPT_POPUP2_TIMEOUT, MNotifyGetDWord(hNotify, NFOPT_TIMEOUT, PopUpOptions.Seconds)); + + WCHAR *lpwzTitle, *lpwzText; + char *lpzTitle, *lpzText; + lpwzTitle = (WCHAR *)MNotifyGetWString(hNotify, NFOPT_TITLEW, NULL); + lpzTitle = (char *)MNotifyGetString(hNotify, NFOPT_TITLE, NULL); + lpwzText = (WCHAR *)MNotifyGetWString(hNotify, NFOPT_TEXTW, NULL); + lpzText = (char *)MNotifyGetString(hNotify, NFOPT_TEXT, NULL); + if (lpwzTitle && lpwzText) + { + ppd2.lpwzTitle = lpwzTitle; + ppd2.lpwzText = lpwzText; + ppd2.flags |= PU2_UNICODE; + } else + if (lpzTitle && lpzText) + { + ppd2.lpzTitle = lpzTitle; + ppd2.lpzText = lpzText; + ppd2.flags |= PU2_ANSI; + } else + { + ppd2.lpzText = ppd2.lpzTitle = Translate(""); + ppd2.flags |= PU2_ANSI; + } + + DWORD dwStatusMode = MNotifyGetDWord(hNotify, NFOPT_POPUP2_STATUSMODE, 0x3ff); + + DWORD dwFlags = 0; + switch (PopUpOptions.CurrentStatus) + { + case ID_STATUS_OFFLINE: if (!(dwStatusMode&0x001)) dwFlags |= APF_NO_POPUP; break; + case ID_STATUS_ONLINE: if (!(dwStatusMode&0x002)) dwFlags |= APF_NO_POPUP; break; + case ID_STATUS_AWAY: if (!(dwStatusMode&0x004)) dwFlags |= APF_NO_POPUP; break; + case ID_STATUS_DND: if (!(dwStatusMode&0x008)) dwFlags |= APF_NO_POPUP; break; + case ID_STATUS_NA: if (!(dwStatusMode&0x010)) dwFlags |= APF_NO_POPUP; break; + case ID_STATUS_OCCUPIED: if (!(dwStatusMode&0x020)) dwFlags |= APF_NO_POPUP; break; + case ID_STATUS_FREECHAT: if (!(dwStatusMode&0x040)) dwFlags |= APF_NO_POPUP; break; + case ID_STATUS_INVISIBLE: if (!(dwStatusMode&0x080)) dwFlags |= APF_NO_POPUP; break; + case ID_STATUS_ONTHEPHONE: if (!(dwStatusMode&0x100)) dwFlags |= APF_NO_POPUP; break; + case ID_STATUS_OUTTOLUNCH: if (!(dwStatusMode&0x200)) dwFlags |= APF_NO_POPUP; break; + } + + ppd2.PluginData = hNotify; + ppd2.PluginWindowProc = (WNDPROC)PopupNotifyWndProc; + + return PopUp_Change2((WPARAM)hwnd, (LPARAM)&ppd2); +} + +static INT_PTR Popup2Remove(WPARAM wParam, LPARAM lParam) +{ + if (!gbPopupLoaded) return -1; + + HANDLE hNotify = (HANDLE)lParam; + if (!hNotify) return -1; + + HWND hwnd = (HWND)MNotifyGetDWord(hNotify, "Popup2/hwnd", 0); + if (!hwnd) return -1; + + SendMessage(hwnd, UM_DESTROYPOPUP, 0, 0); + return 0; +} diff --git a/popup/Deprecated/notify_imp.h b/popup/Deprecated/notify_imp.h new file mode 100644 index 0000000..b7463cd --- /dev/null +++ b/popup/Deprecated/notify_imp.h @@ -0,0 +1,39 @@ +/* +Popup Plus plugin for Miranda IM + +Copyright © 2002 Luca Santarelli, + © 2004-2007 Victor Pavlychko + © 2010 MPK + © 2010 Merlin_de + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +=============================================================================== + +File name : $HeadURL: http://svn.miranda.im/mainrepo/popup/trunk/Deprecated/notify_imp.h $ +Revision : $Revision: 1615 $ +Last change on : $Date: 2010-06-23 01:47:57 +0300 (Ср, 23 июн 2010) $ +Last change by : $Author: Merlin_de $ + +=============================================================================== +*/ + +#ifndef __notify_imp_h__ +#define __notify_imp_h__ + +void LoadNotifyImp(); +void UnloadNotifyImp(); + +#endif // __notify_imp_h__ diff --git a/popup/Deprecated/opt_notify.cpp b/popup/Deprecated/opt_notify.cpp new file mode 100644 index 0000000..e54f2de --- /dev/null +++ b/popup/Deprecated/opt_notify.cpp @@ -0,0 +1,446 @@ +/* +Popup Plus plugin for Miranda IM + +Copyright © 2002 Luca Santarelli, + © 2004-2007 Victor Pavlychko + © 2010 MPK + © 2010 Merlin_de + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +=============================================================================== + +File name : $HeadURL: http://svn.miranda.im/mainrepo/popup/trunk/Deprecated/opt_notify.cpp $ +Revision : $Revision: 1615 $ +Last change on : $Date: 2010-06-23 01:47:57 +0300 (Ср, 23 июн 2010) $ +Last change by : $Author: Merlin_de $ + +=============================================================================== +*/ + +#include "headers.h" + +INT_PTR CALLBACK DlgProcPopUps(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) +{ + HANDLE hNotify = (HANDLE)GetWindowLongPtr(hwnd, GWLP_USERDATA); + switch (msg) + { + case WM_INITDIALOG: + { + SendDlgItemMessage(hwnd, IDC_SALL, BUTTONSETASFLATBTN, 0, 0); + SendDlgItemMessage(hwnd, IDC_SALL, BUTTONSETASPUSHBTN, 0, 0); + SendDlgItemMessage(hwnd, IDC_SALL, BM_SETIMAGE, IMAGE_ICON, (LPARAM)IcoLib_GetIcon(ICO_POPUP_ON,0)); + + SendDlgItemMessage(hwnd, IDC_SOFFLINE, BUTTONSETASFLATBTN, 0, 0); + SendDlgItemMessage(hwnd, IDC_SOFFLINE, BUTTONSETASPUSHBTN, 0, 0); + SendDlgItemMessage(hwnd, IDC_SOFFLINE, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadSkinnedIcon(SKINICON_STATUS_OFFLINE)); + + SendDlgItemMessage(hwnd, IDC_SONLINE, BUTTONSETASFLATBTN, 0, 0); + SendDlgItemMessage(hwnd, IDC_SONLINE, BUTTONSETASPUSHBTN, 0, 0); + SendDlgItemMessage(hwnd, IDC_SONLINE, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadSkinnedIcon(SKINICON_STATUS_ONLINE)); + + SendDlgItemMessage(hwnd, IDC_SAWAY, BUTTONSETASFLATBTN, 0, 0); + SendDlgItemMessage(hwnd, IDC_SAWAY, BUTTONSETASPUSHBTN, 0, 0); + SendDlgItemMessage(hwnd, IDC_SAWAY, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadSkinnedIcon(SKINICON_STATUS_AWAY)); + + SendDlgItemMessage(hwnd, IDC_SNA, BUTTONSETASFLATBTN, 0, 0); + SendDlgItemMessage(hwnd, IDC_SNA, BUTTONSETASPUSHBTN, 0, 0); + SendDlgItemMessage(hwnd, IDC_SNA, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadSkinnedIcon(SKINICON_STATUS_NA)); + + SendDlgItemMessage(hwnd, IDC_SOCCUPIED, BUTTONSETASFLATBTN, 0, 0); + SendDlgItemMessage(hwnd, IDC_SOCCUPIED, BUTTONSETASPUSHBTN, 0, 0); + SendDlgItemMessage(hwnd, IDC_SOCCUPIED, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadSkinnedIcon(SKINICON_STATUS_OCCUPIED)); + + SendDlgItemMessage(hwnd, IDC_SDND, BUTTONSETASFLATBTN, 0, 0); + SendDlgItemMessage(hwnd, IDC_SDND, BUTTONSETASPUSHBTN, 0, 0); + SendDlgItemMessage(hwnd, IDC_SDND, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadSkinnedIcon(SKINICON_STATUS_DND)); + + SendDlgItemMessage(hwnd, IDC_SFREE4CHAT, BUTTONSETASFLATBTN, 0, 0); + SendDlgItemMessage(hwnd, IDC_SFREE4CHAT, BUTTONSETASPUSHBTN, 0, 0); + SendDlgItemMessage(hwnd, IDC_SFREE4CHAT, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadSkinnedIcon(SKINICON_STATUS_FREE4CHAT)); + + SendDlgItemMessage(hwnd, IDC_SINVISIBLE, BUTTONSETASFLATBTN, 0, 0); + SendDlgItemMessage(hwnd, IDC_SINVISIBLE, BUTTONSETASPUSHBTN, 0, 0); + SendDlgItemMessage(hwnd, IDC_SINVISIBLE, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadSkinnedIcon(SKINICON_STATUS_INVISIBLE)); + + SendDlgItemMessage(hwnd, IDC_SPHONE, BUTTONSETASFLATBTN, 0, 0); + SendDlgItemMessage(hwnd, IDC_SPHONE, BUTTONSETASPUSHBTN, 0, 0); + SendDlgItemMessage(hwnd, IDC_SPHONE, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadSkinnedIcon(SKINICON_STATUS_ONTHEPHONE)); + + SendDlgItemMessage(hwnd, IDC_SLUNCH, BUTTONSETASFLATBTN, 0, 0); + SendDlgItemMessage(hwnd, IDC_SLUNCH, BUTTONSETASPUSHBTN, 0, 0); + SendDlgItemMessage(hwnd, IDC_SLUNCH, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadSkinnedIcon(SKINICON_STATUS_OUTTOLUNCH)); + + return TRUE; + } + + case UM_MNOTIFY_CHECK: + { + if (wParam != 1) + { + SetWindowLong(hwnd, DWLP_MSGRESULT, FALSE); + return 0; + } + + hNotify = *(HANDLE *)lParam; + SetWindowLongPtr(hwnd, GWLP_USERDATA, (LONG_PTR)hNotify); + + EnableWindow(GetDlgItem(hwnd, IDC_TIMEOUT), lParam); + EnableWindow(GetDlgItem(hwnd, IDC_USEBACKCOLOR), lParam); + EnableWindow(GetDlgItem(hwnd, IDC_USETEXTCOLOR), lParam); + EnableWindow(GetDlgItem(hwnd, IDC_USETIMEOUT), lParam); + EnableWindow(GetDlgItem(hwnd, IDC_LACTION), lParam); + EnableWindow(GetDlgItem(hwnd, IDC_RACTION), lParam); + EnableWindow(GetDlgItem(hwnd, IDC_SALL), lParam); + EnableWindow(GetDlgItem(hwnd, IDC_SONLINE), lParam); + EnableWindow(GetDlgItem(hwnd, IDC_SOFFLINE), lParam); + EnableWindow(GetDlgItem(hwnd, IDC_SAWAY), lParam); + EnableWindow(GetDlgItem(hwnd, IDC_SNA), lParam); + EnableWindow(GetDlgItem(hwnd, IDC_SOCCUPIED), lParam); + EnableWindow(GetDlgItem(hwnd, IDC_SDND), lParam); + EnableWindow(GetDlgItem(hwnd, IDC_SFREE4CHAT), lParam); + EnableWindow(GetDlgItem(hwnd, IDC_SINVISIBLE), lParam); + EnableWindow(GetDlgItem(hwnd, IDC_SPHONE), lParam); + EnableWindow(GetDlgItem(hwnd, IDC_SLUNCH), lParam); + EnableWindow(GetDlgItem(hwnd, IDC_PREVIEW), lParam); + + DWORD dwStatusMode = MNotifyGetDWord(hNotify, NFOPT_POPUP2_STATUSMODE, 0x03ff); + CheckDlgButton(hwnd, IDC_SALL, dwStatusMode==0x3ff ? TRUE : FALSE); + CheckDlgButton(hwnd, IDC_SOFFLINE, dwStatusMode & 0x001 ? TRUE : FALSE); + CheckDlgButton(hwnd, IDC_SONLINE, dwStatusMode & 0x002 ? TRUE : FALSE); + CheckDlgButton(hwnd, IDC_SAWAY, dwStatusMode & 0x004 ? TRUE : FALSE); + CheckDlgButton(hwnd, IDC_SNA, dwStatusMode & 0x008 ? TRUE : FALSE); + CheckDlgButton(hwnd, IDC_SOCCUPIED, dwStatusMode & 0x010 ? TRUE : FALSE); + CheckDlgButton(hwnd, IDC_SDND, dwStatusMode & 0x020 ? TRUE : FALSE); + CheckDlgButton(hwnd, IDC_SFREE4CHAT, dwStatusMode & 0x040 ? TRUE : FALSE); + CheckDlgButton(hwnd, IDC_SINVISIBLE, dwStatusMode & 0x080 ? TRUE : FALSE); + CheckDlgButton(hwnd, IDC_SPHONE, dwStatusMode & 0x100 ? TRUE : FALSE); + CheckDlgButton(hwnd, IDC_SLUNCH, dwStatusMode & 0x200 ? TRUE : FALSE); + + COLORREF cl; + if ((cl = (COLORREF)MNotifyGetDWord(hNotify, NFOPT_POPUP2_BACKCOLOR, MNotifyGetDWord(hNotify, NFOPT_BACKCOLOR, 0))) != (COLORREF)-1) + { + CheckDlgButton(hwnd, IDC_USEBACKCOLOR, BST_UNCHECKED); + SendDlgItemMessage(hwnd, IDC_BACKCOLOR, CPM_SETCOLOUR, 0, (LPARAM)cl); + EnableWindow(GetDlgItem(hwnd, IDC_BACKCOLOR), TRUE); + } else + { + CheckDlgButton(hwnd, IDC_USEBACKCOLOR, BST_CHECKED); + SendDlgItemMessage(hwnd, IDC_BACKCOLOR, CPM_SETCOLOUR, 0, (LPARAM)cl); + EnableWindow(GetDlgItem(hwnd, IDC_BACKCOLOR), FALSE); + } + if ((cl = (COLORREF)MNotifyGetDWord(hNotify, NFOPT_POPUP2_TEXTCOLOR, MNotifyGetDWord(hNotify, NFOPT_TEXTCOLOR, 0))) != (COLORREF)-1) + { + CheckDlgButton(hwnd, IDC_USETEXTCOLOR, BST_UNCHECKED); + SendDlgItemMessage(hwnd, IDC_TEXTCOLOR, CPM_SETCOLOUR, 0, (LPARAM)cl); + EnableWindow(GetDlgItem(hwnd, IDC_TEXTCOLOR), TRUE); + } else + { + CheckDlgButton(hwnd, IDC_USETEXTCOLOR, BST_CHECKED); + SendDlgItemMessage(hwnd, IDC_TEXTCOLOR, CPM_SETCOLOUR, 0, (LPARAM)cl); + EnableWindow(GetDlgItem(hwnd, IDC_TEXTCOLOR), FALSE); + } + + HWND hwndCombo = GetDlgItem(hwnd, IDC_TIMEOUT); + ComboBox_ResetContent(hwndCombo); + ComboBox_SetItemData(hwndCombo, ComboBox_AddString(hwndCombo, "Default"), 0); + ComboBox_SetItemData(hwndCombo, ComboBox_AddString(hwndCombo, "1 second"), 1); + ComboBox_SetItemData(hwndCombo, ComboBox_AddString(hwndCombo, "2 seconds"), 2); + ComboBox_SetItemData(hwndCombo, ComboBox_AddString(hwndCombo, "3 seconds"), 3); + ComboBox_SetItemData(hwndCombo, ComboBox_AddString(hwndCombo, "4 seconds"), 4); + ComboBox_SetItemData(hwndCombo, ComboBox_AddString(hwndCombo, "5 seconds"), 5); + ComboBox_SetItemData(hwndCombo, ComboBox_AddString(hwndCombo, "7 seconds"), 7); + ComboBox_SetItemData(hwndCombo, ComboBox_AddString(hwndCombo, "10 seconds"), 10); + ComboBox_SetItemData(hwndCombo, ComboBox_AddString(hwndCombo, "15 seconds"), 15); + ComboBox_SetItemData(hwndCombo, ComboBox_AddString(hwndCombo, "Infinite"), -1); + + int timeout = (int)MNotifyGetDWord(hNotify, NFOPT_POPUP2_TIMEOUT, MNotifyGetDWord(hNotify, NFOPT_TIMEOUT, 0)); +// if (!timeout) +// { +// CheckDlgButton(hwnd, IDC_USETIMEOUT, BST_CHECKED); +// EnableWindow(GetDlgItem(hwnd, IDC_TIMEOUT), FALSE); +// } else + if (timeout < 0) + { + SetDlgItemText(hwnd, IDC_TIMEOUT, "Infinite"); + } else + { + switch (timeout) + { + case 0: SetDlgItemText(hwnd, IDC_TIMEOUT, "Default"); break; + case 1: SetDlgItemText(hwnd, IDC_TIMEOUT, "1 second"); break; + case 2: SetDlgItemText(hwnd, IDC_TIMEOUT, "2 seconds"); break; + case 3: SetDlgItemText(hwnd, IDC_TIMEOUT, "3 seconds"); break; + case 4: SetDlgItemText(hwnd, IDC_TIMEOUT, "4 seconds"); break; + case 5: SetDlgItemText(hwnd, IDC_TIMEOUT, "5 seconds"); break; + case 7: SetDlgItemText(hwnd, IDC_TIMEOUT, "7 seconds"); break; + case 10: SetDlgItemText(hwnd, IDC_TIMEOUT, "10 seconds"); break; + case 15: SetDlgItemText(hwnd, IDC_TIMEOUT, "15 seconds"); break; + default: SetDlgItemInt(hwnd, IDC_TIMEOUT, timeout, TRUE); + } + } + + const char *svcLAction = MNotifyGetString(hNotify, NFOPT_POPUP2_LCLICKSVC, "Popup2/DefaultActions"); + DWORD cookieLAction = MNotifyGetDWord(hNotify, NFOPT_POPUP2_LCLICKCOOKIE, (DWORD)-1); + const char *svcRAction = MNotifyGetString(hNotify, NFOPT_POPUP2_RCLICKSVC, "Popup2/DefaultActions"); + DWORD cookieRAction = MNotifyGetDWord(hNotify, NFOPT_POPUP2_RCLICKCOOKIE, (DWORD)-1); + + int idItem, idRAction=0, idLAction=0; + int nActions = MNotifyGetActions(hNotify, 0); + HWND hwndLCombo = GetDlgItem(hwnd, IDC_LACTION); + HWND hwndRCombo = GetDlgItem(hwnd, IDC_RACTION); + ComboBox_ResetContent(hwndLCombo); + ComboBox_ResetContent(hwndRCombo); + ComboBox_SetItemData(hwndLCombo, ComboBox_AddString(hwndLCombo, "Basic Actions:"), -4); + ComboBox_SetItemData(hwndRCombo, ComboBox_AddString(hwndRCombo, "Basic Actions:"), -4); + ComboBox_SetItemData(hwndLCombo, idItem = ComboBox_AddString(hwndLCombo, " Send Message"), -1); + if (!idLAction && !strcmp(svcLAction, "Popup2/DefaultActions") && cookieLAction==0) idLAction=idItem; + ComboBox_SetItemData(hwndRCombo, idItem = ComboBox_AddString(hwndRCombo, " Send Message"), -1); + if (!idRAction && !strcmp(svcRAction, "Popup2/DefaultActions") && cookieRAction==0) idRAction=idItem; + ComboBox_SetItemData(hwndLCombo, idItem = ComboBox_AddString(hwndLCombo, " Dismiss Popup"), -2); + if (!idLAction && !strcmp(svcLAction, "Popup2/DefaultActions") && cookieLAction==1) idLAction=idItem; + ComboBox_SetItemData(hwndRCombo, idItem = ComboBox_AddString(hwndRCombo, " Dismiss Popup"), -2); + if (!idRAction && !strcmp(svcRAction, "Popup2/DefaultActions") && cookieRAction==1) idRAction=idItem; + ComboBox_SetItemData(hwndLCombo, idItem = ComboBox_AddString(hwndLCombo, " Do Nothing"), -3); + if (!idLAction && !strcmp(svcLAction, "Popup2/DefaultActions") && cookieLAction==2) idLAction=idItem; + ComboBox_SetItemData(hwndRCombo, idItem = ComboBox_AddString(hwndRCombo, " Do Nothing"), -3); + if (!idRAction && !strcmp(svcRAction, "Popup2/DefaultActions") && cookieRAction==2) idRAction=idItem; + if (nActions) + { + MNOTIFYACTIONINFO *actions = new MNOTIFYACTIONINFO[nActions]; + MNotifyGetActions(hNotify, actions); + ComboBox_SetItemData(hwndLCombo, ComboBox_AddString(hwndLCombo, "Advanced Actions:"), -3); + ComboBox_SetItemData(hwndRCombo, ComboBox_AddString(hwndRCombo, "Advanced Actions:"), -3); + for (int i = 0; i < nActions; i++) + { + char buf[64]; + wsprintf(buf, " %64s", actions[i].name); + ComboBox_SetItemData(hwndLCombo, idItem = ComboBox_AddString(hwndLCombo, buf), i); + if (!idLAction && !strcmp(svcLAction, actions[i].service) && cookieLAction==actions[i].cookie) idLAction=idItem; + ComboBox_SetItemData(hwndRCombo, idItem = ComboBox_AddString(hwndRCombo, buf), i); + if (!idRAction && !strcmp(svcRAction, actions[i].service) && cookieRAction==actions[i].cookie) idRAction=idItem; + } + delete [] actions; + } + ComboBox_SetCurSel(hwndLCombo, idLAction?idLAction:1); + ComboBox_SetCurSel(hwndRCombo, idRAction?idRAction:2); + + SetWindowLongPtr(hwnd, DWLP_MSGRESULT, TRUE); + return TRUE; + } + + case WM_COMMAND: + switch (LOWORD(wParam)) + { + case IDC_PREVIEW: + { + HANDLE hNotifyObj = MNotifyCreate(hNotify); + MNotifySetString(hNotifyObj, NFOPT_TITLE, "Popup2"); + MNotifySetString(hNotifyObj, NFOPT_TEXT, "The new preview :)"); + MPopup2Show(hNotifyObj); + break; + } + case IDC_USEBACKCOLOR: + { + if (IsDlgButtonChecked(hwnd, IDC_USEBACKCOLOR)) + { + MNotifySetDWord(hNotify, NFOPT_POPUP2_BACKCOLOR"/Save", + MNotifyGetDWord(hNotify, NFOPT_POPUP2_BACKCOLOR, 0)); + MNotifySetDWord(hNotify, NFOPT_POPUP2_BACKCOLOR, (DWORD)-1); + EnableWindow(GetDlgItem(hwnd, IDC_BACKCOLOR), FALSE); + } else + { + COLORREF cl = (COLORREF)MNotifyGetDWord(hNotify, NFOPT_POPUP2_BACKCOLOR"/Save", 0); + MNotifySetDWord(hNotify, NFOPT_POPUP2_BACKCOLOR, (DWORD)cl); + SendDlgItemMessage(hwnd, IDC_BACKCOLOR, CPM_SETCOLOUR, 0, (LPARAM)cl); + EnableWindow(GetDlgItem(hwnd, IDC_BACKCOLOR), TRUE); + } + SendMessage(GetParent(GetParent(hwnd)), PSM_CHANGED, 0, 0); + break; + } + case IDC_USETEXTCOLOR: + { + if (IsDlgButtonChecked(hwnd, IDC_USETEXTCOLOR)) + { + MNotifySetDWord(hNotify, NFOPT_POPUP2_TEXTCOLOR"/Save", + MNotifyGetDWord(hNotify, NFOPT_POPUP2_TEXTCOLOR, 0)); + MNotifySetDWord(hNotify, NFOPT_POPUP2_TEXTCOLOR, (DWORD)-1); + EnableWindow(GetDlgItem(hwnd, IDC_TEXTCOLOR), FALSE); + } else + { + COLORREF cl = (COLORREF)MNotifyGetDWord(hNotify, NFOPT_POPUP2_TEXTCOLOR"/Save", 0); + MNotifySetDWord(hNotify, NFOPT_POPUP2_TEXTCOLOR, (DWORD)cl); + SendDlgItemMessage(hwnd, IDC_TEXTCOLOR, CPM_SETCOLOUR, 0, (LPARAM)cl); + EnableWindow(GetDlgItem(hwnd, IDC_TEXTCOLOR), TRUE); + } + SendMessage(GetParent(GetParent(hwnd)), PSM_CHANGED, 0, 0); + break; + }; + case IDC_BACKCOLOR: + case IDC_TEXTCOLOR: + { + if (HIWORD(wParam) == CPN_COLOURCHANGED) + { + MNotifySetDWord(hNotify, NFOPT_POPUP2_BACKCOLOR, (DWORD)SendDlgItemMessage(hwnd,IDC_BACKCOLOR, CPM_GETCOLOUR, 0, 0)); + MNotifySetDWord(hNotify, NFOPT_POPUP2_TEXTCOLOR, (DWORD)SendDlgItemMessage(hwnd,IDC_TEXTCOLOR, CPM_GETCOLOUR, 0, 0)); + SendMessage(GetParent(GetParent(hwnd)), PSM_CHANGED, 0, 0); + } + break; + } + case IDC_TIMEOUT: + { + int timeout=-2; + int idItem; + if ((idItem = ComboBox_GetCurSel(GetDlgItem(hwnd, IDC_TIMEOUT))) != CB_ERR) + { + timeout = (int)ComboBox_GetItemData(GetDlgItem(hwnd, IDC_TIMEOUT), idItem); + } else + { + char buf[64]; + ComboBox_GetText(GetDlgItem(hwnd, IDC_TIMEOUT), buf, 64); + if (*buf >= '0' && *buf <= '9') + timeout = atoi(buf); + } + if (timeout>-2) + { + MNotifySetDWord(hNotify, NFOPT_POPUP2_TIMEOUT, (DWORD)timeout); + SendMessage(GetParent(GetParent(hwnd)), PSM_CHANGED, 0, 0); + } else + { + timeout = (int)MNotifyGetDWord(hNotify, NFOPT_POPUP2_TIMEOUT, 0); + if (timeout < 0) SetDlgItemText(hwnd, IDC_TIMEOUT, "Infinite"); + else + { + switch (timeout) + { + case 0: SetDlgItemText(hwnd, IDC_TIMEOUT, "Default"); break; + case 1: SetDlgItemText(hwnd, IDC_TIMEOUT, "1 second"); break; + case 2: SetDlgItemText(hwnd, IDC_TIMEOUT, "2 seconds"); break; + case 3: SetDlgItemText(hwnd, IDC_TIMEOUT, "3 seconds"); break; + case 4: SetDlgItemText(hwnd, IDC_TIMEOUT, "4 seconds"); break; + case 5: SetDlgItemText(hwnd, IDC_TIMEOUT, "5 seconds"); break; + case 7: SetDlgItemText(hwnd, IDC_TIMEOUT, "7 seconds"); break; + case 10: SetDlgItemText(hwnd, IDC_TIMEOUT, "10 seconds"); break; + case 15: SetDlgItemText(hwnd, IDC_TIMEOUT, "15 seconds"); break; + default: SetDlgItemInt(hwnd, IDC_TIMEOUT, timeout, TRUE); + } + } + } + break; + } + case IDC_LACTION: + case IDC_RACTION: + { + int idCtrl = LOWORD(wParam); + HWND hwndCombo = GetDlgItem(hwnd, idCtrl); + int idItem; + if ((idItem = ComboBox_GetCurSel(hwndCombo)) == CB_ERR) + break; + + char *svc=0; DWORD cookie=0; + MNOTIFYACTIONINFO *actions=0; + int idAction = (int)ComboBox_GetItemData(hwndCombo, idItem); + if (idAction == -1) + { // message + svc = "Popup2/DefaultActions"; + cookie = 0; + } else + if (idAction == -2) + { // dismiss + svc = "Popup2/DefaultActions"; + cookie = 1; + } else + if (idAction == -3) + { // do nothing + svc = "Popup2/DefaultActions"; + cookie = 2; + } else + if (idAction >= 0) + { + int nActions = MNotifyGetActions(hNotify, 0); + if (nActions) + { + actions = new MNOTIFYACTIONINFO[nActions]; + MNotifyGetActions(hNotify, actions); + svc = actions[idAction].service; + cookie = actions[idAction].cookie; + } + } else + { // do nothing + ComboBox_SetCurSel(hwndCombo, 3); + } + + if (svc) + { + MNotifySetString(hNotify, + idCtrl==IDC_LACTION ? NFOPT_POPUP2_LCLICKSVC : NFOPT_POPUP2_RCLICKSVC, + svc); + MNotifySetDWord(hNotify, + idCtrl==IDC_LACTION ? NFOPT_POPUP2_LCLICKCOOKIE : NFOPT_POPUP2_RCLICKCOOKIE, + cookie); + SendMessage(GetParent(GetParent(hwnd)), PSM_CHANGED, 0, 0); + } + if (actions) delete [] actions; + break; + } + case IDC_SALL: + { + DWORD dwStatusMode = IsDlgButtonChecked(hwnd, IDC_SALL) ? 0x3ff : 0; + CheckDlgButton(hwnd, IDC_SOFFLINE, dwStatusMode & 0x001 ? TRUE : FALSE); + CheckDlgButton(hwnd, IDC_SONLINE, dwStatusMode & 0x002 ? TRUE : FALSE); + CheckDlgButton(hwnd, IDC_SAWAY, dwStatusMode & 0x004 ? TRUE : FALSE); + CheckDlgButton(hwnd, IDC_SNA, dwStatusMode & 0x008 ? TRUE : FALSE); + CheckDlgButton(hwnd, IDC_SOCCUPIED, dwStatusMode & 0x010 ? TRUE : FALSE); + CheckDlgButton(hwnd, IDC_SDND, dwStatusMode & 0x020 ? TRUE : FALSE); + CheckDlgButton(hwnd, IDC_SFREE4CHAT, dwStatusMode & 0x040 ? TRUE : FALSE); + CheckDlgButton(hwnd, IDC_SINVISIBLE, dwStatusMode & 0x080 ? TRUE : FALSE); + CheckDlgButton(hwnd, IDC_SPHONE, dwStatusMode & 0x100 ? TRUE : FALSE); + CheckDlgButton(hwnd, IDC_SLUNCH, dwStatusMode & 0x200 ? TRUE : FALSE); + MNotifySetDWord(hNotify, NFOPT_POPUP2_STATUSMODE, dwStatusMode); + SendMessage(GetParent(GetParent(hwnd)), PSM_CHANGED, 0, 0); + break; + } + case IDC_SOFFLINE: + case IDC_SONLINE: + case IDC_SAWAY: + case IDC_SNA: + case IDC_SOCCUPIED: + case IDC_SDND: + case IDC_SFREE4CHAT: + case IDC_SINVISIBLE: + case IDC_SPHONE: + case IDC_SLUNCH: + { + DWORD dwStatusMode=0; // = MNotifyGetDWord(hNotify, NFOPT_POPUP2_STATUSMODE, 0x03ff); + if (IsDlgButtonChecked(hwnd, IDC_SOFFLINE)) dwStatusMode |= 0x001; + if (IsDlgButtonChecked(hwnd, IDC_SONLINE)) dwStatusMode |= 0x002; + if (IsDlgButtonChecked(hwnd, IDC_SAWAY)) dwStatusMode |= 0x004; + if (IsDlgButtonChecked(hwnd, IDC_SNA)) dwStatusMode |= 0x008; + if (IsDlgButtonChecked(hwnd, IDC_SOCCUPIED)) dwStatusMode |= 0x010; + if (IsDlgButtonChecked(hwnd, IDC_SDND)) dwStatusMode |= 0x020; + if (IsDlgButtonChecked(hwnd, IDC_SFREE4CHAT)) dwStatusMode |= 0x040; + if (IsDlgButtonChecked(hwnd, IDC_SINVISIBLE)) dwStatusMode |= 0x080; + if (IsDlgButtonChecked(hwnd, IDC_SPHONE)) dwStatusMode |= 0x100; + if (IsDlgButtonChecked(hwnd, IDC_SLUNCH)) dwStatusMode |= 0x200; + CheckDlgButton(hwnd, IDC_SALL, dwStatusMode==0x3ff ? TRUE : FALSE); + MNotifySetDWord(hNotify, NFOPT_POPUP2_STATUSMODE, dwStatusMode); + SendMessage(GetParent(GetParent(hwnd)), PSM_CHANGED, 0, 0); + break; + } + } + break; + } + return FALSE; +} diff --git a/popup/Deprecated/opt_notify.h b/popup/Deprecated/opt_notify.h new file mode 100644 index 0000000..2b36183 --- /dev/null +++ b/popup/Deprecated/opt_notify.h @@ -0,0 +1,38 @@ +/* +Popup Plus plugin for Miranda IM + +Copyright © 2002 Luca Santarelli, + © 2004-2007 Victor Pavlychko + © 2010 MPK + © 2010 Merlin_de + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +=============================================================================== + +File name : $HeadURL: http://svn.miranda.im/mainrepo/popup/trunk/Deprecated/opt_notify.h $ +Revision : $Revision: 1615 $ +Last change on : $Date: 2010-06-23 01:47:57 +0300 (Ср, 23 июн 2010) $ +Last change by : $Author: Merlin_de $ + +=============================================================================== +*/ + +#ifndef __opt_notify_h__ +#define __opt_notify_h__ + +INT_PTR CALLBACK DlgProcPopUps(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam); + +#endif // __opt_notify_h__ diff --git a/popup/Deprecated/res_notify.h b/popup/Deprecated/res_notify.h new file mode 100644 index 0000000..bcd3b77 --- /dev/null +++ b/popup/Deprecated/res_notify.h @@ -0,0 +1,36 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by resource.rc +// +#define IDD_OPT_POPUPS 171 +#define IDC_PREVIEW 1033 +#define IDC_USEBACKCOLOR 1091 +#define IDC_USETEXTCOLOR 1092 +#define IDC_USETIMEOUT 1094 +#define IDC_LACTION 1096 +#define IDC_RACTION 1097 +#define IDC_SOFFLINE 1099 +#define IDC_SONLINE 1100 +#define IDC_SAWAY 1101 +#define IDC_SNA 1102 +#define IDC_SOCCUPIED 1103 +#define IDC_SDND 1104 +#define IDC_SFREE4CHAT 1105 +#define IDC_SINVISIBLE 1106 +#define IDC_SPHONE 1107 +#define IDC_SLUNCH 1108 +#define IDC_SALL 1109 +#define IDC_TIMEOUT 1110 +#define IDC_BACKCOLOR 1111 +#define IDC_TEXTCOLOR 1112 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 224 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1218 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/popup/Deprecated/res_notify.rc b/popup/Deprecated/res_notify.rc new file mode 100644 index 0000000..d2f3e50 --- /dev/null +++ b/popup/Deprecated/res_notify.rc @@ -0,0 +1,135 @@ +// Microsoft Visual C++ generated resource script. +// +#include "res_notify.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// Neutral resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU) +#ifdef _WIN32 +LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_OPT_POPUPS DIALOGEX 0, 0, 207, 217 +STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD +EXSTYLE WS_EX_CONTROLPARENT +FONT 8, "MS Shell Dlg", 0, 0, 0x1 +BEGIN + COMBOBOX IDC_LACTION,55,84,142,55,CBS_DROPDOWNLIST | WS_DISABLED | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_RACTION,55,103,142,55,CBS_DROPDOWNLIST | WS_DISABLED | WS_VSCROLL | WS_TABSTOP + LTEXT "Left Click:",IDC_STATIC,8,84,42,12,SS_CENTERIMAGE | NOT WS_GROUP,WS_EX_RIGHT + LTEXT "Right Click:",IDC_STATIC,8,103,42,12,SS_CENTERIMAGE | NOT WS_GROUP,WS_EX_RIGHT + PUSHBUTTON "Preview",IDC_PREVIEW,145,200,57,12,WS_DISABLED + CONTROL "",IDC_SOFFLINE,"MButtonClass",WS_DISABLED | WS_TABSTOP,37,137,16,14 + CONTROL "",IDC_SONLINE,"MButtonClass",WS_DISABLED | WS_TABSTOP,53,137,16,14 + CONTROL "",IDC_SAWAY,"MButtonClass",WS_DISABLED | WS_TABSTOP,69,137,16,14 + CONTROL "",IDC_SNA,"MButtonClass",WS_DISABLED | WS_TABSTOP,85,137,16,14 + CONTROL "",IDC_SOCCUPIED,"MButtonClass",WS_DISABLED | WS_TABSTOP,101,137,16,14 + CONTROL "",IDC_SDND,"MButtonClass",WS_DISABLED | WS_TABSTOP,117,137,16,14 + CONTROL "",IDC_SFREE4CHAT,"MButtonClass",WS_DISABLED | WS_TABSTOP,133,137,16,14 + CONTROL "",IDC_SINVISIBLE,"MButtonClass",WS_DISABLED | WS_TABSTOP,149,137,16,14 + CONTROL "",IDC_SPHONE,"MButtonClass",WS_DISABLED | WS_TABSTOP,165,137,16,14 + CONTROL "",IDC_SLUNCH,"MButtonClass",WS_DISABLED | WS_TABSTOP,181,137,16,14 + CONTROL "A",IDC_SALL,"MButtonClass",WS_TABSTOP,16,137,16,14 + GROUPBOX "Style",IDC_STATIC,4,5,198,63 + CONTROL "",IDC_BACKCOLOR,"ColourPicker",WS_DISABLED | WS_TABSTOP,55,15,48,12 + LTEXT "Background:",IDC_STATIC,8,15,42,12,SS_CENTERIMAGE | NOT WS_GROUP,WS_EX_RIGHT + CONTROL "",IDC_TEXTCOLOR,"ColourPicker",WS_DISABLED | WS_TABSTOP,55,32,48,12 + LTEXT "Text:",IDC_STATIC,8,32,42,12,SS_CENTERIMAGE | NOT WS_GROUP,WS_EX_RIGHT + CONTROL "Use Default",IDC_USEBACKCOLOR,"Button",BS_AUTOCHECKBOX | BS_LEFT | BS_VCENTER | WS_DISABLED | WS_TABSTOP,108,15,89,12 + CONTROL "Use Default",IDC_USETEXTCOLOR,"Button",BS_AUTOCHECKBOX | BS_LEFT | BS_VCENTER | WS_DISABLED | WS_TABSTOP,108,32,89,12 + LTEXT "Timeout:",IDC_STATIC,8,49,42,12,SS_CENTERIMAGE | NOT WS_GROUP,WS_EX_RIGHT + CONTROL "Use Default",IDC_USETIMEOUT,"Button",BS_AUTOCHECKBOX | BS_LEFT | BS_VCENTER | NOT WS_VISIBLE | WS_DISABLED | WS_TABSTOP,108,49,89,12 + GROUPBOX "Interaction",IDC_STATIC,4,73,198,48 + GROUPBOX "Display when",IDC_STATIC,4,126,198,31 + COMBOBOX IDC_TIMEOUT,55,49,48,126,CBS_DROPDOWN | WS_DISABLED | WS_VSCROLL | WS_TABSTOP +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog Info +// + +IDD_OPT_POPUPS DLGINIT +BEGIN + IDC_LACTION, 0x403, 13, 0 +0x6553, 0x646e, 0x4d20, 0x7365, 0x6173, 0x6567, "\000" + IDC_LACTION, 0x403, 14, 0 +0x6944, 0x6d73, 0x7369, 0x2073, 0x6f50, 0x7570, 0x0070, + IDC_RACTION, 0x403, 13, 0 +0x6553, 0x646e, 0x4d20, 0x7365, 0x6173, 0x6567, "\000" + IDC_RACTION, 0x403, 14, 0 +0x6944, 0x6d73, 0x7369, 0x2073, 0x6f50, 0x7570, 0x0070, + 0 +END + +#endif // Neutral resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// Italienisch (Italien) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ITA) +#ifdef _WIN32 +LANGUAGE LANG_ITALIAN, SUBLANG_ITALIAN +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + +#endif // Italienisch (Italien) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + -- cgit v1.2.3