diff options
author | mataes2007 <mataes2007@e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb> | 2011-11-17 18:10:43 +0000 |
---|---|---|
committer | mataes2007 <mataes2007@e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb> | 2011-11-17 18:10:43 +0000 |
commit | 2f10a9e6cc4782d61f0f15bbff36209af922bd34 (patch) | |
tree | 920e978d44cfea3ab33e88318596890cf4513a97 | |
parent | 3c0233134bc5a8e42e3a621f0a5eef2aaf487474 (diff) |
обновлены и подчищены добавленные плагины
git-svn-id: http://miranda-plugins.googlecode.com/svn/trunk@174 e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb
44 files changed, 1443 insertions, 4440 deletions
diff --git a/lastseen-mod/file.c b/lastseen-mod/file.c index 8addcc4..97cd2d9 100644 --- a/lastseen-mod/file.c +++ b/lastseen-mod/file.c @@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. File name : $URL: http://svn.berlios.de/svnroot/repos/mgoodies/trunk/lastseen-mod/file.c $
Revision : $Rev: 1570 $
-Last change on : $Date: 2007-12-30 00:30:07 +0200 (Вс, 30 дек 2007) $
+Last change on : $Date: 2007-12-30 01:30:07 +0300 (Вс, 30 дек 2007) $
Last change by : $Author: y_b $
*/
@@ -110,8 +110,8 @@ void FileWrite(HANDLE hcontact) strcpy(szout,ParseString(!DBGetContactSetting(NULL,S_MOD,"FileStamp",&dbv)?dbv.pszVal:DEFAULT_FILESTAMP,hcontact,1));
DBFreeVariant(&dbv);
- WriteFile(fhout,szout,strlen(szout),&byteswritten,NULL);
- WriteFile(fhout,sznl,strlen(sznl),&byteswritten,NULL);
+ WriteFile(fhout,szout, (DWORD)_tcslen(szout),&byteswritten,NULL);
+ WriteFile(fhout,sznl, (DWORD)_tcslen(sznl),&byteswritten,NULL);
CloseHandle(fhout);
diff --git a/lastseen-mod/history.c b/lastseen-mod/history.c index 9917d95..724cfd5 100644 --- a/lastseen-mod/history.c +++ b/lastseen-mod/history.c @@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. File name : $URL: http://svn.berlios.de/svnroot/repos/mgoodies/trunk/lastseen-mod/history.c $
Revision : $Rev: 1056 $
-Last change on : $Date: 2006-10-30 05:22:07 +0200 (Пн, 30 окт 2006) $
+Last change on : $Date: 2006-10-30 06:22:07 +0300 (Пн, 30 окт 2006) $
Last change by : $Author: y_b $
*/
#include "seen.h"
@@ -167,7 +167,7 @@ void MyResizeGetOffset (HWND hwndDlg, HWND hwndControl, *nDy = nHeight - (rcinit.bottom - rcinit.top);
}
-BOOL CALLBACK HistoryDlgProc(HWND hwndDlg, UINT Message, WPARAM wparam, LPARAM lparam)
+INT_PTR CALLBACK HistoryDlgProc(HWND hwndDlg, UINT Message, WPARAM wparam, LPARAM lparam)
{
HANDLE hContact;
char sztemp[1024]="";
@@ -178,7 +178,7 @@ BOOL CALLBACK HistoryDlgProc(HWND hwndDlg, UINT Message, WPARAM wparam, LPARAM l case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
hContact = (HANDLE)lparam;
- SetWindowLong(hwndDlg,GWL_USERDATA,lparam);
+ SetWindowLongPtr(hwndDlg,GWLP_USERDATA,lparam);
strcpy(sztemp,(char *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME,(WPARAM)hContact,0));
strcat(sztemp, ": ");
strcat(sztemp, Translate("last seen history"));
@@ -230,7 +230,7 @@ BOOL CALLBACK HistoryDlgProc(HWND hwndDlg, UINT Message, WPARAM wparam, LPARAM l case WM_DRAWITEM:
return CallService(MS_CLIST_MENUDRAWITEM,wparam,lparam);
case WM_COMMAND:
- hContact=(HANDLE)GetWindowLong(hwndDlg,GWL_USERDATA);
+ hContact=(HANDLE)GetWindowLongPtr(hwndDlg,GWLP_USERDATA);
if(CallService(MS_CLIST_MENUPROCESSCOMMAND,MAKEWPARAM(LOWORD(wparam),MPCF_CONTACTMENU),(LPARAM)hContact))
break;
switch(LOWORD(wparam))
diff --git a/lastseen-mod/main.c b/lastseen-mod/main.c index 362bad1..6e60405 100644 --- a/lastseen-mod/main.c +++ b/lastseen-mod/main.c @@ -19,25 +19,27 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. File name : $URL: http://svn.berlios.de/svnroot/repos/mgoodies/trunk/lastseen-mod/main.c $
Revision : $Rev: 1571 $
-Last change on : $Date: 2007-12-30 03:55:51 +0200 (Вс, 30 дек 2007) $
+Last change on : $Date: 2007-12-30 04:55:51 +0300 (Вс, 30 дек 2007) $
Last change by : $Author: y_b $
*/
#include "seen.h"
HINSTANCE hInstance;
-HANDLE ehdb=NULL,ehproto=NULL,ehmissed=NULL,ehuserinfo=NULL,ehmissed_proto=NULL;
+HANDLE ehdb = NULL, ehproto = NULL, ehmissed = NULL, ehuserinfo = NULL, ehmissed_proto = NULL, hOptInit = NULL, hMainInit = NULL;
PLUGINLINK *pluginLink;
+struct MM_INTERFACE mmi;
+int hLangpack;
char authemail[] = "fscking@spammer.oip.info";//the correct e-mail shall be constructed in DllMain
PLUGININFOEX pluginInfo={
sizeof(PLUGININFOEX),
#ifndef PERMITNSN
- "Last seen plugin mod",
+ "Last seen",
#else
- "Last seen plugin mod (NSNCompat)",
+ "Last seen",
#endif
PLUGIN_MAKE_VERSION(5,0,4,7),
- "Log when a user was last seen online and which users were online while you were away",
+ "Log when a user was last seen online and which users were online while you were away.",
"Heiko Schillinger, YB",
authemail,
" 2001-2002 Heiko Schillinger, 2003 modified by Bruno Rino, 2005-7 Modified by YB",
@@ -54,8 +56,8 @@ PLUGININFOEX pluginInfo={ #define TRANSNUMBER 2
DBVTranslation idleTr[TRANSNUMBER]={
- {(TranslateFunc*)any_to_IdleNotidleUnknown, L"Any to Idle/Not Idle/Unknown",0},
- {(TranslateFunc*)any_to_Idle, L"Any to /Idle or empty",0}
+ {(TranslateFunc*)any_to_IdleNotidleUnknown, _T("Any to Idle/Not Idle/Unknown"),0},
+ {(TranslateFunc*)any_to_Idle, _T("Any to /Idle or empty"),0}
};
@@ -83,14 +85,14 @@ int MainInit(WPARAM wparam,LPARAM lparam) memset(&contactQueue[0], 0, contactQueueSize);
contactQueueSize = 16;
includeIdle = (BOOL )DBGetContactSettingByte(NULL,S_MOD,"IdleSupport",1);
- HookEvent(ME_OPT_INITIALISE,OptionsInit);
+ hOptInit = HookEvent(ME_OPT_INITIALISE, OptionsInit);
if(DBGetContactSettingByte(NULL,S_MOD,"MenuItem",1)) {
InitMenuitem();
}
if(DBGetContactSettingByte(NULL,S_MOD,"UserinfoTab",1))
- ehuserinfo=HookEvent(ME_USERINFO_INITIALISE,UserinfoInit);
+ ehuserinfo = HookEvent(ME_USERINFO_INITIALISE,UserinfoInit);
if(DBGetContactSettingByte(NULL,S_MOD,"FileOutput",0))
InitFileOutput();
@@ -125,16 +127,6 @@ int MainInit(WPARAM wparam,LPARAM lparam) return 0;
}
-__declspec(dllexport) PLUGININFOEX * MirandaPluginInfo(DWORD mirandaVersion)
-{
- if ( mirandaVersion < PLUGIN_MAKE_VERSION(0,5,2,0)) {
- MessageBox( NULL, _T("The LastSeen-mod plugin cannot be loaded. Your Miranda is too old."), _T("SeenPlugin"), MB_OK|MB_ICONWARNING|MB_SETFOREGROUND|MB_TOPMOST );
- return NULL;
- }
- if ( mirandaVersion < PLUGIN_MAKE_VERSION( 0,7,0,17 )) pluginInfo.cbSize = sizeof( PLUGININFO );
- return &pluginInfo;
-}
-
__declspec(dllexport) PLUGININFOEX * MirandaPluginInfoEx(DWORD mirandaVersion)
{
pluginInfo.cbSize = sizeof( PLUGININFOEX );
@@ -155,9 +147,13 @@ __declspec(dllexport) const MUUID * MirandaPluginInterfaces(void) __declspec(dllexport)int Unload(void)
{
UnhookEvent(ehdb);
- if(ehmissed!=NULL) UnhookEvent(ehmissed);
+ if(ehmissed) UnhookEvent(ehmissed);
UnhookEvent(ehproto);
- if(ehmissed_proto)UnhookEvent(ehmissed_proto);
+ if(ehmissed_proto) UnhookEvent(ehmissed_proto);
+ UnhookEvent(hOptInit);
+ UnhookEvent(hMainInit);
+ if (ehuserinfo) UnhookEvent(ehuserinfo);
+ UninitMenuitem();
// free(contactQueue);
return 0;
}
@@ -176,12 +172,14 @@ BOOL WINAPI DllMain(HINSTANCE hinst,DWORD fdwReason,LPVOID lpvReserved) int __declspec(dllexport)Load(PLUGINLINK *link)
{
pluginLink=link;
+ mir_getMMI(&mmi);
+ mir_getLP(&pluginInfo);
// this isn't required for most events
// but the ME_USERINFO_INITIALISE
// I decided to hook all events after
// everything is loaded because it seems
// to be safer in my opinion
- HookEvent(ME_SYSTEM_MODULESLOADED,MainInit);
+ hMainInit = HookEvent(ME_SYSTEM_MODULESLOADED,MainInit);
return 0;
}
diff --git a/lastseen-mod/menu.c b/lastseen-mod/menu.c index ff6540c..e6b972f 100644 --- a/lastseen-mod/menu.c +++ b/lastseen-mod/menu.c @@ -19,12 +19,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. File name : $URL: http://svn.berlios.de/svnroot/repos/mgoodies/trunk/lastseen-mod/menu.c $
Revision : $Rev: 1570 $
-Last change on : $Date: 2007-12-30 00:30:07 +0200 (Вс, 30 дек 2007) $
+Last change on : $Date: 2007-12-30 01:30:07 +0300 (Вс, 30 дек 2007) $
Last change by : $Author: y_b $
*/
#include "seen.h"
-HANDLE hmenuitem=NULL;
+HANDLE hmenuitem=NULL, hLSUserDet = NULL, hBuildMenu = NULL;
void ShowHistory(HANDLE hContact, BYTE isAlert);
void InitHistoryDialog(void);
@@ -32,14 +32,12 @@ void InitHistoryDialog(void); /*
Handles the messages sent by clicking the contact's menu item
*/
-int MenuitemClicked(WPARAM wparam,LPARAM lparam)
+INT_PTR MenuitemClicked(WPARAM wparam,LPARAM lparam)
{
ShowHistory((HANDLE)wparam, 0);
return 0;
}
-
-
int BuildContactMenu(WPARAM wparam,LPARAM lparam)
{
CLISTMENUITEM cmi;
@@ -51,7 +49,6 @@ int BuildContactMenu(WPARAM wparam,LPARAM lparam) hContact = (HANDLE)wparam;
szProto=(char*)CallService(MS_PROTO_GETCONTACTBASEPROTO,(WPARAM)hContact,0);
-
ZeroMemory(&cmi,sizeof(cmi));
cmi.cbSize=sizeof(cmi);
if(!IsWatchedProtocol(szProto) || !DBGetContactSettingByte(NULL,S_MOD,"MenuItem",1))
@@ -82,17 +79,16 @@ int BuildContactMenu(WPARAM wparam,LPARAM lparam) CallService(MS_CLIST_MODIFYMENUITEM,(WPARAM)hmenuitem,(LPARAM)&cmi);
DBFreeVariant(&dbv);
-
return 0;
}
-void InitMenuitem(void)
+void InitMenuitem()
{
CLISTMENUITEM cmi;
- CreateServiceFunction("LastSeenUserDetails",MenuitemClicked);
+ hLSUserDet = CreateServiceFunction("LastSeenUserDetails", MenuitemClicked);
ZeroMemory(&cmi,sizeof(cmi));
cmi.cbSize=sizeof(cmi);
@@ -106,7 +102,13 @@ void InitMenuitem(void) hmenuitem=(HANDLE)CallService(MS_CLIST_ADDCONTACTMENUITEM,0,(LPARAM)&cmi);
- HookEvent(ME_CLIST_PREBUILDCONTACTMENU,BuildContactMenu);
+ hBuildMenu = HookEvent(ME_CLIST_PREBUILDCONTACTMENU,BuildContactMenu);
InitHistoryDialog();
}
+
+void UninitMenuitem()
+{
+ DestroyServiceFunction(hLSUserDet);
+ UnhookEvent(hBuildMenu);
+}
\ No newline at end of file diff --git a/lastseen-mod/missed.c b/lastseen-mod/missed.c index 05d72a0..f6ed400 100644 --- a/lastseen-mod/missed.c +++ b/lastseen-mod/missed.c @@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. File name : $URL: http://svn.berlios.de/svnroot/repos/mgoodies/trunk/lastseen-mod/missed.c $
Revision : $Rev: 1570 $
-Last change on : $Date: 2007-12-30 00:30:07 +0200 (Вс, 30 дек 2007) $
+Last change on : $Date: 2007-12-30 01:30:07 +0300 (Вс, 30 дек 2007) $
Last change by : $Author: y_b $
*/
#include "seen.h"
@@ -104,7 +104,7 @@ int CheckIfOnline(void) -BOOL CALLBACK MissedDlgProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam)
+INT_PTR CALLBACK MissedDlgProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam)
{
POINT pt;
RECT rcinit,rcresized,rcb,rcd;
diff --git a/lastseen-mod/options.c b/lastseen-mod/options.c index d4fbda6..cf5ab01 100644 --- a/lastseen-mod/options.c +++ b/lastseen-mod/options.c @@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. File name : $URL: http://svn.berlios.de/svnroot/repos/mgoodies/trunk/lastseen-mod/options.c $
Revision : $Rev: 1570 $
-Last change on : $Date: 2007-12-30 00:30:07 +0200 (Вс, 30 дек 2007) $
+Last change on : $Date: 2007-12-30 01:30:07 +0300 (Вс, 30 дек 2007) $
Last change by : $Author: y_b $
*/
#include "seen.h"
@@ -39,7 +39,7 @@ int CheckIfOnline(void); int ResetMissed(void);
static BOOL (WINAPI *pfnEnableThemeDialogTexture)(HANDLE, DWORD) = 0;
-BOOL CALLBACK OptsPopUpsDlgProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam)
+INT_PTR CALLBACK OptsPopUpsDlgProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam)
{
DBVARIANT dbv;
int i;
@@ -184,7 +184,7 @@ BOOL CALLBACK OptsPopUpsDlgProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam) return 0;
}
-BOOL CALLBACK OptsSettingsDlgProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam)
+INT_PTR CALLBACK OptsSettingsDlgProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam)
{
DBVARIANT dbv;
char szstamp[256];
@@ -293,7 +293,7 @@ BOOL CALLBACK OptsSettingsDlgProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam {
char szout[2048]="";
wsprintf(szout,VARIABLE_LIST);
- MessageBox(NULL,szout,"Last Seen Variables",MB_OK|MB_TOPMOST);
+ MessageBox(NULL,szout,Translate("Last Seen Variables"),MB_OK|MB_TOPMOST);
}
break; //case WM_COMMAND
@@ -406,7 +406,7 @@ BOOL CALLBACK OptsSettingsDlgProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam TreeView_GetItem(hwndTreeView, &tvItem);
protocol = (char*)tvItem.lParam;
if ((BOOL)(tvItem.state >> 12) -1) {
- size = (size + strlen(protocol)+2) * sizeof(char);
+ size = (size + (int)_tcslen(protocol)+2) * sizeof(char);
watchedProtocols = (char *)realloc(watchedProtocols, size);
strcat(watchedProtocols, protocol);
strcat(watchedProtocols, " ");
@@ -472,117 +472,6 @@ BOOL CALLBACK OptsSettingsDlgProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam return 0;
}
-long OptsSettingsDlg, OptsPopUpsDlg;
-
- BOOL CALLBACK OptTabDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- switch (msg)
- {
- case WM_INITDIALOG:
- {
- TCITEMA tci;
- RECT theTabSpace;
- RECT rcClient;
- {
- RECT rcTab, rcDlg;
- HWND hwndTab = GetDlgItem(hwndDlg, IDC_OPTIONSTAB);
- TabCtrl_GetItemRect(hwndTab,0,&rcTab);
- TabCtrl_DeleteAllItems(hwndTab);
- theTabSpace.top = rcTab.bottom; // the size of the tab
- GetWindowRect(GetDlgItem(hwndDlg, IDC_OPTIONSTAB), &rcTab);
- GetWindowRect(hwndDlg, &rcDlg);
- theTabSpace.bottom = rcTab.bottom -rcTab.top -theTabSpace.top;
- theTabSpace.top = rcTab.top -rcDlg.top +theTabSpace.top;
- theTabSpace.left = rcTab.left - rcDlg.left;
- theTabSpace.right = rcTab.right-rcTab.left;
- }
- tci.mask = TCIF_PARAM|TCIF_TEXT;
- if (!OptsPopUpsDlg) OptsPopUpsDlg = (long)CreateDialog(hInstance,MAKEINTRESOURCE(IDD_POPUPS), hwndDlg, OptsPopUpsDlgProc);
- if(pfnEnableThemeDialogTexture) {
- if(OptsPopUpsDlg)
- pfnEnableThemeDialogTexture((HANDLE)OptsPopUpsDlg, ETDT_ENABLETAB);
- }
- tci.lParam = OptsPopUpsDlg;
- GetClientRect((HWND)tci.lParam,&rcClient);
- tci.pszText = Translate("Popups");
- SendMessage(GetDlgItem(hwndDlg, IDC_OPTIONSTAB), TCM_INSERTITEMA, (WPARAM)0, (LPARAM)&tci);
- MoveWindow((HWND)tci.lParam,theTabSpace.left+(theTabSpace.right-rcClient.right)/2,
- theTabSpace.top+(theTabSpace.bottom-rcClient.bottom)/2,
- rcClient.right,rcClient.bottom,1);
- ShowWindow((HWND)tci.lParam, SW_HIDE);
-
- if (!OptsSettingsDlg) OptsSettingsDlg = (long)CreateDialog(hInstance,MAKEINTRESOURCE(IDD_SETTINGS), hwndDlg, OptsSettingsDlgProc);
- if(pfnEnableThemeDialogTexture) {
- if(OptsSettingsDlg)
- pfnEnableThemeDialogTexture((HANDLE)OptsSettingsDlg, ETDT_ENABLETAB);
- }
- tci.lParam = OptsSettingsDlg;
- tci.pszText = Translate("Settings");
- GetClientRect((HWND)tci.lParam,&rcClient);
- SendMessage(GetDlgItem(hwndDlg, IDC_OPTIONSTAB), TCM_INSERTITEMA, (WPARAM)0, (LPARAM)&tci);
- MoveWindow((HWND)tci.lParam,theTabSpace.left+(theTabSpace.right-rcClient.right)/2,
- theTabSpace.top+(theTabSpace.bottom-rcClient.bottom)/2,
- rcClient.right,rcClient.bottom,1);
- ShowWindow((HWND)tci.lParam, SW_SHOW);
- TabCtrl_SetCurSel(GetDlgItem(hwndDlg, IDC_OPTIONSTAB),0);
- return TRUE;
- }
- case PSM_CHANGED:
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, (unsigned int)hwndDlg, 0);
- break;
- case WM_DESTROY:
- OptsSettingsDlg = OptsPopUpsDlg = 0;
- break;
- case WM_NOTIFY:
- {
- switch(((LPNMHDR)lParam)->idFrom) {
- case 0: {
- BOOL CommandApply = FALSE;
- if ( (CommandApply = lParam && ((LPNMHDR)lParam)->code == PSN_APPLY) || (lParam && ((LPNMHDR)lParam)->code == PSN_RESET) ) {
-#ifdef _DEBUG
- MessageBoxA(hwndDlg,CommandApply?"Apply":"Cancel","EventHapened",0);
-#endif
- if (CommandApply) {
- SendMessage((HWND)OptsSettingsDlg, WM_NOTIFY, wParam, lParam);
- SendMessage((HWND)OptsPopUpsDlg, WM_NOTIFY, wParam, lParam);
- return TRUE;
- } else {
- }
- } //if PSN_APPLY
- }
- break;
- case IDC_OPTIONSTAB:
- switch (((LPNMHDR)lParam)->code)
- {
- case TCN_SELCHANGING:
- {
- TCITEM tci;
- tci.mask = TCIF_PARAM;
- TabCtrl_GetItem(GetDlgItem(hwndDlg,IDC_OPTIONSTAB),TabCtrl_GetCurSel(GetDlgItem(hwndDlg,IDC_OPTIONSTAB)),&tci);
- ShowWindow((HWND)tci.lParam,SW_HIDE);
- }
- break;
- case TCN_SELCHANGE:
- {
- TCITEM tci;
- short int t;
- tci.mask = TCIF_PARAM;
- t = TabCtrl_GetCurSel(GetDlgItem(hwndDlg,IDC_OPTIONSTAB));
- TabCtrl_GetItem(GetDlgItem(hwndDlg,IDC_OPTIONSTAB),t,&tci);
- ShowWindow((HWND)tci.lParam,SW_SHOW);
- }
- break;
- }
- break;
- }
- }//end case(LPNMHDR)lParam)->idFrom
- break;
- }
- return FALSE;
-}
-
-
-
int OptionsInit(WPARAM wparam,LPARAM lparam)
{
OPTIONSDIALOGPAGE odp;
@@ -597,12 +486,21 @@ int OptionsInit(WPARAM wparam,LPARAM lparam) ZeroMemory(&odp,sizeof(odp));
odp.cbSize=sizeof(odp);
- odp.pszGroup=Translate("Plugins");
+ odp.position = 100000000;
odp.hInstance=hInstance;
- odp.pszTemplate=MAKEINTRESOURCE(IDD_OPTIONS);
- odp.pszTitle=Translate("Last seen");
- odp.pfnDlgProc=OptTabDlgProc;
odp.flags=ODPF_BOLDGROUPS;
+ odp.pszTemplate=MAKEINTRESOURCE(IDD_SETTINGS);
+ odp.pszGroup="Services";
+ odp.pszTitle="Last seen";
+ odp.pfnDlgProc= OptsSettingsDlgProc;
CallService(MS_OPT_ADDPAGE,wparam,(LPARAM)&odp);
+ if (ServiceExists(MS_POPUP_ADDPOPUP))
+ {
+ odp.pszTemplate = MAKEINTRESOURCE(IDD_POPUPS);
+ odp.pszGroup = "PopUps";
+ odp.pszTitle = "Last seen";
+ odp.pfnDlgProc = OptsPopUpsDlgProc;
+ CallService(MS_OPT_ADDPAGE,wparam,(LPARAM)&odp);
+ }
return 0;
}
diff --git a/lastseen-mod/resource.h b/lastseen-mod/resource.h index 24d5815..913ed4c 100644 --- a/lastseen-mod/resource.h +++ b/lastseen-mod/resource.h @@ -20,13 +20,12 @@ #define ID_STATUS_IDLE 40081 /* do not use as a status */
-#define IDD_OPTIONS 101
+#define IDD_SETTINGS 101
#define IDD_USERINFO 102
#define IDD_MISSED 103
#define IDD_USERDETAILS 104
#define IDD_HISTORY 105
-#define IDD_SETTINGS 106
-#define IDD_POPUPS 107
+#define IDD_POPUPS 106
#define IDC_SEENMENUITEM 1000
#define IDC_MENUITEM 1001
#define IDC_UINFOTAB 1002
@@ -90,7 +89,7 @@ //
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE 112
+#define _APS_NEXT_RESOURCE_VALUE 107
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1051
#define _APS_NEXT_SYMED_VALUE 101
diff --git a/lastseen-mod/resource.rc b/lastseen-mod/resource.rc index d0fb879..90733f0 100644 --- a/lastseen-mod/resource.rc +++ b/lastseen-mod/resource.rc @@ -50,14 +50,6 @@ END // Dialog
//
-IDD_OPTIONS DIALOGEX 0, 0, 320, 250
-STYLE DS_FIXEDSYS | DS_CENTER | WS_CHILD
-EXSTYLE WS_EX_CONTROLPARENT
-FONT 8, "MS Shell Dlg", 0, 0, 0x1
-BEGIN
- CONTROL "Tab1",IDC_OPTIONSTAB,"SysTabControl32",WS_TABSTOP,0,3,319,246
-END
-
IDD_SETTINGS DIALOGEX 0, 0, 300, 228
STYLE DS_3DLOOK | DS_FIXEDSYS | WS_CHILD
EXSTYLE WS_EX_CONTROLPARENT
@@ -65,9 +57,9 @@ FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN
GROUPBOX "Last seen options",IDC_MAINGROUP,0,0,299,226,WS_GROUP
CONTROL "Last seen menuitem",IDC_MENUITEM,"Button",
- BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,6,12,79,10
+ BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,6,12,132,10
CONTROL "Show icon",IDC_SHOWICON,"Button",BS_AUTOCHECKBOX |
- WS_GROUP | WS_TABSTOP,87,12,56,10
+ WS_GROUP | WS_TABSTOP,141,12,69,10
EDITTEXT IDC_MENUSTAMP,18,23,120,12,ES_AUTOHSCROLL | WS_GROUP
CONTROL "Userinfo tab",IDC_USERINFO,"Button",BS_AUTOCHECKBOX |
WS_GROUP | WS_TABSTOP,6,42,140,10
@@ -103,8 +95,8 @@ BEGIN GROUPBOX "",IDC_STATIC,0,0,280,26,WS_GROUP
CTEXT "Popup interoperability missing or disabled. You need Popups plugin",IDC_MISSPOPUP,1,11,280,10,NOT WS_VISIBLE
CONTROL "Use popups",IDC_POPUPS,"Button",BS_AUTOCHECKBOX |
- WS_GROUP | WS_TABSTOP,5,10,50,10
- RTEXT "Title",IDC_LABTEXT,70,11,25,10
+ WS_GROUP | WS_TABSTOP,3,10,50,10
+ RTEXT "Title",IDC_LABTEXT,57,11,40,10
EDITTEXT IDC_POPUPSTAMP,100,9,50,12,ES_AUTOHSCROLL | WS_GROUP
RTEXT "Text",IDC_LABTTITLE,155,11,25,10
EDITTEXT IDC_POPUPSTAMPTEXT,185,9,88,12,ES_AUTOHSCROLL |
diff --git a/lastseen-mod/seen.h b/lastseen-mod/seen.h index ad1a301..4e38c29 100644 --- a/lastseen-mod/seen.h +++ b/lastseen-mod/seen.h @@ -19,18 +19,23 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. File name : $URL: http://svn.berlios.de/svnroot/repos/mgoodies/trunk/lastseen-mod/seen.h $
Revision : $Rev: 1570 $
-Last change on : $Date: 2007-12-30 00:30:07 +0200 (Вс, 30 дек 2007) $
+Last change on : $Date: 2007-12-30 01:30:07 +0300 (Вс, 30 дек 2007) $
Last change by : $Author: y_b $
*/
#ifndef _WIN32_IE
#define _WIN32_IE 0x0300
#endif
+#define ETDT_ENABLE 0x00000002
+#define ETDT_USETABTEXTURE 0x00000004
+#define ETDT_ENABLETAB (ETDT_ENABLE | ETDT_USETABTEXTURE)
+#define MIRANDA_VER 0x0900
+#define MIRANDA_CUSTOM_LP
+
#include <windows.h>
#include <win2k.h>
#include <commctrl.h>
#include <stdio.h>
#include <string.h>
-#include <uxtheme.h>
#include "resource.h"
#include <newpluginapi.h>
@@ -51,7 +56,7 @@ Last change by : $Author: y_b $ #include <m_popup.h>
#include <m_system.h>
-#include "../tipper/docs/m_tipper.h"
+#include "m_tipper.h"
WCHAR *any_to_IdleNotidleUnknown(HANDLE hContact, const char *module_name, const char *setting_name, WCHAR *buff, int bufflen);
WCHAR *any_to_Idle(HANDLE hContact, const char *module_name, const char *setting_name, WCHAR *buff, int bufflen);
@@ -61,8 +66,6 @@ WCHAR *any_to_Idle(HANDLE hContact, const char *module_name, const char *setting #define NUM100NANOSEC 116444736000000000
#endif
-#pragma optimize("gsy",on)
-
#define S_MOD "SeenModule"
//#define UM_CHECKHOOKS (WM_USER+1)
@@ -83,9 +86,9 @@ WCHAR *any_to_Idle(HANDLE hContact, const char *module_name, const char *setting #define ICON_INVIS 20
#define DEFAULT_MENUSTAMP "%d.%m.%Y - %H:%M [%s]"
-#define DEFAULT_POPUPSTAMP "%n is %s (%u)"
-#define DEFAULT_POPUPSTAMPTEXT "%i(%r)%bWas %o"
-#define DEFAULT_USERSTAMP "Name:%t%N%bStatus:%t%s%bDay:%t%d.%m.%Y%bTime:%t%H:%M:%S%bPrevious Status:%t%o%b%b%P ID:%t%u%bExternal IP:%t%i%bInternal IP:%t%r%bClientID: %t%C%b%bStatus Message:%t%T"
+#define DEFAULT_POPUPSTAMP Translate("%n is %s (%u)")
+#define DEFAULT_POPUPSTAMPTEXT Translate("%i(%r)%bWas %o")
+#define DEFAULT_USERSTAMP Translate("Name:%t%N%bStatus:%t%s%bDay:%t%d.%m.%Y%bTime:%t%H:%M:%S%bPrevious Status:%t%o%b%b%P ID:%t%u%bExternal IP:%t%i%bInternal IP:%t%r%bClientID: %t%C%b%bStatus Message:%t%T")
#define DEFAULT_FILESTAMP "%d.%m.%Y %H:%M:%S%t%n%t%s%t%u%t%r | %i%t%N"
#define DEFAULT_FILENAME "logs\\%P.txt"
#define DEFAULT_HISTORYSTAMP "%d.%m.%Y - %H:%M [%s]"
@@ -110,6 +113,8 @@ extern DWORD StatusColors15bits[]; void GetColorsFromDWord(LPCOLORREF First, LPCOLORREF Second, DWORD colDword);
DWORD GetDWordFromColors(COLORREF First, COLORREF Second);
+void UninitMenuitem();
+
BOOL includeIdle;
typedef struct logthread_info {
char sProtoName[MAXMODULELABELLENGTH];
diff --git a/lastseen-mod/seen_info.txt b/lastseen-mod/seen_info.txt index 02d064c..5ba87f0 100644 --- a/lastseen-mod/seen_info.txt +++ b/lastseen-mod/seen_info.txt @@ -211,6 +211,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. File name : $URL: http://svn.berlios.de/svnroot/repos/mgoodies/trunk/lastseen-mod/seen_info.txt $
Revision : $Rev: 1570 $
-Last change on : $Date: 2007-12-30 00:30:07 +0200 (Вс, 30 дек 2007) $
+Last change on : $Date: 2007-12-30 01:30:07 +0300 (Вс, 30 дек 2007) $
Last change by : $Author: y_b $
diff --git a/lastseen-mod/seenplugin.dev b/lastseen-mod/seenplugin.dev deleted file mode 100644 index 1ad28b8..0000000 --- a/lastseen-mod/seenplugin.dev +++ /dev/null @@ -1,189 +0,0 @@ -[Project]
-FileName=seenplugin.dev
-Name=seenplugin
-Ver=1
-IsCpp=1
-Type=3
-Compiler=-D__GNUWIN32__ -W -fexceptions_@@_
-CppCompiler=-D__GNUWIN32__ -W -fexceptions_@@_
-Includes=..\..\include
-Linker=-lws2_32 -lkernel32 -luser32 -lgdi32 -lcomctl32 -lcomdlg32 -ladvapi32 -lwinmm --image-base "0x67400000"_@@_
-Libs=
-UnitCount=14
-Folders="Header Files","Resource Files","Source Files"
-ObjFiles=
-PrivateResource=seenplugin_private.rc
-ResourceIncludes=
-MakeIncludes=
-Icon=
-ExeOutput=../../bin/release/plugins
-ObjectOutput=objs
-OverrideOutput=0
-OverrideOutputName=seenplugin.dll
-HostApplication=
-CommandLine=
-UseCustomMakefile=1
-CustomMakefile=seenplugin.win
-IncludeVersionInfo=0
-SupportXPThemes=0
-CompilerSet=0
-CompilerSettings=0010000001001000000100
-
-[Unit1]
-FileName=file.c
-Folder="Source Files"
-Compile=1
-CompileCpp=0
-Link=1
-Priority=1000
-OverrideBuildCmd=0
-BuildCmd=
-
-[Unit2]
-FileName=..\..\protocols\IcqOscarJ\forkthread.c
-Folder="Source Files"
-Compile=1
-CompileCpp=0
-Link=1
-Priority=1000
-OverrideBuildCmd=0
-BuildCmd=
-
-[Unit3]
-FileName=history.c
-Folder="Source Files"
-Compile=1
-CompileCpp=0
-Link=1
-Priority=1000
-OverrideBuildCmd=0
-BuildCmd=
-
-[Unit4]
-FileName=main.c
-Folder="Source Files"
-Compile=1
-CompileCpp=0
-Link=1
-Priority=1000
-OverrideBuildCmd=0
-BuildCmd=
-
-[Unit5]
-FileName=menu.c
-Folder="Source Files"
-Compile=1
-CompileCpp=0
-Link=1
-Priority=1000
-OverrideBuildCmd=0
-BuildCmd=
-
-[Unit6]
-FileName=missed.c
-Folder="Source Files"
-Compile=1
-CompileCpp=0
-Link=1
-Priority=1000
-OverrideBuildCmd=0
-BuildCmd=
-
-[Unit7]
-FileName=options.c
-Folder="Source Files"
-Compile=1
-CompileCpp=0
-Link=1
-Priority=1000
-OverrideBuildCmd=0
-BuildCmd=
-
-[Unit8]
-FileName=userinfo.c
-Folder="Source Files"
-Compile=1
-CompileCpp=0
-Link=1
-Priority=1000
-OverrideBuildCmd=0
-BuildCmd=
-
-[Unit9]
-FileName=utils.c
-Folder="Source Files"
-Compile=1
-CompileCpp=0
-Link=1
-Priority=1000
-OverrideBuildCmd=0
-BuildCmd=
-
-[Unit10]
-FileName=resource.h
-Folder="Header Files"
-Compile=1
-CompileCpp=1
-Link=1
-Priority=1000
-OverrideBuildCmd=0
-BuildCmd=
-
-[Unit11]
-FileName=seen.h
-Folder="Header Files"
-Compile=1
-CompileCpp=1
-Link=1
-Priority=1000
-OverrideBuildCmd=0
-BuildCmd=
-
-[Unit12]
-FileName=resource.rc
-Folder="Resource Files"
-Compile=1
-CompileCpp=1
-Link=0
-Priority=1000
-OverrideBuildCmd=0
-BuildCmd=
-
-[Unit13]
-FileName=seen_info.txt
-Folder=
-Compile=0
-CompileCpp=0
-Link=0
-Priority=1000
-OverrideBuildCmd=0
-BuildCmd=
-
-[Unit14]
-FileName=seen_langpack.txt
-Folder=
-Compile=0
-CompileCpp=0
-Link=0
-Priority=1000
-OverrideBuildCmd=0
-BuildCmd=
-
-[VersionInfo]
-Major=0
-Minor=1
-Release=1
-Build=1
-LanguageID=1033
-CharsetID=1252
-CompanyName=
-FileVersion=0.1
-FileDescription=Developed using the Dev-C++ IDE
-InternalName=
-LegalCopyright=
-LegalTrademarks=
-OriginalFilename=seenplugin.dll
-ProductName=seenplugin
-ProductVersion=0.1
-AutoIncBuildNr=0
-
diff --git a/lastseen-mod/seenplugin.win b/lastseen-mod/seenplugin.win deleted file mode 100644 index c62f4a4..0000000 --- a/lastseen-mod/seenplugin.win +++ /dev/null @@ -1,63 +0,0 @@ -# Project: seenplugin
-# Makefile created by Dev-C++ 4.9.9.2
-
-CPP = g++.exe
-CC = gcc.exe
-WINDRES = windres.exe
-RES = objs/resource.res
-OBJ = objs/file.o objs/forkthread.o objs/history.o objs/main.o objs/menu.o objs/missed.o objs/options.o objs/userinfo.o objs/utils.o $(RES)
-LINKOBJ = objs/file.o objs/forkthread.o objs/history.o objs/main.o objs/menu.o objs/missed.o objs/options.o objs/userinfo.o objs/utils.o $(RES)
-LIBS = -lws2_32 -lkernel32 -luser32 -lgdi32 -lcomctl32 -lcomdlg32 -ladvapi32 -lwinmm -s
-INCS = -I"../../include"
-CXXINCS = -I"../../include"
-BIN = ../../bin/release/plugins/seenplugin.dll
-CXXFLAGS = $(CXXINCS) -D__GNUWIN32__ -W -fexceptions -w -fexpensive-optimizations -Os -fweb -fmessage-length=0
-CFLAGS = $(INCS) -D__GNUWIN32__ -W -fexceptions -w -fexpensive-optimizations -Os -fweb -fmessage-length=0
-RM = rm -f
-
-.PHONY: all all-before all-after clean clean-custom
-
-all: all-before ../../bin/release/plugins/seenplugin.dll all-after
-
-
-clean: clean-custom
- ${RM} $(OBJ) $(BIN)
-
-DLLWRAP=dllwrap.exe
-DEFFILE=../../bin/release/libseenplugin.def
-STATICLIB=../../bin/release/libseenplugin.a
-
-$(BIN): $(LINKOBJ)
-# $(DLLWRAP) --output-def $(DEFFILE) --driver-name c++ --implib $(STATICLIB) $(LINKOBJ) $(LIBS) -o $(BIN)
- $(CPP) $(LINKOBJ) $(LIBS) -mdll -o $(BIN)
-
-objs/file.o: file.c
- $(CC) -c file.c -o objs/file.o $(CFLAGS)
-
-objs/forkthread.o: ../../protocols/IcqOscarJ/forkthread.c
- $(CC) -c ../../protocols/IcqOscarJ/forkthread.c -o objs/forkthread.o $(CFLAGS)
-
-objs/history.o: history.c
- $(CC) -c history.c -o objs/history.o $(CFLAGS)
-
-objs/main.o: main.c
- $(CC) -c main.c -o objs/main.o $(CFLAGS)
-
-objs/menu.o: menu.c
- $(CC) -c menu.c -o objs/menu.o $(CFLAGS)
-
-objs/missed.o: missed.c
- $(CC) -c missed.c -o objs/missed.o $(CFLAGS)
-
-objs/options.o: options.c
- $(CC) -c options.c -o objs/options.o $(CFLAGS)
-
-objs/userinfo.o: userinfo.c
- $(CC) -c userinfo.c -o objs/userinfo.o $(CFLAGS)
-
-objs/utils.o: utils.c
- $(CC) -c utils.c -o objs/utils.o $(CFLAGS)
-
-objs/resource.res: resource.rc
- $(WINDRES) -i resource.rc --input-format=rc -o objs/resource.res -O coff
-
diff --git a/lastseen-mod/seenplugin_10.vcxproj b/lastseen-mod/seenplugin_10.vcxproj new file mode 100644 index 0000000..8cc25b3 --- /dev/null +++ b/lastseen-mod/seenplugin_10.vcxproj @@ -0,0 +1,358 @@ +<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectName>SeenPlugin</ProjectName>
+ <ProjectGuid>{EFD45F48-63D5-48AE-96CD-8ADB3545A4EE}</ProjectGuid>
+ <RootNamespace>Seenplugin</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">../../../Files/Release/Plugins\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">../../../Files/Release64/Plugins\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)/Obj/$(ProjectName)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Configuration)64/Obj/$(ProjectName)\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">../../../Files/Debug/Plugins\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">../../../Files/Debug64/Plugins\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)/Obj/$(ProjectName)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Configuration)64/Obj/$(ProjectName)\</IntDir>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>.\releasePermNSN/seenplugin.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>../../include;../../ExternalAPI</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>PERMITNSN;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>
+ </PrecompiledHeaderOutputFile>
+ <BrowseInformationFile>
+ </BrowseInformationFile>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ <Link>
+ <AdditionalOptions>/filealign:0x200 %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalDependencies>ws2_32.lib;comctl32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <ProgramDatabaseFile>
+ </ProgramDatabaseFile>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <BaseAddress>0x67400000</BaseAddress>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ <PostBuildEvent>
+ <Command>
+ </Command>
+ </PostBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TypeLibraryName>.\releasePermNSN/seenplugin.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>../../include;../../ExternalAPI</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>PERMITNSN;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>
+ </PrecompiledHeaderOutputFile>
+ <BrowseInformationFile>
+ </BrowseInformationFile>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ <Link>
+ <AdditionalOptions>/filealign:0x200 %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalDependencies>ws2_32.lib;comctl32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <ProgramDatabaseFile>
+ </ProgramDatabaseFile>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <BaseAddress>0x67400000</BaseAddress>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ </Link>
+ <PostBuildEvent>
+ <Command>
+ </Command>
+ </PostBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>.\DebugPermNSN/seenplugin.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../include;../../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>PERMITNSN;WIN32;_DEBUG;_WINDOWS;_USRDLL;MP_SEEN_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeaderOutputFile>
+ </PrecompiledHeaderOutputFile>
+ <AssemblerOutput>All</AssemblerOutput>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;comctl32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <BaseAddress>0x67400000</BaseAddress>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TypeLibraryName>.\DebugPermNSN/seenplugin.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../include;../../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>PERMITNSN;WIN32;_DEBUG;_WINDOWS;_USRDLL;MP_SEEN_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeaderOutputFile>
+ </PrecompiledHeaderOutputFile>
+ <AssemblerOutput>All</AssemblerOutput>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;comctl32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <BaseAddress>0x67400000</BaseAddress>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="file.c">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <ClCompile Include="history.c">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <ClCompile Include="main.c">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <ClCompile Include="menu.c">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <ClCompile Include="missed.c">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <ClCompile Include="options.c">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <ClCompile Include="userinfo.c">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <ClCompile Include="utils.c">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="resource.h" />
+ <ClInclude Include="seen.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="resource.rc">
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="seen_info.txt" />
+ <None Include="seen_langpack.txt" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/lastseen-mod/seenplugin_10.vcxproj.filters b/lastseen-mod/seenplugin_10.vcxproj.filters new file mode 100644 index 0000000..99de7b5 --- /dev/null +++ b/lastseen-mod/seenplugin_10.vcxproj.filters @@ -0,0 +1,60 @@ +<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{89af4e67-032f-4900-b14d-1d956b6c376d}</UniqueIdentifier>
+ <Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{1f155b67-4f4e-4b49-a10e-6a0588c62a69}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{a800d3aa-15e0-4d7d-8b9f-99dfd4112d8e}</UniqueIdentifier>
+ <Extensions>ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="file.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="history.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="main.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="menu.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="missed.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="options.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="userinfo.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="utils.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="resource.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="seen.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="resource.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="seen_info.txt" />
+ <None Include="seen_langpack.txt" />
+ </ItemGroup>
+</Project>
\ No newline at end of file diff --git a/lastseen-mod/userinfo.c b/lastseen-mod/userinfo.c index eb1bf57..02f050e 100644 --- a/lastseen-mod/userinfo.c +++ b/lastseen-mod/userinfo.c @@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. File name : $URL: http://svn.berlios.de/svnroot/repos/mgoodies/trunk/lastseen-mod/userinfo.c $
Revision : $Rev: 1570 $
-Last change on : $Date: 2007-12-30 00:30:07 +0200 (Вс, 30 дек 2007) $
+Last change on : $Date: 2007-12-30 01:30:07 +0300 (Вс, 30 дек 2007) $
Last change by : $Author: y_b $
*/
#include "seen.h"
@@ -50,7 +50,7 @@ BOOL CALLBACK EditProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam) -BOOL CALLBACK UserinfoDlgProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam)
+INT_PTR CALLBACK UserinfoDlgProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam)
{
char *szout;
DBVARIANT dbv;
@@ -58,7 +58,7 @@ BOOL CALLBACK UserinfoDlgProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam) switch(msg){
case WM_INITDIALOG:
- MainProc=(WNDPROC)SetWindowLong(GetDlgItem(hdlg,IDC_INFOTEXT),GWL_WNDPROC,(LONG)EditProc);
+ MainProc=(WNDPROC)SetWindowLongPtr(GetDlgItem(hdlg,IDC_INFOTEXT),GWLP_WNDPROC,(LONG)EditProc);
szout=strdup(ParseString((!DBGetContactSetting(NULL,S_MOD,"UserStamp",&dbv)?dbv.pszVal:DEFAULT_USERSTAMP),(HANDLE)lparam,0));
SetDlgItemText(hdlg,IDC_INFOTEXT,szout);
if(!strcmp(szout,Translate("<unknown>")))
@@ -87,7 +87,7 @@ int UserinfoInit(WPARAM wparam,LPARAM lparam) uip.cbSize=sizeof(uip);
uip.hInstance=hInstance;
uip.pszTemplate=MAKEINTRESOURCE(IDD_USERINFO);
- uip.pszTitle=Translate("Last seen");
+ uip.pszTitle="Last seen";
uip.pfnDlgProc=UserinfoDlgProc;
CallService(MS_USERINFO_ADDPAGE,wparam,(LPARAM)&uip);
}
diff --git a/lastseen-mod/utils.c b/lastseen-mod/utils.c index d99884a..5fc880e 100644 --- a/lastseen-mod/utils.c +++ b/lastseen-mod/utils.c @@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. File name : $URL: http://svn.berlios.de/svnroot/repos/mgoodies/trunk/lastseen-mod/utils.c $
Revision : $Rev: 1570 $
-Last change on : $Date: 2007-12-30 00:30:07 +0200 (Вс, 30 дек 2007) $
+Last change on : $Date: 2007-12-30 01:30:07 +0300 (Вс, 30 дек 2007) $
Last change by : $Author: y_b $
*/
#include "seen.h"
@@ -59,12 +59,12 @@ int IsWatchedProtocol(const char* szProto) if (pd==NULL || pd->type!=PROTOTYPE_PROTOCOL || CallProtoService(pd->szName,PS_GETCAPS,PFLAGNUM_2,0)==0)
return 0;
- iProtoLen = strlen(szProto);
+ iProtoLen = (int)_tcslen(szProto);
if(DBGetContactSetting(NULL, S_MOD, "WatchedProtocols", &dbv))
szWatched = DEFAULT_WATCHEDPROTOCOLS;
else
szWatched = dbv.pszVal;
- iWatchedLen = strlen(szWatched);
+ iWatchedLen = (int)_tcslen(szWatched);
if (*szWatched == '\0')
{
@@ -867,7 +867,7 @@ int ModeChange(WPARAM wparam,LPARAM lparam) //we have just loged-off
if (IsWatchedProtocol(ack->szModule)){
char *str = malloc(MAXMODULELABELLENGTH+9);
- DWORD t;
+ time_t t;
time(&t);
mir_snprintf(str,MAXMODULELABELLENGTH+8,"OffTime-%s",ack->szModule);
DBWriteContactSettingDword(NULL,S_MOD,str,t);
diff --git a/nudge/include/m_folders.h b/nudge/include/m_folders.h deleted file mode 100644 index 5971cff..0000000 --- a/nudge/include/m_folders.h +++ /dev/null @@ -1,284 +0,0 @@ -/*
-Custom profile folders plugin for Miranda IM
-
-Copyright 2005 Cristian Libotean
-
-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.
-*/
-
-#ifndef M_CUSTOM_FOLDERS_H
-#define M_CUSTOM_FOLDERS_H
-
-#define FOLDERS_API 501 //dunno why it's here but it is :)
-
-#define PROFILE_PATH "%profile_path%"
-#define CURRENT_PROFILE "%current_profile%"
-#define MIRANDA_PATH "%miranda_path%"
-#define PLUGINS_PATH "%miranda_path%" "\\plugins"
-#define MIRANDA_USERDATA "%miranda_userdata%"
-
-#define TO_WIDE(x) L ## x
-
-#define PROFILE_PATHW L"%profile_path%"
-#define CURRENT_PROFILEW L"%current_profile%"
-#define MIRANDA_PATHW L"%miranda_path%"
-#define MIRANDA_USERDATAW L"%miranda_userdata%"
-
-#define FOLDER_AVATARS PROFILE_PATH "\\" CURRENT_PROFILE "\\avatars"
-#define FOLDER_VCARDS PROFILE_PATH "\\" CURRENT_PROFILE "\\vcards"
-#define FOLDER_LOGS PROFILE_PATH "\\" CURRENT_PROFILE "\\logs"
-#define FOLDER_RECEIVED_FILES PROFILE_PATH "\\" CURRENT_PROFILE "\\received files"
-#define FOLDER_DOCS MIRANDA_PATH "\\" "docs"
-
-#define FOLDER_CONFIG PLUGINS_PATH "\\" "config"
-
-#define FOLDER_SCRIPTS MIRANDA_PATH "\\" "scripts"
-
-#define FOLDER_UPDATES MIRANDA_PATH "\\" "updates"
-
-#define FOLDER_CUSTOMIZE MIRANDA_PATH "\\" "customize"
-#define FOLDER_CUSTOMIZE_SOUNDS FOLDER_CUSTOMIZE "\\sounds"
-#define FOLDER_CUSTOMIZE_ICONS FOLDER_CUSTOMIZE "\\icons"
-#define FOLDER_CUSTOMIZE_SMILEYS FOLDER_CUSTOMIZE "\\smileys"
-#define FOLDER_CUSTOMIZE_SKINS FOLDER_CUSTOMIZE "\\skins"
-#define FOLDER_CUSTOMIZE_THEMES FOLDER_CUSTOMIZE "\\themes"
-
-
-#define FOLDERS_NAME_MAX_SIZE 64 //maximum name and section size
-
-#define FF_UNICODE 0x00000001
-
-#if defined (UNICODE)
- #define FF_TCHAR FF_UNICODE
-#else
- #define FF_TCHAR 0
-#endif
-
-typedef struct{
- int cbSize; //size of struct
- char szSection[FOLDERS_NAME_MAX_SIZE]; //section name, if it doesn't exist it will be created otherwise it will just add this entry to it
- char szName[FOLDERS_NAME_MAX_SIZE]; //entry name - will be shown in options
- union{
- const char *szFormat; //default string format. Fallback string in case there's no entry in the database for this folder. This should be the initial value for the path, users will be able to change it later.
- const wchar_t *szFormatW; //String is dup()'d so you can free it later. If you set the unicode string don't forget to set the flag accordingly.
- const TCHAR *szFormatT;
- };
- DWORD flags; //FF_* flags
-} FOLDERSDATA;
-
-/*Folders/Register/Path service
- wParam - not used, must be 0
- lParam - (LPARAM) (const FOLDERDATA *) - Data structure filled with
- the necessary information.
- Returns a handle to the registered path or 0 on error.
- You need to use this to call the other services.
-*/
-#define MS_FOLDERS_REGISTER_PATH "Folders/Register/Path"
-
-/*Folders/Get/PathSize service
- wParam - (WPARAM) (int) - handle to registered path
- lParam - (LPARAM) (int *) - pointer to the variable that receives the size of the path
- string (not including the null character). Depending on the flags set when creating the path
- it will either call strlen() or wcslen() to get the length of the string.
- Returns the size of the buffer.
-*/
-#define MS_FOLDERS_GET_SIZE "Folders/Get/PathSize"
-
-typedef struct{
- int cbSize;
- int nMaxPathSize; //maximum size of buffer. This represents the number of characters that can be copied to it (so for unicode strings you don't send the number of bytes but the length of the string).
- union{
- char *szPath; //pointer to the buffer that receives the path without the last "\\"
- wchar_t *szPathW; //unicode version of the buffer.
- TCHAR *szPathT;
- };
-} FOLDERSGETDATA;
-
-/*Folders/Get/Path service
- wParam - (WPARAM) (int) - handle to registered path
- lParam - (LPARAM) (FOLDERSGETDATA *) pointer to a FOLDERSGETDATA that has all the relevant fields filled.
- Should return 0 on success, or nonzero otherwise.
-*/
-#define MS_FOLDERS_GET_PATH "Folders/Get/Path"
-
-typedef struct{
- int cbSize;
- union{
- char **szPath; //address of a string variable (char *) or (wchar_t*) where the path should be stored (the last \ won't be copied).
- wchar_t **szPathW; //unicode version of string.
- TCHAR **szPathT;
- };
-} FOLDERSGETALLOCDATA;
-
-/*Folders/GetRelativePath/Alloc service
- wParam - (WPARAM) (int) - Handle to registered path
- lParam - (LPARAM) (FOLDERSALLOCDATA *) data
- This service is the same as MS_FOLDERS_GET_PATH with the difference that this service
- allocates the needed space for the buffer. It uses miranda's memory functions for that and you need
- to use those to free the resulting buffer.
- Should return 0 on success, or nonzero otherwise. Currently it only returns 0.
-*/
-#define MS_FOLDERS_GET_PATH_ALLOC "Folders/Get/Path/Alloc"
-
-
-/*Folders/On/Path/Changed
- wParam - (WPARAM) 0
- lParam - (LPARAM) 0
- Triggered when the folders change, you should reget the paths you registered.
-*/
-#define ME_FOLDERS_PATH_CHANGED "Folders/On/Path/Changed"
-
-#ifndef FOLDERS_NO_HELPER_FUNCTIONS
-
-#ifndef M_UTILS_H__
-#error The helper functions require that m_utils.h be included in the project. Please include that file if you want to use the helper functions. If you don''t want to use the functions just define FOLDERS_NO_HELPER_FUNCTIONS.
-#endif
-//#include "../../../include/newpluginapi.h"
-
-__inline static HANDLE FoldersRegisterCustomPath(const char *section, const char *name, const char *defaultPath)
-{
- FOLDERSDATA fd = {0};
- if (!ServiceExists(MS_FOLDERS_REGISTER_PATH)) return 0;
- fd.cbSize = sizeof(FOLDERSDATA);
- strncpy(fd.szSection, section, FOLDERS_NAME_MAX_SIZE);
- fd.szSection[FOLDERS_NAME_MAX_SIZE - 1] = '\0';
- strncpy(fd.szName, name, FOLDERS_NAME_MAX_SIZE);
- fd.szName[FOLDERS_NAME_MAX_SIZE - 1] = '\0';
- fd.szFormat = defaultPath;
- return (HANDLE) CallService(MS_FOLDERS_REGISTER_PATH, 0, (LPARAM) &fd);
-}
-
-__inline static HANDLE FoldersRegisterCustomPathW(const char *section, const char *name, const wchar_t *defaultPathW)
-{
- FOLDERSDATA fd = {0};
- if (!ServiceExists(MS_FOLDERS_REGISTER_PATH)) return 0;
- fd.cbSize = sizeof(FOLDERSDATA);
- strncpy(fd.szSection, section, FOLDERS_NAME_MAX_SIZE);
- fd.szSection[FOLDERS_NAME_MAX_SIZE - 1] = '\0'; //make sure it's NULL terminated
- strncpy(fd.szName, name, FOLDERS_NAME_MAX_SIZE);
- fd.szName[FOLDERS_NAME_MAX_SIZE - 1] = '\0'; //make sure it's NULL terminated
- fd.szFormatW = defaultPathW;
- fd.flags = FF_UNICODE;
- return (HANDLE) CallService(MS_FOLDERS_REGISTER_PATH, 0, (LPARAM) &fd);
-}
-
-__inline static INT_PTR FoldersGetCustomPath(HANDLE hFolderEntry, char *path, const int size, const char *notFound)
-{
- FOLDERSGETDATA fgd = {0};
- INT_PTR res;
- fgd.cbSize = sizeof(FOLDERSGETDATA);
- fgd.nMaxPathSize = size;
- fgd.szPath = path;
- res = CallService(MS_FOLDERS_GET_PATH, (WPARAM) hFolderEntry, (LPARAM) &fgd);
- if (res)
- {
- char buffer[MAX_PATH];
- CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM) notFound, (LPARAM) buffer);
- mir_snprintf(path, size, "%s", buffer);
- }
-
- return res;
-}
-
-__inline static INT_PTR FoldersGetCustomPathW(HANDLE hFolderEntry, wchar_t *pathW, const int count, const wchar_t *notFoundW)
-{
- FOLDERSGETDATA fgd = {0};
- INT_PTR res;
- fgd.cbSize = sizeof(FOLDERSGETDATA);
- fgd.nMaxPathSize = count;
- fgd.szPathW = pathW;
- res = CallService(MS_FOLDERS_GET_PATH, (WPARAM) hFolderEntry, (LPARAM) &fgd);
- if (res)
- {
- wcsncpy(pathW, notFoundW, count);
- pathW[count - 1] = '\0';
- }
-
- return res;
-}
-
-__inline static INT_PTR FoldersGetCustomPathEx(HANDLE hFolderEntry, char *path, const int size, char *notFound, char *fileName)
-{
- FOLDERSGETDATA fgd = {0};
- INT_PTR res;
- fgd.cbSize = sizeof(FOLDERSGETDATA);
- fgd.nMaxPathSize = size;
- fgd.szPath = path;
- res = CallService(MS_FOLDERS_GET_PATH, (WPARAM) hFolderEntry, (LPARAM) &fgd);
- if (res)
- {
- char buffer[MAX_PATH];
- CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM) notFound, (LPARAM) buffer);
- mir_snprintf(path, size, "%s", buffer);
- }
- if (strlen(path) > 0)
- {
- strcat(path, "\\");
- }
- else{
- path[0] = '\0';
- }
-
- if (fileName)
- {
- strcat(path, fileName);
- }
-
- return res;
-}
-
-__inline static INT_PTR FoldersGetCustomPathExW(HANDLE hFolderEntry, wchar_t *pathW, const int count, wchar_t *notFoundW, wchar_t *fileNameW)
-{
- FOLDERSGETDATA fgd = {0};
- INT_PTR res;
- fgd.cbSize = sizeof(FOLDERSGETDATA);
- fgd.nMaxPathSize = count;
- fgd.szPathW = pathW;
- res = CallService(MS_FOLDERS_GET_PATH, (WPARAM) hFolderEntry, (LPARAM) &fgd);
- if (res)
- {
- wcsncpy(pathW, notFoundW, count);
- pathW[count - 1] = '\0';
- }
-
- if (wcslen(pathW) > 0)
- {
- wcscat(pathW, L"\\");
- }
- else{
- pathW[0] = L'\0';
- }
-
- if (fileNameW)
- {
- wcscat(pathW, fileNameW);
- }
-
- return res;
-}
-
-# ifdef _UNICODE
-# define FoldersGetCustomPathT FoldersGetCustomPathW
-# define FoldersGetCustomPathExT FoldersGetCustomPathExW
-# define FoldersRegisterCustomPathT FoldersRegisterCustomPathW
-#else
-# define FoldersGetCustomPathT FoldersGetCustomPath
-# define FoldersGetCustomPathExT FoldersGetCustomPath
-# define FoldersRegisterCustomPathT FoldersRegisterCustomPath
-#endif
-
-#endif
-
-#endif //M_CUSTOM_FOLDERS_H
\ No newline at end of file diff --git a/nudge/include/m_kbdnotify.h b/nudge/include/m_kbdnotify.h deleted file mode 100644 index 2ab53fe..0000000 --- a/nudge/include/m_kbdnotify.h +++ /dev/null @@ -1,64 +0,0 @@ -/*
-
-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.
-
-*/
-
-#ifndef _KBDNOTIFY_
-#define _KBDNOTIFY_
-
-//Enables all notifications (for use by BossKey)
-//wParam=0
-//lParam=0
-//returns 0
-#define MS_KBDNOTIFY_ENABLE "KeyboardNotify/Enable"
-
-
-//Disables all notifications (for use by BossKey)
-//wParam=0
-//lParam=0
-//returns 0
-#define MS_KBDNOTIFY_DISABLE "KeyboardNotify/Disable"
-
-
-//Makes the flashing begin
-//wParam=(unsigned int)eventCount
-//lParam=(char *)szFlashingSequence or NULL if you want the plugin to use current settings
-//returns 0
-#define MS_KBDNOTIFY_STARTBLINK "KeyboardNotify/StartBlinking"
-
-
-//Receives the number of events that were opened (usuful for the 'until events opened' setting)
-//wParam=(unsigned int)eventCount
-//lParam=0
-//returns 0
-#define MS_KBDNOTIFY_EVENTSOPENED "KeyboardNotify/EventsWereOpened"
-
-
-//Informs if the flashing is active
-//wParam=0
-//lParam=0
-//returns 0 if the flashing is inactive or a pointer to the string representing the sequence being used
-#define MS_KBDNOTIFY_FLASHINGACTIVE "KeyboardNotify/IsFlashingActive"
-
-
-//Normalizes the flashing sequence informed
-//wParam=0
-//lParam=(char *)szFlashingSequence <- it is rewritten
-//returns a pointer to the string representing the sequence normalized (which is in fact lParam)
-#define MS_KBDNOTIFY_NORMALSEQUENCE "KeyboardNotify/NormalizeSequence"
-
-
-#endif
\ No newline at end of file diff --git a/nudge/include/m_metacontacts.h b/nudge/include/m_metacontacts.h deleted file mode 100644 index 9f348bd..0000000 --- a/nudge/include/m_metacontacts.h +++ /dev/null @@ -1,166 +0,0 @@ -/*
-
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright 2004 Universite Louis PASTEUR, STRASBOURG.
-Copyright 2004 Scott Ellis (www.scottellis.com.au mail@scottellis.com.au)
-
-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.
-*/
-
-#ifndef M_METACONTACTS_H__
-#define M_METACONTACTS_H__ 1
-
-#ifndef MIID_METACONTACTS
-#define MIID_METACONTACTS {0xc0325019, 0xc1a7, 0x40f5, { 0x83, 0x65, 0x4f, 0x46, 0xbe, 0x21, 0x86, 0x3e}}
-#endif
-
-//get the handle for a contact's parent metacontact
-//wParam=(HANDLE)hSubContact
-//lParam=0
-//returns a handle to the parent metacontact, or null if this contact is not a subcontact
-#define MS_MC_GETMETACONTACT "MetaContacts/GetMeta"
-
-//gets the handle for the default contact
-//wParam=(HANDLE)hMetaContact
-//lParam=0
-//returns a handle to the default contact, or null on failure
-#define MS_MC_GETDEFAULTCONTACT "MetaContacts/GetDefault"
-
-//gets the contact number for the default contact
-//wParam=(HANDLE)hMetaContact
-//lParam=0
-//returns a DWORD contact number, or -1 on failure
-#define MS_MC_GETDEFAULTCONTACTNUM "MetaContacts/GetDefaultNum"
-
-//gets the handle for the 'most online' contact
-//wParam=(HANDLE)hMetaContact
-//lParam=0
-//returns a handle to the 'most online' contact
-#define MS_MC_GETMOSTONLINECONTACT "MetaContacts/GetMostOnline"
-
-//gets the number of subcontacts for a metacontact
-//wParam=(HANDLE)hMetaContact
-//lParam=0
-//returns a DWORD representing the number of subcontacts for the given metacontact
-#define MS_MC_GETNUMCONTACTS "MetaContacts/GetNumContacts"
-
-//gets the handle of a subcontact, using the subcontact's number
-//wParam=(HANDLE)hMetaContact
-//lParam=(DWORD)contact number
-//returns a handle to the specified subcontact
-#define MS_MC_GETSUBCONTACT "MetaContacts/GetSubContact"
-
-//sets the default contact, using the subcontact's contact number
-//wParam=(HANDLE)hMetaContact
-//lParam=(DWORD)contact number
-//returns 0 on success
-#define MS_MC_SETDEFAULTCONTACTNUM "MetaContacts/SetDefault"
-
-//sets the default contact, using the subcontact's handle
-//wParam=(HANDLE)hMetaContact
-//lParam=(HANDLE)hSubcontact
-//returns 0 on success
-#define MS_MC_SETDEFAULTCONTACT "MetaContacts/SetDefaultByHandle"
-
-//forces the metacontact to send using a specific subcontact, using the subcontact's contact number
-//wParam=(HANDLE)hMetaContact
-//lParam=(DWORD)contact number
-//returns 0 on success
-#define MS_MC_FORCESENDCONTACTNUM "MetaContacts/ForceSendContact"
-
-//forces the metacontact to send using a specific subcontact, using the subcontact's handle
-//wParam=(HANDLE)hMetaContact
-//lParam=(HANDLE)hSubcontact
-//returns 0 on success (will fail if 'force default' is in effect)
-#define MS_MC_FORCESENDCONTACT "MetaContacts/ForceSendContactByHandle"
-
-//'unforces' the metacontact to send using a specific subcontact
-//wParam=(HANDLE)hMetaContact
-//lParam=0
-//returns 0 on success (will fail if 'force default' is in effect)
-#define MS_MC_UNFORCESENDCONTACT "MetaContacts/UnforceSendContact"
-
-//'forces' or 'unforces' (i.e. toggles) the metacontact to send using it's default contact
-// overrides (and clears) 'force send' above, and will even force use of offline contacts
-// will send ME_MC_FORCESEND or ME_MC_UNFORCESEND event
-//wParam=(HANDLE)hMetaContact
-//lParam=0
-//returns 1(true) or 0(false) representing new state of 'force default'
-#define MS_MC_FORCEDEFAULT "MetaContacts/ForceSendDefault"
-
-// method to get state of 'force' for a metacontact
-// wParam=(HANDLE)hMetaContact
-// lParam= (DWORD)&contact_number or NULL
-//
-// if lparam supplied, the contact_number of the contatct 'in force' will be copied to the address it points to,
-// or if none is in force, the value (DWORD)-1 will be copied
-// (v0.8.0.8+ returns 1 if 'force default' is true with *lParam == default contact number, else returns 0 with *lParam as above)
-#define MS_MC_GETFORCESTATE "MetaContacts/GetForceState"
-
-// fired when a metacontact's default contact changes (fired upon creation of metacontact also, when default is initially set)
-// wParam=(HANDLE)hMetaContact
-// lParam=(HANDLE)hDefaultContact
-#define ME_MC_DEFAULTTCHANGED "MetaContacts/DefaultChanged"
-
-// fired when a metacontact's subcontacts change (fired upon creation of metacontact, when contacts are added or removed, and when
-// contacts are reordered) - a signal to re-read metacontact data
-// wParam=(HANDLE)hMetaContact
-// lParam=0
-#define ME_MC_SUBCONTACTSCHANGED "MetaContacts/SubcontactsChanged"
-
-// fired when a metacontact is forced to send using a specific subcontact
-// wParam=(HANDLE)hMetaContact
-// lParam=(HANDLE)hForceContact
-#define ME_MC_FORCESEND "MetaContacts/ForceSend"
-
-// fired when a metacontact is 'unforced' to send using a specific subcontact
-// wParam=(HANDLE)hMetaContact
-// lParam=0
-#define ME_MC_UNFORCESEND "MetaContacts/UnforceSend"
-
-// method to get protocol name - used to be sure you're dealing with a "real" metacontacts plugin :)
-// wParam=lParam=0
-#define MS_MC_GETPROTOCOLNAME "MetaContacts/GetProtoName"
-
-
-// added 0.9.5.0 (22/3/05)
-// wParam=(HANDLE)hContact
-// lParam=0
-// convert a given contact into a metacontact
-#define MS_MC_CONVERTTOMETA "MetaContacts/ConvertToMetacontact"
-
-// added 0.9.5.0 (22/3/05)
-// wParam=(HANDLE)hContact
-// lParam=(HANDLE)hMeta
-// add an existing contact to a metacontact
-#define MS_MC_ADDTOMETA "MetaContacts/AddToMetacontact"
-
-// added 0.9.5.0 (22/3/05)
-// wParam=0
-// lParam=(HANDLE)hContact
-// remove a contact from a metacontact
-#define MS_MC_REMOVEFROMMETA "MetaContacts/RemoveFromMetacontact"
-
-
-// added 0.9.13.2 (6/10/05)
-// wParam=(BOOL)disable
-// lParam=0
-// enable/disable the 'hidden group hack' - for clists that support subcontact hiding using 'IsSubcontact' setting
-// should be called once in the clist 'onmodulesloaded' event handler (which, since it's loaded after the db, will be called
-// before the metacontact onmodulesloaded handler where the subcontact hiding is usually done)
-#define MS_MC_DISABLEHIDDENGROUP "MetaContacts/DisableHiddenGroup"
-
-#endif
diff --git a/nudge/include/m_msg_buttonsbar.h b/nudge/include/m_msg_buttonsbar.h deleted file mode 100644 index 8a55627..0000000 --- a/nudge/include/m_msg_buttonsbar.h +++ /dev/null @@ -1,120 +0,0 @@ -#ifndef M_MSG_BUTTONSBAR_H__
-#define M_MSG_BUTTONSBAR_H__
-
-//////////////////////////////////////////////////////////////////////////
-// Services
-//
-//////////////////////////////////////////////////////////////////////////
-// Adding a button
-//
-// wParam = 0
-// lParam = (BBButton *) &description
-#define MS_BB_ADDBUTTON "TabSRMM/ButtonsBar/AddButton"
-
-//////////////////////////////////////////////////////////////////////////
-// Remove button
-//
-// wParam = 0
-// lParam = (BBButton *) &description, only button ID and ModuleName used
-#define MS_BB_REMOVEBUTTON "TabSRMM/ButtonsBar/RemoveButton"
-
-//////////////////////////////////////////////////////////////////////////
-// ModifyButton(global)
-//
-// wParam = 0
-// lParam = (BBButton *) &description
-#define MS_BB_MODIFYBUTTON "TabSRMM/ButtonsBar/ModifyButton"
-
-
-#define BBSF_HIDDEN (1<<0)
-#define BBSF_DISABLED (1<<1)
-#define BBSF_PUSHED (1<<2)
-#define BBSF_RELEASED (1<<3)
-
-//////////////////////////////////////////////////////////////////////////
-// GetButtonState(local)
-//
-// wParam = hContact
-// lParam = (BBButton *) &description , only ModuleName and ID used
-// Returns BBButton struct with BBSF_ bbbFlags:
-#define MS_BB_GETBUTTONSTATE "TabSRMM/ButtonsBar/GetButtonState"
-
-//////////////////////////////////////////////////////////////////////////
-// SetButtonState (local)
-//
-// wParam = hContact
-// lParam = (BBButton *) &description , ModuleName, ID,hIcon,Tooltip, and BBSF_ bbbFlags are used
-#define MS_BB_SETBUTTONSTATE "TabSRMM/ButtonsBar/SetButtonState"
-
-
-////////////////////////////////////////////////////////////////
-//Events
-//
-///////////////////////////////////////////////////
-// ToolBar loaded event
-// wParam = 0;
-// lParam = 0;
-// This event will be send after module loaded and after each toolbar reset
-// You should add your buttons on this event
-#define ME_MSG_TOOLBARLOADED "TabSRMM/ButtonsBar/ModuleLoaded"
-
-///////////////////////////////////////////////////
-// ButtonClicked event
-// wParam = (HANDLE)hContact;
-// lParam = (CustomButtonClickData *)&CustomButtonClickData;
-// catch to show a popup menu, etc.
-#define ME_MSG_BUTTONPRESSED "TabSRMM/ButtonsBar/ButtonPressed"
-
-
-//event flags
-#define BBCF_RIGHTBUTTON (1<<0)
-#define BBCF_SHIFTPRESSED (1<<1)
-#define BBCF_CONTROLPRESSED (1<<2)
-#define BBCF_ARROWCLICKED (1<<3)
-
-typedef struct {
- int cbSize;
- POINT pt; // screen coordinates for menus
- char* pszModule; // button owners name
- DWORD dwButtonId; // registered button ID
- HWND hwndFrom; // button parents HWND
- HANDLE hContact; //
- DWORD flags; // BBCF_ flags
- } CustomButtonClickData;
-
-
-//button flags
-#define BBBF_DISABLED (1<<0)
-#define BBBF_HIDDEN (1<<1)
-#define BBBF_ISPUSHBUTTON (1<<2)
-#define BBBF_ISARROWBUTTON (1<<3)
-#define BBBF_ISCHATBUTTON (1<<4)
-#define BBBF_ISIMBUTTON (1<<5)
-#define BBBF_ISLSIDEBUTTON (1<<6)
-#define BBBF_ISRSIDEBUTTON (1<<7)
-#define BBBF_CANBEHIDDEN (1<<8)
-#define BBBF_ISDUMMYBUTTON (1<<9)
-#define BBBF_ANSITOOLTIP (1<<10)
-
-#define BBBF_CREATEBYID (1<<11) //only for tabsrmm internal use
-
-typedef struct _tagBBButton
- {
- int cbSize; // size of structure
-
- DWORD dwButtonID; // your button ID, will be combined with pszModuleName for storing settings, etc...
-
- char* pszModuleName; //module name without spaces and underline symbols (e.g. "tabsrmm")
- union{
- char* pszTooltip; //button's tooltip
- TCHAR* ptszTooltip;
- };
- DWORD dwDefPos; // default order pos of button, counted from window edge (left or right)
- // use value >100, because internal buttons using 10,20,30... 80, etc
- int iButtonWidth; // must be 0
- DWORD bbbFlags; // combine of BBBF_ flags above
- HANDLE hIcon; //Handle to icolib registered icon, it's better to register with pszSection = "TabSRMM/Toolbar"
- }BBButton;
-
-
-#endif //M_MSG_BUTTONSBAR_H__
\ No newline at end of file diff --git a/nudge/include/m_popup.h b/nudge/include/m_popup.h deleted file mode 100644 index 9e5f179..0000000 --- a/nudge/include/m_popup.h +++ /dev/null @@ -1,318 +0,0 @@ -/*
-===============================================================================
- PopUp plugin
-Plugin Name: PopUp
-Plugin authors: Luca Santarelli aka hrk (hrk@users.sourceforge.net)
- Victor Pavlychko aka zazoo (nullbie@gmail.com)
-===============================================================================
-The purpose of this plugin is to give developers a common "platform/interface"
-to show PopUps. It is born from the source code of NewStatusNotify, another
-plugin I've made.
-
-Remember that users *must* have this plugin enabled, or they won't get any
-popup. Write this in the requirements, do whatever you wish ;-)... but tell
-them!
-===============================================================================
-*/
-#ifndef M_POPUP_H
-#define M_POPUP_H
-
-/*
-NOTE! Since Popup 1.0.1.2 there is a main meun group called "PopUps" where I
-have put a "Enable/Disable" item. You can add your own "enable/disable" items
-by adding these lines before you call MS_CLIST_ADDMAINMENUITEM:
-mi.pszPopUpName = Translate("PopUps");
-mi.position = 0; //You don't need it and it's better if you put it to zero.
-*/
-
-//#define MAX_CONTACTNAME 32
-//#define MAX_SECONDLINE 40
-#define MAX_CONTACTNAME 2048
-#define MAX_SECONDLINE 2048
-
-#define POPUP_USE_SKINNED_BG 0xffffffff
-
-//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.
- char lpzContactName[MAX_CONTACTNAME]; //This is the contact name or the first line in the plugin. Cannot be NULL.
- char lpzText[MAX_SECONDLINE]; //This is the second line text. Users can choose to hide it. Cannot be NULL.
- 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;
-
-typedef struct {
- HANDLE lchContact;
- HICON lchIcon;
- char lpzContactName[MAX_CONTACTNAME];
- char lpzText[MAX_SECONDLINE];
- COLORREF colorBack; //Set background to POPUP_USE_SKINNED_BG to turn on skinning
- COLORREF colorText;
- WNDPROC PluginWindowProc;
- void * PluginData;
- int iSeconds; //Custom delay time in seconds. -1 means "forever", 0 means "default time".
-// char cZero[16];
- LPCTSTR lpzClass; //PopUp class. Used with skinning. See PopUp/AddClass for details
- COLORREF skinBack; //Background color for colorizable skins
- char cZero[16 - sizeof(LPCTSTR) - sizeof(COLORREF)];
- //some unused bytes which may come useful in the future.
-} POPUPDATAEX, *LPPOPUPDATAEX;
-
-/*
-When you call MS_POPUP_ADDPOPUP, my plugin will check if the given POPUPDATA structure is filled with acceptable values. If not, the data will be rejected and no popup will be shown.
-
-- lpzText should be given, because it's really bad if a user chooses to have the second line displayed
-and it's empty :-) Just write it and let the user choose if it will be displayed or not.
-
-- PluginWindowProc is a WNDPROC address you have to give me. Why? What? Where? Calm down 8)
-My plugin will take care of the creation of the popup, of the destruction of the popup, of the come into
-view and the hiding of the popup. Transparency, animations... all this stuff.
-My plugin will not (as example) open the MessageWindow when you left click on a popup.
-Why? Because I don't know if your popup desires to open the MessageWindow :))))
-This means that you need to make a WNDPROC which takes care of the WM_messages you need.
-For example, WM_COMMAND or WM_CONTEXTMENU or WM_LMOUSEUP or whatever.
-At the end of your WNDPROC remember to "return DefWindowProc(hwnd, msg, wParam, lParam);"
-When you process a message that needs a return value (an example could be WM_CTLCOLORSTATIC,
-but you don't need to catch it 'cause it's my plugin's job), simply return the nedeed value. :)
-The default WNDPROC does nothing.
-
-- PluginData is a pointer to a void, which means a pointer to anything. You can make your own structure
-to store the data you need (example: a status information, a date, your name, whatever) and give me a
-pointer to that struct.
-You will need to destroy that structure and free the memory when the PopUp is going to be destroyed. You'll know this when you receive a UM_FREEPLUGINDATA. The name tells it all: free your own plugin data.
-
-Appendix A: Messages my plugin will handle and your WNDPROC will never see.
-WM_CREATE, WM_DESTROY, WM_TIMER, WM_ERASEBKGND
-WM_CTLCOLOR* [whatever it may be: WM_CTLCOLORDLG, WM_CTLCOLORSTATIC...]
-WM_PAINT, WM_PRINT, WM_PRINTCLIENT
-
-Appendix B: "What do I need to do?!?".
-Here is an example in C.
-
-//Your plugin is in /plugins/myPlugin/ or in miranda32/something/
-#include "../../plugins/PopUp/m_popup.h"
-
-Define your own plugin data if you need it. In this example, we need it and we'll use NewStatusNotify as example: thsi plugin shows a popup when someone in your contact list changes his/hers status. We'll need to know his status, both current and old one.
-typedef struct {
- WORD oldStatus;
- WORD newStatus;
-} MY_PLUGIN_DATA;
-
-When we need to show the popup, we do:
-{
- POPUPDATA ppd;
- hContact = A_VALID_HANDLE_YOU_GOT_FROM_SOMEWHERE;
- hIcon = A_VALID_HANDLE_YOU_GOT_SOMEWHERE;
- char * lpzContactName = (char*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME,(WPARAM)lhContact,0);
- //99% of the times you'll just copy this line.
- //1% of the times you may wish to change the contact's name. I don't know why you should, but you can.
- char * lpzText;
- //The text for the second line. You could even make something like: char lpzText[128]; lstrcpy(lpzText, "Hello world!"); It's your choice.
- COLORREF colorBack = GetSysColor(COLOR_BTNFACE); //The colour of Miranda's option Pages (and many other windows...)
- COLORREF colorText = RGB(255,255,255); //White.
- MY_PLUGIN_DATA * mpd = (MY_PLUGIN_DATA*)malloc(sizeof(MY_PLUGIN_DATA));
-
- 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.
- ppd.lchIcon = hIcon;
- lstrcpy(ppd.lpzContactName, lpzContactName);
- lstrcpy(ppd.lpzText, lpzText);
- ppd.colorBack = colorBack;
- ppd.colorText = colorText;
- ppd.PluginWindowProc = (WNDPROC)PopupDlgProc;
-
- //Now the "additional" data.
- mpd->oldStatus = ID_STATUS_OFFLINE;
- mpd->newStatus = ID_STATUS_ONLINE;
-
- //Now that the plugin data has been filled, we add it to the PopUpData.
- ppd.PluginData = mpd;
-
- //Now that every field has been filled, we want to see the popup.
- CallService(MS_POPUP_ADDPOPUP, (WPARAM)&ppd, 0);
-}
-
-Obviously, you have previously declared some:
-static int CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
-{
- switch(message) {
- case WM_COMMAND:
- if ((HIWORD)wParam == STN_CLICKED) { //It was a click on the Popup.
- PUDeletePopUp(hWnd);
- return TRUE;
- }
- break;
- case UM_FREEPLUGINDATA: {
- MY_PLUGIN_DATA * mpd = NULL;
- mpd = (MY_PLUGIN_DATA*)CallService(MS_POPUP_GETPLUGINDATA, (WPARAM)hWnd,(LPARAM)mpd);
- if (mdp > 0) free(mpd);
- return TRUE; //TRUE or FALSE is the same, it gets ignored.
- }
- default:
- break;
- }
- return DefWindowProc(hWnd, message, wParam, lParam);
-}
-*/
-
-/*
-Creates, adds and shows a popup, given a (valid) POPUPDATA structure pointer.
-wParam = (WPARAM)(*POPUPDATA)PopUpDataAddress
-lParam = 0
-Returns: > 0 on success, 0 if creation went bad, -1 if the PopUpData contained unacceptable values.
-NOTE: it returns -1 if the PopUpData was not valid, if there were already too many popups, if the module was disabled.
-Otherwise, it can return anything else...
-*/
-#define MS_POPUP_ADDPOPUP "PopUp/AddPopUp"
-static int __inline PUAddPopUp(POPUPDATA* ppdp) {
- return CallService(MS_POPUP_ADDPOPUP, (WPARAM)ppdp,0);
-}
-
-#define MS_POPUP_ADDPOPUPEX "PopUp/AddPopUpEx"
-static int __inline PUAddPopUpEx(POPUPDATAEX* ppdp) {
- return CallService(MS_POPUP_ADDPOPUPEX, (WPARAM)ppdp,0);
-}
-
-/*
-Returns the handle to the contact associated to the specified PopUpWindow.
-You will probably need to know this handle inside your WNDPROC. Exampole: you want to open the MessageWindow. :-)
-Call MS_POPUP_GETCONTACT on the hWnd you were given in the WNDPROC.
-wParam = (WPARAM)(HWND)hPopUpWindow
-lParam = 0;
-Returns: the HANDLE of the contact. Can return NULL, meaning it's the main contact. -1 means failure.
-*/
-#define MS_POPUP_GETCONTACT "PopUp/GetContact"
-static HANDLE __inline PUGetContact(HWND hPopUpWindow) {
- return (HANDLE)CallService(MS_POPUP_GETCONTACT, (WPARAM)hPopUpWindow,0);
-}
-
-/*
-wParam = (WPARAM)(HWND)hPopUpWindow
-lParam = (LPARAM)(PLUGINDATA*)PluginDataAddress;
-Returns: the address of the PLUGINDATA structure. Can return NULL, meaning nothing was given. -1 means failure.
-IMPORTANT NOTE: it doesn't seem to work if you do:
-CallService(..., (LPARAM)aPointerToAStruct);
-and then use that struct.
-Do this, instead:
-aPointerToStruct = CallService(..., (LPARAM)aPointerToAStruct);
-and it will work. Just look at the example I've written above (PopUpDlgProc).
-*/
-#define MS_POPUP_GETPLUGINDATA "PopUp/GetPluginData"
-static void __inline * PUGetPluginData(HWND hPopUpWindow) {
- long * uselessPointer = NULL;
- return (void*)CallService(MS_POPUP_GETPLUGINDATA,(WPARAM)hPopUpWindow,(LPARAM)uselessPointer);
-}
-
-/*
-wParam = 0
-lParam = 0
-Returns: 0 if the user has chosen not to have the second line, 1 if he choose to have the second line.
-*/
-#define MS_POPUP_ISSECONDLINESHOWN "PopUp/IsSecondLineShown"
-static BOOL __inline PUIsSecondLineShown() {
- return (BOOL)CallService(MS_POPUP_ISSECONDLINESHOWN,0,0);
-}
-
-/*
-Requests an action or an answer from PopUp module.
-wParam = (WPARAM)wpQuery
-returns 0 on success, -1 on error, 1 on stupid calls ;-)
-*/
-#define PUQS_ENABLEPOPUPS 1 //returns 0 if state was changed, 1 if state wasn't changed
-#define PUQS_DISABLEPOPUPS 2 // " "
-#define PUQS_GETSTATUS 3 //Returns 1 (TRUE) if popups are enabled, 0 (FALSE) if popups are disabled.
-
-#define MS_POPUP_QUERY "PopUp/Query"
-
-/*
-UM_FREEPLUGINDATA
-wParam = lParam = 0. Process this message if you have allocated your own memory. (i.e.: POPUPDATA.PluginData != NULL)
-*/
-#define UM_FREEPLUGINDATA (WM_USER + 0x0200)
-
-/*
-UM_DESTROYPOPUP
-wParam = lParam = 0. Send this message when you want to destroy the popup, or use the function below.
-*/
-#define UM_DESTROYPOPUP (WM_USER + 0x0201)
-static int __inline PUDeletePopUp(HWND hWndPopUp) {
- return (int)SendMessage(hWndPopUp, UM_DESTROYPOPUP,0,0);
-}
-
-/*
-UM_INITPOPUP
-wParam = (WPARAM)(HWND)hPopUpWindow (but this is useless, since I'll directly send it to your hPopUpWindow
-lParam = 0.
-This message is sent to the PopUp when its creation has been finished, so POPUPDATA (and thus your PluginData) is reachable.
-Catch it if you needed to catch WM_CREATE or WM_INITDIALOG, which you'll never ever get in your entire popup-life.
-Return value: if you process this message, return 0. If you don't process it, return 0. Do whatever you like ;-)
-*/
-#define UM_INITPOPUP (WM_USER + 0x0202)
-
-/*
-wParam = (WPARAM)(HWND)hPopUpWindow
-lParam = (LPARAM)(char*)lpzNewText
-returns: > 0 for success, -1 for failure, 0 if the failure is due to second line not being shown. (but you could call PUIsSecondLineShown() before changing the text...)
-Changes the text displayed in the second line of the popup.
-*/
-#define MS_POPUP_CHANGETEXT "PopUp/Changetext"
-static int __inline PUChangeText(HWND hWndPopUp, LPCTSTR lpzNewText) {
- return (int)CallService(MS_POPUP_CHANGETEXT, (WPARAM)hWndPopUp, (LPARAM)lpzNewText);
-}
-
-/*
-wParam = (WPARAM)(HWND)hPopUpWindow
-lParam = (LPARAM)(POPUPDATAEX*)newData
-Changes the entire popup
-*/
-#define MS_POPUP_CHANGE "PopUp/Change"
-static int __inline PUChange(HWND hWndPopUp, POPUPDATAEX *newData) {
- return (int)CallService(MS_POPUP_CHANGE, (WPARAM)hWndPopUp, (LPARAM)newData);
-}
-
-/*
-This is mainly for developers.
-Shows a warning message in a PopUp. It's useful if you need a "MessageBox" like function, but you don't want a modal window (which will interfere with a DialogProcedure. MessageBox steals focus and control, this one not.
-wParam = (char*) lpzMessage
-lParam = 0;
-Returns: 0 if the popup was shown, -1 in case of failure.
-*/
-#define SM_WARNING 0x01 //Triangle icon.
-#define SM_NOTIFY 0x02 //Exclamation mark icon.
-#define MS_POPUP_SHOWMESSAGE "PopUp/ShowMessage"
-
-static int __inline PUShowMessage(char* lpzText, BYTE kind) {
- return (int)CallService(MS_POPUP_SHOWMESSAGE, (WPARAM)lpzText,(LPARAM)kind);
-}
-
-/*
-Each skinned popup (e.g. with colorBack == POPUP_USE_SKINNED_BG) should have
-class set. Then you can choose separate skin for each class (for example, you
-can create separate class for your plugin and use it for all ypu popups. User
-would became able to choose skin for your popups independently from others)
-
-You have to register popup class before using it. To do so call "PopUp/AddClass"
-with lParam = (LPARAM)(const char *)popUpClassName.
-
-All class names are translated (via Translate()) before being added to list. You
-should use english names for them.
-
-There are three predefined classes and one for backward compatability.
-
-Note that you can add clases after popup wal loaded, e.g. you shoul intercept
-ME_SYSTEM_MODULESLOADED event
-*/
-#define MS_POPUP_ADDCLASS "PopUp/AddClass"
-#define POPUP_CLASS_DEFAULT "Default"
-#define POPUP_CLASS_WARNING "Warning"
-#define POPUP_CLASS_NOTIFY "Notify"
-#define POPUP_CLASS_OLDAPI "PopUp 1.0.1.x compatability" // for internal purposes
-
-static void __inline PUAddClass(const char *lpzClass){
- CallService(MS_POPUP_ADDCLASS, 0, (LPARAM)lpzClass);
-}
-
-#endif
diff --git a/nudge/include/m_popupw.h b/nudge/include/m_popupw.h deleted file mode 100644 index c0cac41..0000000 --- a/nudge/include/m_popupw.h +++ /dev/null @@ -1,56 +0,0 @@ -/*
-===============================================================================
- PopUp plugin
-Plugin Name: PopUp
-Plugin authors: Luca Santarelli aka hrk (hrk@users.sourceforge.net)
- Victor Pavlychko aka zazoo (nullbie@gmail.com)
-===============================================================================
-The purpose of this plugin is to give developers a common "platform/interface"
-to show PopUps. It is born from the source code of NewStatusNotify, another
-plugin I've made.
-
-Remember that users *must* have this plugin enabled, or they won't get any
-popup. Write this in the requirements, do whatever you wish ;-)... but tell
-them!
-===============================================================================
-*/
-#ifndef M_POPUPW_H
-#define M_POPUPW_H
-
-#ifndef MAX_CONTACTNAME
- #define MAX_CONTACTNAME 2048
-#endif
-
-#ifndef MAX_SECONDLINE
- #define MAX_SECONDLINE 2048
-#endif
-
-// Unicode Popup Info
-typedef struct {
- HANDLE lchContact;
- HICON lchIcon;
- WCHAR lpwzContactName[MAX_CONTACTNAME];
- WCHAR lpwzText[MAX_SECONDLINE];
- COLORREF colorBack;
- COLORREF colorText;
- WNDPROC PluginWindowProc;
- 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.
-} POPUPDATAW, *LPPOPUPDATAW;
-
-// Create Popup
-#define MS_POPUP_ADDPOPUPW "PopUp/AddPopUpW"
-
-static int __inline PUAddPopUpW(POPUPDATAW* ppdp) {
- return CallService(MS_POPUP_ADDPOPUPW, (WPARAM)ppdp,0);
-}
-
-// Change Text
-#define MS_POPUP_CHANGETEXTW "PopUp/ChangetextW"
-
-static int __inline PUChangeTextW(HWND hWndPopUp, LPCWSTR lpwzNewText) {
- return (int)CallService(MS_POPUP_CHANGETEXTW, (WPARAM)hWndPopUp, (LPARAM)lpwzNewText);
-}
-
-#endif
diff --git a/nudge/include/m_toptoolbar.h b/nudge/include/m_toptoolbar.h deleted file mode 100644 index 22aef67..0000000 --- a/nudge/include/m_toptoolbar.h +++ /dev/null @@ -1,105 +0,0 @@ -
-#ifndef M_TOPTOOLBAR_H
-#define M_TOPTOOLBAR_H
-
-//button flags
-#define TTBBF_DISABLED 1
-#define TTBBF_VISIBLE 2
-#define TTBBF_PUSHED 4
-#define TTBBF_SHOWTOOLTIP 8
-#define TTBBF_DRAWBORDER 16//draw border for bitmap,bitmap must be WxH 16x12
-
-
-typedef struct {
- int cbSize;
- HBITMAP hbBitmapUp;
- HBITMAP hbBitmapDown;
- char *pszServiceUp;
- char *pszServiceDown;
- DWORD dwFlags;
- LPARAM lParamUp;
- WPARAM wParamUp;
- LPARAM lParamDown;
- WPARAM wParamDown;
- char *name;
-
-} TTBButton, * lpTTBButton;
-
-//=== EVENTS ===
-/*
-toptoolbar/moduleloaded event
-wParam = lParam = 0
-Called when the toolbar services are available
-
-!!!Warning you may work with TTB services only in this event or later.
-
-Im use settimer() - so notify appear in miranda message loop
-after all onmodulesload calls.
-*/
-#define ME_TTB_MODULELOADED "TopToolBar/ModuleLoaded"
-
-
-
-//=== SERVICES ===
-/*
-toptoolbar/addbutton service
-wparam = (TTBButton*)lpTTBButton
-lparam = 0
-returns: hTTBButton - handle of added button on success, -1 on failure.
-*/
-#define MS_TTB_ADDBUTTON "TopToolBar/AddButton"
-
-/*
-toptoolbar/removebutton service
-wparam = (HANDLE)hTTButton
-lparam = 0
-returns: 0 on success, -1 on failure.
-*/
-#define MS_TTB_REMOVEBUTTON "TopToolBar/RemoveButton"
-
-/*
-toptoolbar/setstate service
-wparam = (HANDLE)hTTButton
-lparam = (LPARAM) state
-returns: 0 on success, -1 on failure.
-*/
-#define TTBST_PUSHED 1
-#define TTBST_RELEASED 2
-
-#define MS_TTB_SETBUTTONSTATE "TopToolBar/SetState"
-
-/*
-toptoolbar/getstate service
-wparam = (HANDLE)hTTButton
-lparam = 0
-returns: state on success, -1 on failure.
-*/
-#define MS_TTB_GETBUTTONSTATE "TopToolBar/GetState"
-
-/*
-toptoolbar/getoptions service
-(HIWORD)wparam = (HANDLE)hTTButton
-(LOWORD)wparam = TTBO_FLAG
-lparam = 0,or lparam=lpTTBButton if flag=TTBO_ALLDATA
-returns: value on success, -1 on failure.
-*/
-#define TTBO_FLAGS 0 //get/set all flags
-#define TTBO_POS 1 //position
-#define TTBO_WIDTH 2 //not impemented
-#define TTBO_HEIGHT 3 //not impemented
-#define TTBO_TIPNAME 4 //tool tip name
-#define TTBO_ALLDATA 5 //change all data via lparam=lpTTBButton
-
-
-#define MS_TTB_GETBUTTONOPTIONS "TopToolBar/GetOptions"
-
-/*
-toptoolbar/setoptions service
-(HIWORD)wparam = (HANDLE)hTTButton
-(LOWORD)wparam = TTBO_FLAG
-lparam = value
-returns: 1 on success, -1 on failure.
-*/
-#define MS_TTB_SETBUTTONOPTIONS "TopToolBar/SetOptions"
-
-#endif
\ No newline at end of file diff --git a/nudge/include/m_trigger.h b/nudge/include/m_trigger.h deleted file mode 100644 index b5294bd..0000000 --- a/nudge/include/m_trigger.h +++ /dev/null @@ -1,1004 +0,0 @@ -#ifndef __M_TRIGGER_H__
-#define __M_TRIGGER_H__
-
-#if !defined(_TCHAR_DEFINED)
-#include <tchar.h>
-#endif
-#include "m_utils.h"
-
-// --------------------------------------------------------------------------
-// Triggers
-// --------------------------------------------------------------------------
-
-// This section explains how to create your own trigger. A trigger can be seen
-// as an event which can result in a set of actions that will be performed.
-// Implementing a trigger consists of two parts. First, you register a trigger
-// with MS_TRIGGER_REGISTERTRIGGER to allow a user to configure it in the
-// options dialog. Second, when the event occurs belonging to your registered
-// trigger, you inform the trigger plugin with MS_TRIGGER_REPORTEVENT. You can
-// send a 'payload' together with this notification. This payload, called
-// 'TriggerData', can consist of a certain contact, protocol, status and/or a
-// piece of text.
-
-// --------------------------------------------------------------------------
-// Triggers: Register a trigger
-// --------------------------------------------------------------------------
-
-#define MS_TRIGGER_REGISTERTRIGGER "/TriggerPlugin/RegisterTrigger"
-
-// Parameters:
-// ------------------------
-// wParam = (WPARAM)0
-// lParam = (LPARAM)(TRIGGERREGISTER *)&tr
-// Pointer to a structure describing the trigger to add (see below).
-
-// Return Value:
-// ------------------------
-// Returns 0 on success, nozero otherwise. Registering an already existing
-// trigger will replace this previously registered trigger.
-
-typedef struct {
- int cbSize; // Set to sizeof(TRIGGERREGISTER).
- char *pszName; // Used as identifier and shown in the options dialog, must
- // be unique.
- HINSTANCE hInstance; // Only needed when options screen is available.
- DLGPROC pfnDlgProc; // Optional, the callback procedure for the options page.
- char *pszTemplate; // Optional, template for the options page; must be
- // WS_CHILD.
- int flags; // Flags, see below.
- int dFlags; // Specify the default DF_* flags which your trigger can send
- // (see below).
-} TRIGGERREGISTER;
-
-// Flags
-#define TRF_NOEXPORT 0x01 // This trigger cannot be exported. Set this flag
- // in case you stored settings not using the helper
- // functions at the end of this header. On export,
- // TriggerPlugin will search for these settings
- // and export them automatically. Contact-specific
- // settings are never exported.
-
-// Please specify the dFlags to indicate what kind of data your trigger is
-// able to send as TriggerData. Please specify the maximum set, if your trigger
-// does not always send a certain data, please specify it anyway.
-
-#define DF_CONTACT 0x01 // The trigger might send a contact handle with the
- // TriggerData.
-#define DF_PROTO 0x02 // The trigger might send a protocol ID with the
- // TriggerData.
-#define DF_STATUS 0x04 // The trigger might send a status code with the
- // TriggerData.
-#define DF_TEXT 0x08 // The trigger might send a string with the
- // TriggerData.
-#define DF_LPARAM 0x10 // The trigger might send a custom parameter with the
- // TriggerData.
-#define DF_UNICODE 0x20 // The trigger processes WCHAR strings.
-
-#if defined(UNICODE) || defined(_UNICODE)
-#define DF_TCHAR DF_UNICODE // Strings in structure are TCHAR*.
-#else
-#define DF_TCHAR 0
-#endif
-
-// Dialog Messages
-// The following message should be processed by your options dialog procedure,
-// if available. You can create an options dialog to give the user the
-// possibility to report your event only under certain circumstances. Each
-// trigger is assigned a certain ID. This ID can be used to store the settings
-// for your trigger.
-
-// WM_INITDIALOG
-
-// Parameters:
-// ------------------------
-// lParam = (LPARAM)(DWORD)triggerID
-// The trigger ID for which the options are to be set. This can be a new ID
-// or an ID of a trigger which is being edited. Initialize your options
-// dialog accordingly. There are helper function at the end of this header
-// file to read your settings for a certain trigger ID.
-
-#define TM_ADDTRIGGER WM_APP+10
-
-// TM_ADDTRIGGER
-// 'OK' is pressed and a new trigger will be added. Save your settings using
-// the given trigger ID.
-
-// Parameters:
-// ------------------------
-// wParam = (WPARAM)(DWORD)triggerID
-// The trigger ID for which the settings are to be stored. There are helper
-// function at the end of this header file to store your settings with a
-// certain trigger ID.
-// lParam = 0
-
-#define TM_DELTRIGGER WM_APP+11
-
-// TM_DELTRIGGER
-// The trigger addociated with the given trigger ID will be removed.
-
-// Parameters:
-// ------------------------
-// wParam = (WPARAM)(DWORD)triggerID
-// The trigger ID for which the settings are to be removed. There is a
-// helper service at the end of this header file to easily cleanup settings
-// for a certain trigger ID.
-// lParam = 0
-
-// --------------------------------------------------------------------------
-// Triggers: Report the Event
-// --------------------------------------------------------------------------
-
-// When the event occurs, you report it with MS_TRIGGER_REPORTEVENT. If your
-// trigger is configurable, so it has an options screen, you might want to
-// report your trigger for certain trigger ID's only. Please use the
-// MS_TRIGGER_FINDNEXTTRIGGERID to enumerate over the trigger ID's associated
-// with your trigger in the correct order as specified by the user. It's up
-// to you to found out whether or not the trigger is to be reported for a
-// certain ID.
-
-#define MS_TRIGGER_FINDNEXTTRIGGERID "/TriggerPlugin/FindNextTriggerID"
-
-// Enumerate over the associated trigger ID's for your trigger in the correct
-// order.
-
-// Parameters:
-// ------------------------
-// wParam = (WPARAM)(DWORD)triggerID
-// 0 to retrieve the first trigger ID for your trigger or the previous ID
-// returned by this service to get the next one.
-// lParam = 0
-
-// Return Value:
-// ------------------------
-// Returns the next trigger ID given the parameter or 0 if no more trigger IDs
-// are available.
-
-#define MS_TRIGGER_REPORTEVENT "/TriggerPlugin/ReportEvent"
-
-// Report your event for further processing. This can be a general event for
-// which no individual settings exist, or a specific event for a given
-// trigger ID.
-
-// Parameters:
-// ------------------------
-// wParam = 0
-// lParam = (LPARAM)(REPORTINFO *)&ri
-// See below.
-
-// Return Value:
-// ------------------------
-// Returns CRV_TRUE if all conditions specific to this trigger hold and the
-// chain was executed. Returns CRV_FALSE if these conditions did not hold and
-// the chain were not processed.
-
-// The structure below can be used to send TriggerData with your trigger. This
-// can be used by the associated conditions and actions.
-
-typedef struct {
- int cbSize; // Set to sizeof(TRIGGERDATA)
- int dFlags; // Indicate which members are valid using the DF_* flags (see
- // above).
- HANDLE hContact; // Associate a contact handle to this event.
- char *szProto; // Associate a protocol ID to this event.
- int status; // Associcate a status code to this event.
- union {
- char *szText; // Associate a string to this event.
- TCHAR *tszText;
- WCHAR *wszText;
- };
- LPARAM lParam; // Associate custom data to this trigger.
-} TRIGGERDATA;
-
-typedef struct {
- int cbSize; // Set to sizeof(REPORTINFO).
- DWORD triggerID; // The trigger ID of the event to trigger or 0 if this does
- // not apply.
- char *pszName; // The name of the trigger (this may be NULL if triggerID is
- // not 0).
- int flags; // On of the TRG_* flags, see below.
- TRIGGERDATA *td; // Optional, the associated TriggerData, see above.
-} REPORTINFO;
-
-#define TRG_PERFORM 0x01 // Indicates the event for this trigger actually
- // occured and needs to be processed accordingly.
-#define TRG_CLEANUP 0x02 // Indicates the trigger instructs to remove the
- // itself and all associated information. This can
- // be used for "one time triggers". Remove your own
- // settings by yourself.
-
-// --------------------------------------------------------------------------
-// Actions
-// --------------------------------------------------------------------------
-
-// An actions might be performed as a reaction to a reported event by a
-// trigger. You first register your action so it can be associated to a
-// trigger in the options screen. Next, your provided service or function
-// will be called when necessary.
-
-#define MS_TRIGGER_REGISTERACTION "/TriggerPlugin/RegisterAction"
-
-// Parameters:
-// ------------------------
-// wParam = (WPARAM)0
-// lParam = (LPARAM)(ACTIONREGISTER *)&ar
-// Pointer to a structure describing the action to add (see below).
-
-// Return Value:
-// ------------------------
-// Returns 0 on success, nozero otherwise. Registering an already existing
-// action will replace this previously registered action.
-
-typedef struct {
- int cbSize; // Set to sizeof(ACTIONREGISTER).
- char *pszName; // The name of this action, it must be a unique string.
- union {
- char *pszService; // A service (called with wParam =
- // (WPARAM)(DWORD)actionID, lParam =
- // (LPARAM)(REPORTINFO *)&ri) or function to be called
- // when the action has to be performed.
- int (*actionFunction)(DWORD actionID, REPORTINFO *ri);
- };
- HINSTANCE hInstance; // Only needed when an options screen is available.
- DLGPROC pfnDlgProc; // Optional, the callback procedure for the options
- // dialog.
- char *pszTemplate; // Optional, template for the options dialog, must be
- // WS_CHILD.
- int flags; // One of the ARF_* flags, see below.
-} ACTIONREGISTER;
-
-#define ARF_UNICODE 0x01 // This action processes unicode strings.
-#define ARF_FUNCTION 0x02 // The actionFunction will be called instead of
- // the service.
-#define ARF_NOEXPORT 0x04 // This action cannot be exported. Set this flag in
- // case you stored settings not using the helper
- // functions at the end of this header. On export,
- // TriggerPlugin will search for these settings
- // and export them automatically. Contact-specific
- // settings are never exported.
-
-#if defined(UNICODE) || defined(_UNICODE)
-#define ARF_TCHAR ARF_UNICODE
-#else
-#define ARF_TCHAR 0
-#endif
-
-// The service or actionFunction will be called with a pointer to a REPORTINFO
-// struct, containing information about the trigger event. If you can use
-// TriggerData from this struct, always check the ri->td->dFlags before using
-// it. It's up to you to deal with an action in case the expected TriggerData
-// is not available. It's recommened though, to cancel your action. The
-// ri->flags is a combination of the ACT_* flags, indicating how to process the
-// call, see below.
-
-#define ACT_PERFORM 0x01 // Your action is to be performed.
-#define ACT_CLEANUP 0x02 // The settings associated to this action should be
- // removed.
-
-// Dialog Messages
-// The following messages are to be processed by the options dialog, if there
-// is one.
-
-// WM_INITDIALOG
-
-// Parameters:
-// ------------------------
-// lParam = (LPARAM)(DWORD)actionID
-// The action ID for which the options are to be set. This can be a new ID
-// or an ID of an action which is being edited. Initialize your options
-// dialog accordingly. There are helper function at the end of this header
-// file to read your settings for a certain action ID.
-
-#define TM_ADDACTION WM_APP+12
-
-// TM_ADDACTION
-// 'OK' is pressed and a new action will be added. Save your settings using
-// the given action ID. Helper functions can be found at the end of this
-// header file.
-
-// Parameters:
-// ------------------------
-// wParam = (WPARAM)(DWORD)actionID
-// The action ID for which the settings are to be saved. There are helper
-// functions at the end of this header file to store settings with a certain
-// action ID.
-// lParam = 0
-
-// Dialog Messages
-// You can send the following messages to the parent window of your dialog.
-// When initalizing your dialog, you might be interested in the TriggerData
-// the associated trigger is able to provide, you can do so by sending the
-// folowing message to the parent of your dialog.
-
-#define TM_GETTRIGGERINFO WM_APP+13
-
-// Parameters:
-// ------------------------
-// wParam = 0
-// lParam = (LPARAM)(TRIGGERINFO *)&ti
-
-// Return Value:
-// ------------------------
-// Returns 0 on success, the struct given will be filled with the requested
-// information. Returns any other value on error.
-
-typedef struct {
- int cbSize; // (in) Set to sizeof(TRIGGERINFO).
- int dFlags; // (out) The default DF_* flags used by the trigger (as indicated
- // by its TRIGGERREGISTER).
-} TRIGGERINFO;
-
-// --------------------------------------------------------------------------
-// Conditions
-// --------------------------------------------------------------------------
-
-// Depending on the configuration of the user, a condition may need to hold
-// for an action to be performed. A condition function is called and its
-// return value specifies whether or not the condition holds. A condition
-// needs to be registered. After its registered, the condition function might
-// be called to check whether or not the condition holds.
-
-#define MS_TRIGGER_REGISTERCONDITION "/TriggerPlugin/RegisterCondition"
-
-// Parameters:
-// ------------------------
-// wParam = (WPARAM)0
-// lParam = (LPARAM)(CONDITIONREGISTER *)&cr
-// Pointer to a structure describing the condition to add (see below).
-
-// Return Value:
-// ------------------------
-// Returns 0 on success, nozero otherwise. Registering an already existing
-// condition will replace this previously registered condition.
-
-typedef struct {
- int cbSize; // Set to sizeof(CONDITIONREGISTER).
- char *pszName; // The name identifying this condition, must be unique.
- union {
- char *pszService; // The service (wParam = (WPARAM)(DWORD)conditionID,
- // lParam = (LPARAM)(REPORTINFO *)&ri) or function which
- // is called to see whether the condition holds. Must
- // return CRV_TRUE if the condition holds, CRV_FALSE
- // otherwise.
- int (*conditionFunction)(DWORD conditionID, REPORTINFO *ri);
- };
- HINSTANCE hInstance; // Only needed when an options dialog is available.
- DLGPROC pfnDlgProc; // Optional, the dialog procedure for the options
- // dialog.
- char *pszTemplate; // Optional, template for the options dialog, must be
- // WS_CHILD.
- int flags; // CRF_* flags, see below.
-} CONDITIONREGISTER;
-
-// The flags that can be used to register the condition.
-
-#define CRF_UNICODE 0x01 // The condition function or service processes
- // unicode strings.
-#define CRF_FUNCTION 0x02 // The conditionFunction will be called instead of
- // the service.
-#define CRF_NOEXPORT 0x04 // This condition cannot be exported. Set this flag
- // in case you stored settings not using the helper
- // functions at the end of this header. On export,
- // TriggerPlugin will search for these settings
- // and export them automatically. Contact-specific
- // settings are never exported.
-
-#if defined(UNICODE) || defined(_UNICODE)
-#define CRF_TCHAR CRF_UNICODE
-#else
-#define CRF_TCHAR 0
-#endif
-
-// The service or conditionFunction will be called with a pointer to a
-// REPORTINFO struct, containing information about the trigger event. If you
-// can use TriggerData from this struct, always check the ri->td->dFlags before
-// using it. It's up to you to deal with an condition in case the expected
-// TriggerData is not available. It's recommened though, to return CRV_FALSE in
-// those cases. The ri->flags is a combination of the CND_* flags, indicating
-// how to process the call, see below.
-
-// Return values for the condition function or service. The condition service
-// or function is expected to return one of the following.
-
-#define CRV_FALSE 0 // The condition does not hold.
-#define CRV_TRUE 1 // The condition does hold.
-
-// REPORTINFO flags, received by the condition function or service. These
-// indicate how to process the call.
-
-#define CND_PERFORM 0x01 // Perform your condition and return either
- // CRV_TRUE or CRV_FALSE to indicate whether or not
- // your condition holds at this moment.
-#define CND_CLEANUP 0x02 // The condition is deleted. Remove your settings
- // from the DB. There is a helper service below to
- // easily remove settings given a condition ID.
-
-// Dialog Messages
-// The following messages are to be processed by the options dialog, if there
-// is one.
-
-// WM_INITDIALOG
-
-// Parameters:
-// ------------------------
-// lParam = (LPARAM)(DWORD)conditionID
-// The condition ID for which the options are to be set. This can be a new ID
-// or an ID of a condition which is being edited. Initialize your options
-// dialog accordingly. There are helper function at the end of this header
-// file to read your settings for a certain condition ID.
-
-#define TM_ADDCONDITION WM_APP+14
-
-// TM_ADDCONDITION
-// 'OK' is pressed and a new condition will be added. Save your settings using
-// the given condition ID. Helper functions can be found at the end of this
-// header file.
-
-// Parameters:
-// ------------------------
-// wParam = (WPARAM)(DWORD)conditionID
-// The condition ID for which the settings are to be saved. There are helper
-// functions at the end of this header file to store settings with a certain
-// condition ID.
-// lParam = 0
-
-// When initalizing your dialog, you might be interested in the TriggerData the
-// associated trigger is able to provide, you can find out by sending a
-// TM_GETTRIGGERINFO message to the parent of your dialog. See the section on
-// dialog messages for actions for more information (above).
-
-// --------------------------------------------------------------------------
-// Misc. Services
-// --------------------------------------------------------------------------
-
-#define MS_TRIGGER_ENABLETRIGGER "/TriggerPlugin/EnableTrigger"
-
-// Parameters:
-// ------------------------
-// wParam = (WPARAM)(DWORD)triggerID
-// The triggerID to set or get the state from or 0 for the global state.
-// lParam = (LPARAM)(int)type
-// One of ETT_* (see below).
-// Pointer to a structure describing the settings to remove (see below).
-
-// Return Value:
-// ------------------------
-// Returns the state (0=disabled) if ETT_GETSTATE is given as lParam.
-// Otherwise, it returns 0 if setting the state was succesful or any other on
-// failure. The global state must be enabled if a single state is to be
-// changed.
-
-#define ETT_DISABLE 0 // Disable the trigger(s).
-#define ETT_ENABLE 1 // Enable the trigger(s).
-#define ETT_TOGGLE 2 // Toggle the state of the trigger(s).
-#define ETT_GETSTATE 3 // Retrieve the state of the trigger (0=disabled).
-
-// --------------------------------------------------------------------------
-// Database Helper Services
-// --------------------------------------------------------------------------
-
-// The rest of this header file defines helper services and functions to easily
-// store and retrieve settings for a certain trigger, action or condition.
-
-#define MS_TRIGGER_REMOVESETTINGS "/TriggerPlugin/RemoveSettings"
-
-// Parameters:
-// ------------------------
-// wParam = (WPARAM)0
-// lParam = (LPARAM)(REMOVETRIGGERSETTINGS *)&rts
-// Pointer to a structure describing the settings to remove (see below).
-
-// Return Value:
-// ------------------------
-// Returns the number of settings removed from the database.
-
-// This service helps you remove all settings you have written with the DB
-// helper functions, defined at the end of this header file.
-
-typedef struct {
- int cbSize; // Set to sizeof(REMOVETRIGGERSETTINGS).
- char *prefix; // A string indicating what kind of setting are to be removed,
- // see below.
- DWORD id; // The ID of the set of settings to be removed.
- char *szModule; // The module where the settings are stored.
- HANDLE hContact; // The contact for which the setting are to be removed. Can
- // be INVALID_HANDLE_VALUE to remove the settings for all
- // contacts and NULL.
-} REMOVETRIGGERSETTINGS;
-
-// The following prefixes indicate what kind of settings are to be removed from
-// the database.
-
-#define PREFIX_ACTIONID "aid" // The prefix for a DB setting associated to
- // an action.
-#define PREFIX_TRIGGERID "tid" // The prefix for a DB setting associated to
- // a trigger.
-#define PREFIX_CONDITIONID "cid" // The prefix for a DB setting associated
- // to a condition.
-
-#ifndef TRIGGER_NOHELPER
-
-// Helper #1: RemoveAllTriggerSettings
-// ------------------------
-// Remove all settings from the DB given the triggerID and module.
-
-static __inline int RemoveAllTriggerSettings(DWORD triggerID, char *szModule) {
-
- REMOVETRIGGERSETTINGS rts;
-
- rts.cbSize = sizeof(REMOVETRIGGERSETTINGS);
- rts.prefix = PREFIX_TRIGGERID;
- rts.id = triggerID;
- rts.szModule = szModule;
- rts.hContact = INVALID_HANDLE_VALUE;
-
- return CallService(MS_TRIGGER_REMOVESETTINGS, 0, (LPARAM)&rts);
-}
-
-// Helper #2: RemoveAllActionSettings
-// ------------------------
-// Remove all settings from the DB given the actionID and module.
-
-static __inline int RemoveAllActionSettings(DWORD actionID, char *szModule) {
-
- REMOVETRIGGERSETTINGS rts;
-
- rts.cbSize = sizeof(REMOVETRIGGERSETTINGS);
- rts.prefix = PREFIX_ACTIONID;
- rts.id = actionID;
- rts.szModule = szModule;
- rts.hContact = INVALID_HANDLE_VALUE;
-
- return CallService(MS_TRIGGER_REMOVESETTINGS, 0, (LPARAM)&rts);
-}
-
-// Helper #1: RemoveAllConditionSettings
-// ------------------------
-// Remove all settings from the DB given the conditionID and module.
-
-static __inline int RemoveAllConditionSettings(DWORD conditionID, char *szModule) {
-
- REMOVETRIGGERSETTINGS rts;
-
- rts.cbSize = sizeof(REMOVETRIGGERSETTINGS);
- rts.prefix = PREFIX_CONDITIONID;
- rts.id = conditionID;
- rts.szModule = szModule;
- rts.hContact = INVALID_HANDLE_VALUE;
-
- return CallService(MS_TRIGGER_REMOVESETTINGS, 0, (LPARAM)&rts);
-}
-
-// --------------------------------------------------------------------------
-// Database Helper Functions
-// --------------------------------------------------------------------------
-
-// Basically, these function work the same as Miranda's helper functions for
-// getting/setting DB settings. There is one extra parameter, the ID for the
-// trigger/action/condition. The settings are named as follows:
-
-// DBWriteTriggerSetting*(DWORD triggerID, ...) to write a setting given a
-// trigger ID.
-// DBGetTriggerSetting*(DWORD triggerID, ...) to read a setting given a
-// trigger ID.
-// DBWriteActionSetting*(DWORD actionID, ...) to write a setting given an
-// action ID.
-// DBGetActionSetting*(DWORD actionID, ...) to read a setting given an
-// action ID.
-// DBWriteConditionSetting*(DWORD conditionID, ...) to write a setting given a
-// condition ID.
-// DBGetConditionSetting*(DWORD conditionID, ...) to read a setting given a
-// condition ID.
-
-#define MAX_SETTING_LEN 255 // Max. length of a DB setting including the
- // prefix and ID.
-
-// --------------------------------------------------------------------------
-// Database Helper Functions: Triggers
-// --------------------------------------------------------------------------
-
-static int __inline DBWriteTriggerSettingByte(DWORD triggerID, HANDLE hContact,const char *szModule,const char *szSetting,BYTE val) {
-
- char dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_TRIGGERID, triggerID, szSetting);
- return DBWriteContactSettingByte(hContact, szModule, dbSetting, val);
-}
-
-static int __inline DBWriteTriggerSettingWord(DWORD triggerID, HANDLE hContact,const char *szModule,const char *szSetting,WORD val) {
-
- char dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_TRIGGERID, triggerID, szSetting);
- return DBWriteContactSettingWord(hContact, szModule, dbSetting, val);
-}
-
-static int __inline DBWriteTriggerSettingDword(DWORD triggerID, HANDLE hContact,const char *szModule,const char *szSetting,DWORD val) {
-
- char dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_TRIGGERID, triggerID, szSetting);
- return DBWriteContactSettingDword(hContact, szModule, dbSetting, val);
-}
-
-static int __inline DBWriteTriggerSettingString(DWORD triggerID, HANDLE hContact,const char *szModule,const char *szSetting,const char *val) {
-
- char dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_TRIGGERID, triggerID, szSetting);
- return DBWriteContactSettingString(hContact, szModule, dbSetting, val);
-}
-
-static int __inline DBWriteTriggerSettingTString(DWORD triggerID, HANDLE hContact,const char *szModule,const char *szSetting,const TCHAR *val) {
-
- char dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_TRIGGERID, triggerID, szSetting);
- return DBWriteContactSettingTString(hContact, szModule, dbSetting, val);
-}
-
-static int __inline DBWriteTriggerSettingWString(DWORD triggerID, HANDLE hContact,const char *szModule,const char *szSetting,const WCHAR *val) {
-
- char dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_TRIGGERID, triggerID, szSetting);
- return DBWriteContactSettingWString(hContact, szModule, dbSetting, val);
-}
-
-static int __inline DBWriteTriggerSettingStringUtf(DWORD triggerID, HANDLE hContact,const char *szModule,const char *szSetting,const char *val) {
-
- char dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_TRIGGERID, triggerID, szSetting);
- return DBWriteContactSettingStringUtf(hContact, szModule, dbSetting, val);
-}
-
-static int __inline DBGetTriggerSettingByte(DWORD triggerID, HANDLE hContact, const char *szModule, const char *szSetting, int errorValue) {
-
-
- char dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_TRIGGERID, triggerID, szSetting);
- return DBGetContactSettingByte(hContact, szModule, dbSetting, errorValue);
-}
-
-static WORD __inline DBGetTriggerSettingWord(DWORD triggerID, HANDLE hContact, const char *szModule, const char *szSetting, int errorValue) {
-
-
- char dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_TRIGGERID, triggerID, szSetting);
- return DBGetContactSettingWord(hContact, szModule, dbSetting, errorValue);
-}
-
-static DWORD __inline DBGetTriggerSettingDword(DWORD triggerID, HANDLE hContact, const char *szModule, const char *szSetting, int errorValue) {
-
-
- char dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_TRIGGERID, triggerID, szSetting);
- return DBGetContactSettingDword(hContact, szModule, dbSetting, errorValue);
-}
-
-static int __inline DBGetTriggerSetting(DWORD triggerID, HANDLE hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv) {
-
-
- char dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_TRIGGERID, triggerID, szSetting);
- return DBGetContactSetting(hContact, szModule, dbSetting, dbv);
-}
-
-static int __inline DBGetTriggerSettingW(DWORD triggerID, HANDLE hContact,const char *szModule, const char *szSetting,DBVARIANT *dbv) {
-
- char dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_TRIGGERID, triggerID, szSetting);
- return DBGetContactSettingW(hContact, szModule, dbSetting, dbv);
-}
-
-static int __inline DBGetTriggerSettingTString(DWORD triggerID, HANDLE hContact,const char *szModule, const char *szSetting,DBVARIANT *dbv) {
-
- char dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_TRIGGERID, triggerID, szSetting);
- return DBGetContactSettingTString(hContact, szModule, dbSetting, dbv);
-}
-
-static int __inline DBGetTriggerSettingWString(DWORD triggerID, HANDLE hContact,const char *szModule, const char *szSetting,DBVARIANT *dbv) {
-
- char dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_TRIGGERID, triggerID, szSetting);
- return DBGetContactSettingWString(hContact, szModule, dbSetting, dbv);
-}
-
-static int __inline DBGetTriggerSettingStringUtf(DWORD triggerID, HANDLE hContact,const char *szModule, const char *szSetting,DBVARIANT *dbv) {
-
- char dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_TRIGGERID, triggerID, szSetting);
- return DBGetContactSettingStringUtf(hContact, szModule, dbSetting, dbv);
-}
-
-static int __inline DBDeleteTriggerSetting(DWORD triggerID, HANDLE hContact,const char *szModule,const char *szSetting) {
-
- char dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_TRIGGERID, triggerID, szSetting);
- return DBDeleteContactSetting(hContact, szModule, dbSetting);
-}
-
-// --------------------------------------------------------------------------
-// Database Helper Functions: Actions
-// --------------------------------------------------------------------------
-
-static int __inline DBWriteActionSettingByte(DWORD actionID, HANDLE hContact,const char *szModule,const char *szSetting,BYTE val) {
-
- char dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_ACTIONID, actionID, szSetting);
- return DBWriteContactSettingByte(hContact, szModule, dbSetting, val);
-}
-
-static int __inline DBWriteActionSettingWord(DWORD actionID, HANDLE hContact,const char *szModule,const char *szSetting,WORD val) {
-
- char dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_ACTIONID, actionID, szSetting);
- return DBWriteContactSettingWord(hContact, szModule, dbSetting, val);
-}
-
-static int __inline DBWriteActionSettingDword(DWORD actionID, HANDLE hContact,const char *szModule,const char *szSetting,DWORD val) {
-
- char dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_ACTIONID, actionID, szSetting);
- return DBWriteContactSettingDword(hContact, szModule, dbSetting, val);
-}
-
-static int __inline DBWriteActionSettingString(DWORD actionID, HANDLE hContact,const char *szModule,const char *szSetting,const char *val) {
-
- char dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_ACTIONID, actionID, szSetting);
- return DBWriteContactSettingString(hContact, szModule, dbSetting, val);
-}
-
-static int __inline DBWriteActionSettingTString(DWORD actionID, HANDLE hContact,const char *szModule,const char *szSetting,const TCHAR *val) {
-
- char dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_ACTIONID, actionID, szSetting);
- return DBWriteContactSettingTString(hContact, szModule, dbSetting, val);
-}
-
-static int __inline DBWriteActionSettingWString(DWORD actionID, HANDLE hContact,const char *szModule,const char *szSetting,const WCHAR *val) {
-
- char dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_ACTIONID, actionID, szSetting);
- return DBWriteContactSettingWString(hContact, szModule, dbSetting, val);
-}
-
-static int __inline DBWriteActionSettingStringUtf(DWORD actionID, HANDLE hContact,const char *szModule,const char *szSetting,const char *val) {
-
- char dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_ACTIONID, actionID, szSetting);
- return DBWriteContactSettingStringUtf(hContact, szModule, dbSetting, val);
-}
-
-static int __inline DBGetActionSettingByte(DWORD actionID, HANDLE hContact, const char *szModule, const char *szSetting, int errorValue) {
-
-
- char dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_ACTIONID, actionID, szSetting);
- return DBGetContactSettingByte(hContact, szModule, dbSetting, errorValue);
-}
-
-static WORD __inline DBGetActionSettingWord(DWORD actionID, HANDLE hContact, const char *szModule, const char *szSetting, int errorValue) {
-
-
- char dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_ACTIONID, actionID, szSetting);
- return DBGetContactSettingWord(hContact, szModule, dbSetting, errorValue);
-}
-
-static DWORD __inline DBGetActionSettingDword(DWORD actionID, HANDLE hContact, const char *szModule, const char *szSetting, int errorValue) {
-
-
- char dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_ACTIONID, actionID, szSetting);
- return DBGetContactSettingDword(hContact, szModule, dbSetting, errorValue);
-}
-
-static int __inline DBGetActionSetting(DWORD actionID, HANDLE hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv) {
-
-
- char dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_ACTIONID, actionID, szSetting);
- return DBGetContactSetting(hContact, szModule, dbSetting, dbv);
-}
-
-static int __inline DBGetActionSettingW(DWORD actionID, HANDLE hContact,const char *szModule, const char *szSetting,DBVARIANT *dbv) {
-
- char dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_ACTIONID, actionID, szSetting);
- return DBGetContactSettingW(hContact, szModule, dbSetting, dbv);
-}
-
-static int __inline DBGetActionSettingTString(DWORD actionID, HANDLE hContact,const char *szModule, const char *szSetting,DBVARIANT *dbv) {
-
- char dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_ACTIONID, actionID, szSetting);
- return DBGetContactSettingTString(hContact, szModule, dbSetting, dbv);
-}
-
-static int __inline DBGetActionSettingWString(DWORD actionID, HANDLE hContact,const char *szModule, const char *szSetting,DBVARIANT *dbv) {
-
- char dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_ACTIONID, actionID, szSetting);
- return DBGetContactSettingWString(hContact, szModule, dbSetting, dbv);
-}
-
-static int __inline DBGetActionSettingStringUtf(DWORD actionID, HANDLE hContact,const char *szModule, const char *szSetting,DBVARIANT *dbv) {
-
- char dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_ACTIONID, actionID, szSetting);
- return DBGetContactSettingStringUtf(hContact, szModule, dbSetting, dbv);
-}
-
-static int __inline DBDeleteActionSetting(DWORD actionID, HANDLE hContact,const char *szModule,const char *szSetting) {
-
- char dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_ACTIONID, actionID, szSetting);
- return DBDeleteContactSetting(hContact, szModule, dbSetting);
-}
-
-// --------------------------------------------------------------------------
-// Database Helper Functions: Conditions
-// --------------------------------------------------------------------------
-
-static int __inline DBWriteConditionSettingByte(DWORD conditionID, HANDLE hContact,const char *szModule,const char *szSetting,BYTE val) {
-
- char dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_CONDITIONID, conditionID, szSetting);
- return DBWriteContactSettingByte(hContact, szModule, dbSetting, val);
-}
-
-static int __inline DBWriteConditionSettingWord(DWORD conditionID, HANDLE hContact,const char *szModule,const char *szSetting,WORD val) {
-
- char dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_CONDITIONID, conditionID, szSetting);
- return DBWriteContactSettingWord(hContact, szModule, dbSetting, val);
-}
-
-static int __inline DBWriteConditionSettingDword(DWORD conditionID, HANDLE hContact,const char *szModule,const char *szSetting,DWORD val) {
-
- char dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_CONDITIONID, conditionID, szSetting);
- return DBWriteContactSettingDword(hContact, szModule, dbSetting, val);
-}
-
-static int __inline DBWriteConditionSettingString(DWORD conditionID, HANDLE hContact,const char *szModule,const char *szSetting,const char *val) {
-
- char dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_CONDITIONID, conditionID, szSetting);
- return DBWriteContactSettingString(hContact, szModule, dbSetting, val);
-}
-
-static int __inline DBWriteConditionSettingTString(DWORD conditionID, HANDLE hContact,const char *szModule,const char *szSetting,const TCHAR *val) {
-
- char dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_CONDITIONID, conditionID, szSetting);
- return DBWriteContactSettingTString(hContact, szModule, dbSetting, val);
-}
-
-static int __inline DBWriteConditionSettingWString(DWORD conditionID, HANDLE hContact,const char *szModule,const char *szSetting,const WCHAR *val) {
-
- char dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_CONDITIONID, conditionID, szSetting);
- return DBWriteContactSettingWString(hContact, szModule, dbSetting, val);
-}
-
-static int __inline DBWriteConditionSettingStringUtf(DWORD conditionID, HANDLE hContact,const char *szModule,const char *szSetting,const char *val) {
-
- char dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_CONDITIONID, conditionID, szSetting);
- return DBWriteContactSettingStringUtf(hContact, szModule, dbSetting, val);
-}
-
-static int __inline DBGetConditionSettingByte(DWORD conditionID, HANDLE hContact, const char *szModule, const char *szSetting, int errorValue) {
-
-
- char dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_CONDITIONID, conditionID, szSetting);
- return DBGetContactSettingByte(hContact, szModule, dbSetting, errorValue);
-}
-
-static WORD __inline DBGetConditionSettingWord(DWORD conditionID, HANDLE hContact, const char *szModule, const char *szSetting, int errorValue) {
-
-
- char dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_CONDITIONID, conditionID, szSetting);
- return DBGetContactSettingWord(hContact, szModule, dbSetting, errorValue);
-}
-
-static DWORD __inline DBGetConditionSettingDword(DWORD conditionID, HANDLE hContact, const char *szModule, const char *szSetting, int errorValue) {
-
-
- char dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_CONDITIONID, conditionID, szSetting);
- return DBGetContactSettingDword(hContact, szModule, dbSetting, errorValue);
-}
-
-static int __inline DBGetConditionSetting(DWORD conditionID, HANDLE hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv) {
-
-
- char dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_CONDITIONID, conditionID, szSetting);
- return DBGetContactSetting(hContact, szModule, dbSetting, dbv);
-}
-
-static int __inline DBGetConditionSettingW(DWORD conditionID, HANDLE hContact,const char *szModule, const char *szSetting,DBVARIANT *dbv) {
-
- char dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_CONDITIONID, conditionID, szSetting);
- return DBGetContactSettingW(hContact, szModule, dbSetting, dbv);
-}
-
-static int __inline DBGetConditionSettingTString(DWORD conditionID, HANDLE hContact,const char *szModule, const char *szSetting,DBVARIANT *dbv) {
-
- char dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_CONDITIONID, conditionID, szSetting);
- return DBGetContactSettingTString(hContact, szModule, dbSetting, dbv);
-}
-
-static int __inline DBGetConditionSettingWString(DWORD conditionID, HANDLE hContact,const char *szModule, const char *szSetting,DBVARIANT *dbv) {
-
- char dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_CONDITIONID, conditionID, szSetting);
- return DBGetContactSettingWString(hContact, szModule, dbSetting, dbv);
-}
-
-static int __inline DBGetConditionSettingStringUtf(DWORD conditionID, HANDLE hContact,const char *szModule, const char *szSetting,DBVARIANT *dbv) {
-
- char dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_CONDITIONID, conditionID, szSetting);
- return DBGetContactSettingStringUtf(hContact, szModule, dbSetting, dbv);
-}
-
-static int __inline DBDeleteConditionSetting(DWORD conditionID, HANDLE hContact,const char *szModule,const char *szSetting) {
-
- char dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_CONDITIONID, conditionID, szSetting);
- return DBDeleteContactSetting(hContact, szModule, dbSetting);
-}
-
-#endif // nohelper
-#endif // m_trigger
diff --git a/nudge/include/m_uninstaller.h b/nudge/include/m_uninstaller.h deleted file mode 100644 index e26f55c..0000000 --- a/nudge/include/m_uninstaller.h +++ /dev/null @@ -1,700 +0,0 @@ -/*
-
- PluginUninstaller 1.1.2.1 for Miranda IM 0.3.3a and +
- ------------------------------------------------------------------------
- Developers - C/C++ Header File
-
- Plugin Info: ----------------------------
- | Version: 1.1.2.1
- | Filename: uninstaller.dll
- | Author: H. Herkenrath (hrathh@users.sourceforge.net)
- | Description: Extends the plugin options and offers the possibility
- | to directly remove plugins and delete all associated
- | settings and files.
-
- Contents: -------------------------------
- | > General Info:
- | - Uninstall Example/Template
- | - Changing displayed icon
- | - Changing displayed docs
- | - Message boxes on uninstall
- | - Service Accesibility
- | - Including this file
- |
- | > Structs:
- | - Uninstall Params (PLUGINUNINSTALLPARAMS)
- |
- | > Helpers:
- | - Macro: Run service while uninstalling (PUICallService)
- | - Function: Remove some files in directory (PUIRemoveFilesInDirectory)
- |
- | > Events:
- | - Allow to uninstall a plugin (ME_PLUGINUNINSTALLER_OKTOUNINSTALL)
- | - Plugin gets uninstalled (ME_PLUGINUNINSTALLER_UNINSTALL)
- |
- | > Services:
- | - Remove database module (MS_PLUGINUNINSTALLER_REMOVEDBMODULE)
- | - Remove a setting globally (MS_PLUGINUNINSTALLER_REMOVEDBSETTINGGLOBALLY)
- | - Remove skinned sound (MS_PLUGINUNINSTALLER_REMOVESKINSOUND)
- | - Uninstall a plugin (MS_PLUGINUNISTALLER_UNISTALLPLUGIN)
- | - Getting handles (MS_PLUGINUNINSTALLER_GETHANDLE)
- |
-
-
- This file is only thought for plugin developers.
- If you only want to use "PluginUninstaller" and don't want to develop a plugin
- or something with it you don't need this file.
-
- If there are any problems or bugs with or in this file or something else
- please mail me. My e-mail address is: hrathh@users.sourceforge.net
- For more documentation you can use this address, too. :-)
-
- If you have any whishes on some plugin uninstalling for your
- plugin you can mail me, too. :-)
-
-*/
-#ifndef M_UNINSTALLER_H
-#define M_UNINSTALLER_H
-
-#ifndef CallService
- #pragma message("Mistake Alert!: "m_uninstaller.h" needs to be included after "newpluginapi.h"!\n The following errors are resulting of this mistake.\n")
-#endif
-
-
-// | General Info
-// -----------------------------
-
-// Uninstall Example/Template
-// ---------------------------
-// Making your plugin uninstallable is very easy.
-// Just add the following "Uninstall" function near the "Unload" function
-// in your plugin.
-// A template plugin is available in the source code package.
-
-// Old:
-// int __declspec(dllexport) Uninstall(BOOL bIsMirandaRunning, BOOL bDoDeleteSettings, char* pszPluginPath);
-
-// New:
-//int __declspec(dllexport) UninstallEx(PLUGINUNINSTALLPARAMS* ppup)
-//{
- // Available Variables:
- // -----------------------------
- // ppup->bIsMirandaRunning:
- // Contains if Miranda is running
- // (Currently this is always TRUE).
-
- // ppup->bDoDeleteSettings:
- // Contains if the users selected
- // that he wants all settings be deleted.
-
- // ppup->pszPluginsPath:
- // Contains the plugins directory name.
-
-
- // Notes:
- // -----------------------------
-
- // Run before "Unload" function:
- // -> IMPORTANT: Be careful not to write to the database or to files in "Unload" again!!!
- // -> Perhaps create a global BOOL variable which is set to TRUE when your plugin gets uninstalled
- // or check of a database setting "IsInstalled" in Unload() or sth. like that
-
- // All Miranda is still loaded
-
- // Here you can do:
- // - Delete settings group in database
- // - Delete registry items
- // - Delete ini-files and other settings files
- // - Delete other files
-
- // Your plugin dll gets automatically deleted
-
- // Services to remove are offered:
- // MS_PLUGINUNINSTALLER_REMOVEDBMODULE
- // MS_PLUGINUNINSTALLER_REMOVEDBSETTINGGLOBALLY
- // MS_PLUGINUNINSTALLER_REMOVESKINSOUND
-
-
- // Getting other useful paths:
- // -----------------------------
-
- // System directory:
-
- //char szSysPath[MAX_PATH];
- //GetSystemDirectory(szSysPath, MAX_PATH);
-
-
- // Windows directory:
-
- //char szWinPath[MAX_PATH];
- //GetWindowsDirectory(szWinPath, MAX_PATH);
-
-
- // Other directories:
-
- // char szPath[MAX_PATH];
- // SHGetSpecialFolderPath(NULL, szPath, CSIDL_* , FALSE);
-
- // Some available dirs:
- // CSIDL_APPDATA CSIDL_SENDTO CSIDL_FAVORITES
- // CSIDL_STARTUP CSIDL_PROFILE CSIDL_DESKTOPDIRECTORY
-
-
- // Delete Files
- //const char* apszFiles[] = {"MyPlugin_Readme.txt", "MyPlugin_License.txt", "MyPlugin_Developer.txt", "MyPlugin_Translation.txt"};
- //PUIRemoveFilesInPath(ppup->pszPluginsPath, apszFiles);
-
- // Delete Settings
- //if(ppup->bDoDeleteSettings == TRUE)
- //{
- //if (ppup->bIsMirandaRunning == TRUE) // Check if it is possible to access services
- //{
- // Remove plugin's module
- //PUIRemoveDbModule("MyPlugin");
-
- // Remove plugin's sounds
- //PUIRemoveSkinSound("MySoundSetting1");
- //PUIRemoveSkinSound("MySoundSetting2");
- //}
- //}
-
- // Remember:
- // Do not forget to remove your (eventually) created registry items here, too.
-
-
- // The plugin's dll file gets deleted after returning.
-
- // Remember:
- // If your DLL file is additionally in use by another application (eg. Windows)
- // you need to free the DLL *here* completely. Otherwise it can't be deleted.
-
-// return 0;
-//}
-
-
-
-// Changing displayed icon
-// ---------------------------
-// The icon that gets displayed on the options page is always the "first"
-// icon in your DLL file.
-// An icon in your DLL file is the first icon when it has the lowest recource ID.
-// If you would like to have an other icon shown in the options please change your
-// icon resource IDs so that the icon you would like to have has the lowest one.
-// For example if you use MS Visual C++, open "resource.h" and change the resource define
-// of your prefered icon to the lowest icon number.
-
-
-// Changing displayed docs
-// ---------------------------
-// The items "License" and "More Information" on the plugin details page
-// are created when the a license and/or a readme file for the plugin exists.
-// The files get detected automatically and need a special name
-// so that they get detected.
-// The text files need to be either placed in the "Plugins" directory or
-// in the "Docs" directory. Whereof the last one is the better one :-)
-//
-// For the license file the following file name formatings are possible:
-// PluginName-License.txt (I personally think that this is the best naming solution... :-) )
-// PluginName_License.txt,
-//
-// For the readme file the following ones are possible:
-// PluginName-Readme.txt (Again...I like this one :-D ),
-// PluginName_Readme.txt,
-
-// Message boxes on uninstall
-// ---------------------------
-// If you would like to ask the user for something to remove/uninstall
-// please hook the event ME_PLUGINUNINSTALLER_UNINSTALL and show your
-// message box there. Save the action the user chose in a
-// global BOOL variable and do the chosen action in "UninstallEx".
-// You can get the plugins options window handle with MS_PLUGINUNINSTALLER_GETHANDLE.
-
-
-// Service Accessibility
-// ---------------------------
-// Remember that you only can use these functions after the event ME_SYSTEM_MODULESLOADED
-// or later because "PluginUninstaller" needs to be loaded first.
-// Normally you only use them in your "UninstallEx" function.
-//
-// IMPORTANT!:
-// Please make sure that you always use the macro PUICallService
-// in the "UninstallEx" function instead of the CallService function.
-
-
-// Including this file
-// ---------------------------
-// To use some of the uninstalling functionality you have to include this file
-// into your project.
-//
-// IMPORTANT!:
-// Please make sure that you include the file "newpluginapi.h" before this one.
-// If this isn't the case there may some compile errors come up.
-
- // -> Example:
- // If your plugin is in the directory "Plugins/MyPlugin/" and
- // this include file is in the directory "Plugins/PluginUninstaller"
- // you can use the following:
-
- //#include "../PluginUninstaller/m_uninstaller.h"
-
- // If your plugin is in an directory that is different to that one just
- // change the include path to the one you want.
-
-
-
-
-
-// | Structs
-// -----------------------------
-
-// ---------------------------------------------
-// -- Struct: Uninstall Params -----------------
-// ---------------------------------------------
-
-// Struct: PLUGINUNINSTALLPARAMS
-// (Gets passed to "UninstallEx" function)
-
-typedef int (*HELPERPROC)(const char*, WPARAM, LPARAM); // Used internally (for pHelperProcAddress)
-
-typedef struct {
- BOOL bIsMirandaRunning; // Is TRUE when Miranda is loaded and services are available (Please use PUICallService instead of CallService)
- BOOL bDoDeleteSettings; // Is TRUE when user wants to delete settings (If this is FALSE, please only delete your files)
- char* pszPluginsPath; // Contains the plugin directory path
- char* pszDocsPath; // Contains the document directory for plugins documentation (Added in version 1.1.1.0)
- char* pszIconsPath; // Contains the icon directory for icon dlls (Added in version 1.1.2.0)
- HELPERPROC pHelperProcAddress; // Used internally (Contains proc address for PUICallService)
-} PLUGINUNINSTALLPARAMS;
-
-
-
-
-
-// | Helper
-// -----------------------------
-
-
-// ---------------------------------------------
-// -- Macro: Run service while uninstalling ----
-// ---------------------------------------------
-
-// Macro: PUICallService
-
-#define PUICallService(service, wParam, lParam) (ppup->pHelperProcAddress) (service, wParam, lParam);
-
-// Description:
-// -------------
-// This service provides the possibility to call a Miranda
-// service in the "UninstallEx" function.
-// Important!: Use this macro always instead of "CallService",
-// because else a crash occurs when the plugin was decativated
-// and gets uninstalled
-
-// Parameters:
-// -------------
-// Same parameters as CallService of Miranda Core.
-
-// Return Values:
-// --------------
-// Return values are the same as the CallService function of Miranda Core.
-// Additionaly returns CALLSERVICE_NOTFOUND if Miranda is not loaded
-// which means the services are not accessable.
-
-
- // Example:
- // ----------------------------------
-
- //if ( (bIsMirandaRunning == TRUE) && (bDoDeleteSettings == TRUE) )
- //{
- // Remove plugin's module
- //PUICallService(MS_PLUGINUNINSTALLER_REMOVEDBMODULE, (WPARAM)"MyPlugin", 0);
- //}
-
-
-
-
-// ---------------------------------------------
-// -- Function: Remove some files in directory -
-// ---------------------------------------------
-
-// Function: PUIRemoveFilesInDirectory
-
-static BOOL __inline PUIRemoveFilesInDirectory(char* pszPath, const char* apszFiles[]);
-
-// Description:
-// -------------
-// This helper provides the possibility to easily
-// remove specified files in a specified directory.
-
-// Note: The last version of this helper (PUIRemoveFilesInPath)
-// did not work correctly.
-// Please do now always append a NULL slot to the end of your array.
-
-// Parameters:
-// -------------
-// char* pszPath = Path to the files in array
-// const LPCSTR apszFiles[] = NULL-terminated array of files to be deleted.
-
-// Return Values:
-// --------------
-// Returns TRUE if the files could be deleted.
-// FALSE if the files could not be deleted or did not exist.
-
-
-static BOOL __inline PUIRemoveFilesInDirectory(char* pszPath, const char* apszFiles[])
-{
- char szFile[MAX_PATH];
- BOOL bReturn = FALSE;
- int iFile = 0;
-
- while (apszFiles[iFile] != NULL)
- {
- strncpy(szFile, pszPath, sizeof(szFile));
- strncat(szFile, apszFiles[iFile], sizeof(szFile)-strlen(szFile));
-
- if ((BOOL)DeleteFile(szFile) == TRUE) bReturn = TRUE;
- iFile++;
- }
-
- return bReturn;
-}
-
- // Example:
- // ----------------------------------
-
- //const char* apszFiles[] = {"File1.txt", "File2.txt", "File3.txt", NULL};
- //PUIRemoveFilesInDirectory(ppup->pszPluginsPath, apszFiles);
-
-
-
-
-// | Events
-// -----------------------------
-
-
-// ---------------------------------------------
-// -- Event: Allow to uninstall a plugin -------
-// ---------------------------------------------
-
-// Event: ME_PLUGINUNINSTALLER_OKTOUNINSTALL
-
-#define ME_PLUGINUNINSTALLER_OKTOUNINSTALL "PluginUninstaller/OkToUninstall"
-
-// Submitted Values:
-// -----------------
-// wParam = pszPluginName (String containing the translated plugin name)
-// lParam = pszPluginFile (String containing the plugin dll file name in lower case)
-
-// Return Values:
-// -----------------
-// Returning 1 on this event causes the "Remove Plugin" button to be disabled.
-
-
-
-// ---------------------------------------------
-// -- Event: Plugin gets uninstalled -----------
-// ---------------------------------------------
-
-// Event: ME_PLUGINUNINSTALLER_UNINSTALL
-
-#define ME_PLUGINUNINSTALLER_UNINSTALL "PluginUninstaller/Uninstall"
-
-// Submitted Values:
-// -----------------
-// wParam = pszPluginName (String containing the translated plugin name)
-// lParam = pszPluginFile (String containing the plugin dll file name in lower case)
-
-// Return Values:
-// -----------------
-// Returning 1 on this event causes the uninstall process to be canceled.
-
-// Notice:
-// Hook this event if you would like to ask the user for something to remove/uninstall
-// and show your message box on this event. Save the action the user chose in a
-// global BOOL variable and do the chosen action in "UninstallEx".
-// You can get the plugins options window handle with MS_PLUGINUNINSTALLER_GETHANDLE.
-
-// Other plugins can use this event to be noticed that another plugin isn't installed anylonger.
-
-
-
-
-// | Services
-// -----------------------------
-
-
-// ---------------------------------------------
-// -- Service: Remove database module ----------
-// ---------------------------------------------
-
-// Service: MS_PLUGINUNINSTALLER_REMOVEDBMODULE
-
-#define MS_PLUGINUNINSTALLER_REMOVEDBMODULE "PluginUninstaller/RemoveDbModule"
-
-// Description:
-// -------------
-// This service provides the possibility to delete all database modules
-// associated to your plugin.
-// The specified database module will be removed in all contacts
-// including the NULL contact.
-// Remember to call it always with PUICallService in "UninstallEx" function.
-
-// Parameters:
-// -------------
-// wParam = (char*)pszModule // Pointer to a string containd module name. Can't be NULL
-// lParam = (const char*)apszIgnoreSettings // NULL terminated array of strings. Can be 0 if no settings should be ignored.
- // See example 3 for more details
-
-// Return Values:
-// --------------
-// Returns 0 on success.
-// Nonzero if the module was not present in database.
-
-
-#ifndef UNINSTALLER_NOHELPERS
-
-// Can only be used in "UninstallEx" function
-#define PUIRemoveDbModule(pszModule) PUICallService(MS_PLUGINUNINSTALLER_REMOVEDBMODULE, (WPARAM)pszModule, 0);
-
-#endif
-
-
- // Example 1:
- // ----------------------------------
-
- //PUIRemoveDbModule("MyPlugin");
-
-
- // Example 2:
- // ----------------------------------
-
- //char szModule[] = "MyModule";
- //PUICallService(MS_PLUGINUNINSTALLER_REMOVEDBMODULE, (WPARAM)szModule, 0);
-
-
- // Example 3:
- // ----------------------------------
-
- // This deletes all settings in the specified module exept
- // the specified settings: "Setting1",..."Setting4"
-
- // char szModule[] = "MyModule";
- // const char* apszIgnoreSettings[] = {"Setting1", "Setting2", "Setting3", "Setting4", NULL};
- // PUICallService(MS_PLUGINUNINSTALLER_REMOVEDBMODULE, (WPARAM)szModule, (LPARAM)&apszIgnoreSettings);
-
-
-
-// ---------------------------------------------
-// -- Service: Remove a setting globally -------
-// ---------------------------------------------
-
-// Service: MS_PLUGINUNINSTALLER_REMOVEDBSETTINGGLOBALLY
-
-#define MS_PLUGINUNINSTALLER_REMOVEDBSETTINGGLOBALLY "PluginUninstaller/RemoveDbSettingGlobally"
-
-// Description:
-// -------------
-// This service provides the possibility to delete a specific
-// setting in database in all contacts including the NULL contact.
-// Remember to call it always with PUICallService in "UninstallEx" function.
-
-// Parameters:
-// -------------
-// wParam = (char*)pszModule
-// lParam = (char*)pszSetting
-
-// Return Values:
-// --------------
-// Returns 0 on success.
-// Nonzero if the setting was not present in database.
-
-
-#ifndef UNINSTALLER_NOHELPERS
-
-// Can only be used in "UninstallEx" function
-#define PUIRemoveDbSettingGlobally(pszModule, pszSetting) PUICallService(MS_PLUGINUNINSTALLER_REMOVEDBSETTINGGLOBALLY, (WPARAM)pszModule, (LPARAM)pszSetting);
-
-
-#endif
-
-
- // Example 1:
- // ----------------------------------
-
- //PUIRemoveDbSettingGlobally("MyPlugin", "MySetting");
-
-
- // Example 2:
- // ----------------------------------
-
- //szModule[] = "MyPlugin";
- //szSetting[] = "MySetting";
- //PUICallService(MS_PLUGINUNINSTALLER_REMOVEDBSETTINGGLOBALLY, (WPARAM)szModule, (LPARAM)szSetting);
-
-
-
-
-
-
-// ---------------------------------------------
-// -- Service: Remove skinned sound ------------
-// ---------------------------------------------
-
-// Service: MS_PLUGINUNINSTALLER_REMOVESKINSOUND
-
-#define MS_PLUGINUNINSTALLER_REMOVESKINSOUND "PluginUninstaller/RemoveSkinSound"
-
-// Description:
-// -------------
-// This service provides the possibility to delete all your sound settings
-// associated to your plugin.
-// The specified sound will be be removed.
-// Remember to call it always with PUICallService in "UninstallEx" function.
-
-// Parameters:
-// -------------
-// wParam = (char*)pszSoundSetting
-// lParam = 0
-
-// Return Values:
-// --------------
-// Returns 0 on success.
-// Nonzero if the sound was not present in database.
-
-
-#ifndef UNINSTALLER_NOHELPERS
-
-// Can only be used in "UninstallEx" function
-#define PUIRemoveSkinSound(pszSoundSetting) PUICallService(MS_PLUGINUNINSTALLER_REMOVESKINSOUND, (WPARAM)pszSoundSetting, 0);
-
-#endif
-
-
- // Example 1:
- // ----------------------------------
-
- //PUIRemoveSkinSound("MySoundSetting");
-
-
- // Example 2:
- // ----------------------------------
-
- //szSoundModule[] = "MySoundSetting";
- //PUICallService(MS_PLUGINUNINSTALLER_REMOVEDBMODULE, (WPARAM)szSoundSetting, 0);
-
-
-
-
-
-// ---------------------------------------------
-// -- Service: Uninstall a plugin --------------
-// ---------------------------------------------
-
-// Service: MS_PLUGINUNINSTALLER_UNINSTALLPLUGIN
-
-#define MS_PLUGINUNINSTALLER_UNINSTALLPLUGIN "PluginUninstaller/UninstallPlugin"
-
-// Description:
-// -------------
-// This service marks a plugin to be uninstalled at next restart of Miranda IM.
-// It uses the default value for "Delete all settings".
-// You can use this service for example when you want that your sub-plugin gets
-// also removed when your main-plugin is uninstalled.
-// Note: This service is not needed for the normal uninstalling functionality.
-
-// Parameters:
-// -------------
-// wParam = (char*)pszPluginName // do not translate this!
-// lParam = (char*)pszPluginFile // without path, only file name!
-
-// Return Values:
-// --------------
-// Returns always 0.
-
-
-#ifndef UNINSTALLER_NOHELPERS
-
-int __inline PUIUninstallPlugin(char* pszPluginName, char* pszPluginFile)
-{
- return CallService(MS_PLUGINUNINSTALLER_UNINSTALLPLUGIN, (WPARAM)pszPluginName, (LPARAM)pszPluginFile);
-}
-
-#endif
-
-
- // Example 1:
- // ----------------------------------
-
- //PUIUninstallPlugin("PluginName", "plugin.dll");
-
-
- // Example 2:
- // ----------------------------------
-
- // hInst => Handle of a specific (your?) plugin
- // char szPluginName[] = "YourPluginName";
-
- //char* pFileName;
- //char szPath[MAX_PATH];
-
- //GetModuleFileName(hInst, szPath, sizeof(szPath));
- //pFileName = strrchr(szPath, '\\');
- //pFileName = pFileName+1; // Pointer arithmetic
-
- //CallService(MS_PLUGINUNINSTALLER_UNINSTALLPLUGIN, (WPARAM)szPluginName, (LPARAM)pFileName);
-
-
-
-
-// ---------------------------------------------
-// -- Service: Getting handles -----------------
-// ---------------------------------------------
-
-// Service: MS_PLUGINUNINSTALLER_GETHANDLE
-
-#define MS_PLUGINUNINSTALLER_GETHANDLE "PluginUninstaller/GetHandle"
-
-// Description:
-// -------------
-// This service gets a specified window/instance handle.
-
-// Note: This service must not be used in "UninstallEx" function.
-// It is mainly thought for being used in ME_PLUGINUNINSTALLER_UNINSTALL event
-// to give out a MessageBox or something like that.
-
-// Parameters:
-// -------------
-// wParam = UINT uHandleType;
-// lParam = 0
-
-// Possible values for wParam:
-#define PUIHT_HINST_PLUGIN_INSTANCE 0 // HINSTANCE of the PluginUninstaller plugin
-#define PUIHT_HWND_PLUGIN_OPTIONS 1 // HWND of the plugin options dialog (if it is loaded; else NULL)
-
-// Return Values:
-// --------------
-// Returns the specified handle value.
-// If no handle type is specified it returns NULL.
-// The handle doesn't need to be destroyed.
-
-
-#ifndef UNINSTALLER_NOHELPERS
-
-HANDLE __inline PUIGetHandle(UINT uHandleType)
-{
- return (HANDLE)CallService(MS_PLUGINUNINSTALLER_GETHANDLE, uHandleType, 0);
-}
-
-#endif
-
-
- // Example
- // ----------------------------------
-
- //HWND hwndDlg;
- //hwndDlg = (HWND)PUIGetHandle(PUIHT_HWND_PLUGIN_OPTIONS);
-
-
-
-
-
-#endif // M_UNINSTALLER_H
diff --git a/nudge/include/m_updater.h b/nudge/include/m_updater.h deleted file mode 100644 index 488d372..0000000 --- a/nudge/include/m_updater.h +++ /dev/null @@ -1,150 +0,0 @@ -#ifndef _M_UPDATER_H
-#define _M_UPDATER_H
-
-// NOTES:
-// - For langpack updates, include a string of the following format in the langpack text file:
-// ";FLID: <file listing name> <version>"
-// version must be four numbers seperated by '.', in the range 0-255 inclusive
-// - Updater will disable plugins that are downloaded but were not active prior to the update (this is so that, if an archive contains e.g. ansi and
-// unicode versions, the correct plugin will be the only one active after the new version is installed)...so if you add a support plugin, you may need
-// to install an ini file to make the plugin activate when miranda restarts after the update
-// - Updater will replace all dlls that have the same internal shortName as a downloaded update dll (this is so that msn1.dll and msn2.dll, for example,
-// will both be updated) - so if you have a unicode and a non-unicode version of a plugin in your archive, you should make the internal names different (which will break automatic
-// updates from the file listing if there is only one file listing entry for both versions, unless you use the 'MS_UPDATE_REGISTER' service below)
-// - Updater will install all files in the root of the archive into the plugins folder, except for langpack files that contain the FLID string which go into the root folder (same
-// folder as miranda32.exe)...all folders in the archive will also be copied to miranda's root folder, and their contents transferred into the new folders. The only exception is a
-// special folder called 'root_files' - if there is a folder by that name in the archive, it's contents will also be copied into miranda's root folder - this is intended to be used
-// to install additional dlls etc that a plugin may require)
-
-// if you set Update.szUpdateURL to the following value when registering, as well as setting your beta site and version data,
-// Updater will ignore szVersionURL and pbVersionPrefix, and attempt to find the file listing URL's from the backend XML data.
-// for this to work, the plugin name in pluginInfo.shortName must match the file listing exactly (except for case)
-#define UPDATER_AUTOREGISTER "UpdaterAUTOREGISTER"
-// Updater will also use the backend xml data if you provide URL's that reference the miranda file listing for updates (so you can use that method
-// if e.g. your plugin shortName does not match the file listing) - it will grab the file listing id from the end of these URLs
-
-typedef struct Update_tag {
- int cbSize;
- char *szComponentName; // component name as it will appear in the UI (will be translated before displaying)
-
- char *szVersionURL; // URL where the current version can be found (NULL to disable)
- BYTE *pbVersionPrefix; // bytes occuring in VersionURL before the version, used to locate the version information within the URL data
- // (note that this URL could point at a binary file - dunno why, but it could :)
- int cpbVersionPrefix; // number of bytes pointed to by pbVersionPrefix
- char *szUpdateURL; // URL where dll/zip is located
- // set to UPDATER_AUTOREGISTER if you want Updater to find the file listing URLs (ensure plugin shortName matches file listing!)
-
- char *szBetaVersionURL; // URL where the beta version can be found (NULL to disable betas)
- BYTE *pbBetaVersionPrefix; // bytes occuring in VersionURL before the version, used to locate the version information within the URL data
- int cpbBetaVersionPrefix; // number of bytes pointed to by pbVersionPrefix
- char *szBetaUpdateURL; // URL where dll/zip is located
-
- BYTE *pbVersion; // bytes of current version, used for comparison with those in VersionURL
- int cpbVersion; // number of bytes pointed to by pbVersion
-
- char *szBetaChangelogURL; // url for displaying changelog for beta versions
-} Update;
-
-// register a comonent with Updater
-//
-// wparam = 0
-// lparam = (LPARAM)&Update
-#define MS_UPDATE_REGISTER "Update/Register"
-
-// utility functions to create a version string from a DWORD or from pluginInfo
-// point buf at a buffer at least 16 chars wide - but note the version string returned may be shorter
-//
-__inline static char *CreateVersionString(DWORD version, char *buf) {
- mir_snprintf(buf, 16, "%d.%d.%d.%d", (version >> 24) & 0xFF, (version >> 16) & 0xFF, (version >> 8) & 0xFF, version & 0xFF);
- return buf;
-}
-
-__inline static char *CreateVersionStringPlugin(PLUGININFO *pluginInfo, char *buf) {
- return CreateVersionString(pluginInfo->version, buf);
-}
-
-__inline static char *CreateVersionStringPluginEx(PLUGININFOEX *pluginInfo, char *buf) {
- return CreateVersionString(pluginInfo->version, buf);
-}
-
-
-// register the 'easy' way - use this method if you have no beta URL and the plugin is on the miranda file listing
-// NOTE: the plugin version string on the file listing must be the string version of the version in pluginInfo (i.e. 0.0.0.1,
-// four numbers between 0 and 255 inclusivem, so no letters, brackets, etc.)
-//
-// wParam = (int)fileID - this is the file ID from the file listing (i.e. the number at the end of the download link)
-// lParam = (PLUGININFO*)&pluginInfo
-#define MS_UPDATE_REGISTERFL "Update/RegisterFL"
-
-// this function can be used to 'unregister' components - useful for plugins that register non-plugin/langpack components and
-// may need to change those components on the fly
-// lParam = (char *)szComponentName
-#define MS_UPDATE_UNREGISTER "Update/Unregister"
-
-// this event is fired when the startup process is complete, but NOT if a restart is imminent
-// it is designed for status managment plugins to use as a trigger for beggining their own startup process
-// wParam = lParam = 0 (unused)
-// (added in version 0.1.6.0)
-#define ME_UPDATE_STARTUPDONE "Update/StartupDone"
-
-// this service can be used to enable/disable Updater's global status control
-// it can be called from the StartupDone event handler
-// wParam = (BOOL)enable
-// lParam = 0
-// (added in version 0.1.6.0)
-#define MS_UPDATE_ENABLESTATUSCONTROL "Update/EnableStatusControl"
-
-// An description of usage of the above service and event:
-// Say you are a status control plugin that normally sets protocol or global statuses in your ModulesLoaded event handler.
-// In order to make yourself 'Updater compatible', you would move the status control code from ModulesLoaded to another function,
-// say DoStartup. Then, in ModulesLoaded you would check for the existence of the MS_UPDATE_ENABLESTATUSCONTROL service.
-// If it does not exist, call DoStartup. If it does exist, hook the ME_UPDATE_STARTUPDONE event and call DoStartup from there. You may
-// also wish to call MS_UPDATE_ENABLESTATUSCONTROL with wParam == FALSE at this time, to disable Updater's own status control feature.
-
-// this service can be used to determine whether updates are possible for a component with the given name
-// wParam = 0
-// lParam = (char *)szComponentName
-// returns TRUE if updates are supported, FALSE otherwise
-#define MS_UPDATE_ISUPDATESUPPORTED "Update/IsUpdateSupported"
-
-#endif
-
-
-/////////////// Usage Example ///////////////
-
-#ifdef EXAMPLE_CODE
-
-// you need to #include "m_updater.h" and HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded) in your Load function...
-
-int OnModulesLoaded(WPARAM wParam, LPARAM lParam) {
-
- Update update = {0}; // for c you'd use memset or ZeroMemory...
- char szVersion[16];
-
- update.cbSize = sizeof(Update);
-
- update.szComponentName = pluginInfo.shortName;
- update.pbVersion = (BYTE *)CreateVersionString(&pluginInfo, szVersion);
- update.cpbVersion = strlen((char *)update.pbVersion);
-
- // these are the three lines that matter - the archive, the page containing the version string, and the text (or data)
- // before the version that we use to locate it on the page
- // (note that if the update URL and the version URL point to standard file listing entries, the backend xml
- // data will be used to check for updates rather than the actual web page - this is not true for beta urls)
- update.szUpdateURL = "http://scottellis.com.au:81/test/updater.zip";
- update.szVersionURL = "http://scottellis.com.au:81/test/updater_test.html";
- update.pbVersionPrefix = (BYTE *)"Updater version ";
-
- update.cpbVersionPrefix = strlen((char *)update.pbVersionPrefix);
-
- // do the same for the beta versions of the above struct members if you wish to allow beta updates from another URL
-
- CallService(MS_UPDATE_REGISTER, 0, (WPARAM)&update);
-
- // Alternatively, to register a plugin with e.g. file ID 2254 on the file listing...
- // CallService(MS_UPDATE_REGISTERFL, (WPARAM)2254, (LPARAM)&pluginInfo);
-
- return 0;
-}
-
-#endif
diff --git a/yamn/YAMN_10.vcxproj b/yamn/YAMN_10.vcxproj new file mode 100644 index 0000000..601eef5 --- /dev/null +++ b/yamn/YAMN_10.vcxproj @@ -0,0 +1,277 @@ +<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectName>Yamn</ProjectName>
+ <ProjectGuid>{C5A87409-F08C-4A07-A8F9-1F5D52BA6D72}</ProjectGuid>
+ <RootNamespace>yamn</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">../../../Files/Debug/Plugins\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)/Obj/$(ProjectName)\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">../../../Files/Release/Plugins\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)/Obj/$(ProjectName)\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)Release64/Plugins\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)Release64/Obj/$(ProjectName)\</IntDir>
+ <ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Release|x64'">*.obj%3b*.ilk%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.pch%3b*.pgc%3b*.pgd%3b*.meta%3b$(TargetPath)%3b$(TargetDir)$(ProjectName).*%3b$(TargetDir)$(RootNamespace).*</ExtensionsToDeleteOnClean>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)Debug64/Plugins\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)Debug64/Obj/$(ProjectName)\</IntDir>
+ <ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">*.obj%3b*.ilk%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.pch%3b*.pgc%3b*.pgd%3b*.meta%3b$(TargetPath)%3b$(TargetDir)$(ProjectName).*%3b$(TargetDir)$(RootNamespace).*</ExtensionsToDeleteOnClean>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../include;../../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_WINDOWS;_USRDLL;_DEBUG;YAMN_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <StructMemberAlignment>4Bytes</StructMemberAlignment>
+ <AssemblerListingLocation>
+ </AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>./libs/unicows.lib;comctl32.lib;wsock32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <BaseAddress>0x60010000</BaseAddress>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <InlineFunctionExpansion>Default</InlineFunctionExpansion>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>../../include;../../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;WIN2IN1;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <StructMemberAlignment>4Bytes</StructMemberAlignment>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <AssemblerListingLocation>
+ </AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>./libs/unicows.lib;comctl32.lib;wsock32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <BaseAddress>0x60010000</BaseAddress>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <Optimization>MinSpace</Optimization>
+ <InlineFunctionExpansion>Default</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>../../include;../../include_API;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;WIN9X;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <AssemblerListingLocation>
+ </AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(IntDir)</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalOptions>/filealign:512 %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalDependencies>comctl32.lib;wsock32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(RootNamespace).dll</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <BaseAddress>0x60010000</BaseAddress>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ <Bscmake>
+ <OutputFile>$(OutDir)$(TargetName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../include;../../include_API;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;YAMN_DEBUG;WIN9X;YAMN_VER_BETA;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <AssemblerListingLocation>
+ </AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(IntDir)</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>comctl32.lib;wsock32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(RootNamespace).dll</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <BaseAddress>0x60010000</BaseAddress>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ <Bscmake>
+ <OutputFile>$(OutDir)$(TargetName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="account.cpp" />
+ <ClCompile Include="debug.cpp" />
+ <ClCompile Include="filterplugin.cpp" />
+ <ClCompile Include="main.cpp" />
+ <ClCompile Include="protoplugin.cpp" />
+ <ClCompile Include="services.cpp" />
+ <ClCompile Include="synchro.cpp" />
+ <ClCompile Include="yamn.cpp" />
+ <ClCompile Include="browser\badconnect.cpp" />
+ <ClCompile Include="browser\mailbrowser.cpp" />
+ <ClCompile Include="mails\decode.cpp" />
+ <ClCompile Include="mails\mails.cpp" />
+ <ClCompile Include="mails\mime.cpp" />
+ <ClCompile Include="proto\md5.c" />
+ <ClCompile Include="proto\netlib.cpp" />
+ <ClCompile Include="proto\pop3\pop3.cpp" />
+ <ClCompile Include="proto\pop3\pop3comm.cpp" />
+ <ClCompile Include="proto\pop3\pop3opt.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="resources\iconeutral.ico" />
+ <None Include="resources\iconttbdown.ico" />
+ <None Include="resources\icooffline.ico" />
+ <None Include="resources\icoyamn3.ico" />
+ <None Include="resources\yamn.bmp" />
+ <None Include="ChangeLog.txt" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="resources\resource.h" />
+ <ClInclude Include="debug.h" />
+ <ClInclude Include="main.h" />
+ <ClInclude Include="proto\pop3\pop3.h" />
+ <ClInclude Include="proto\pop3\pop3comm.h" />
+ <ClInclude Include="proto\pop3\pop3opt.h" />
+ <ClInclude Include="yamn.h" />
+ <ClInclude Include="include\m_kbdnotify.h" />
+ <ClInclude Include="include\m_toptoolbar.h" />
+ <ClInclude Include="include\m_uninstaller.h" />
+ <ClInclude Include="include\m_updater.h" />
+ <ClInclude Include="version.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="resources\YAMN.rc" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/yamn/YAMN_10.vcxproj.filters b/yamn/YAMN_10.vcxproj.filters new file mode 100644 index 0000000..b684f9d --- /dev/null +++ b/yamn/YAMN_10.vcxproj.filters @@ -0,0 +1,143 @@ +<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{30eb0c8d-5383-47ff-8a05-4b9793d26d50}</UniqueIdentifier>
+ <Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
+ </Filter>
+ <Filter Include="Source Files\Mail browser, dialogs">
+ <UniqueIdentifier>{6b01a00c-f1f9-4958-b89a-2721d5bdd229}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="Source Files\Mails">
+ <UniqueIdentifier>{4743640f-ca6b-4518-8ead-525bea367ec0}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="Source Files\POP3 plugin">
+ <UniqueIdentifier>{0189ff00-aae9-40fd-847b-a81dca9496bd}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{daef8d66-0947-4a6c-ad55-4e1b2bf26d86}</UniqueIdentifier>
+ <Extensions>ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{c58708cc-53b7-4db2-b19e-4d6291665e8b}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="Header Files\include">
+ <UniqueIdentifier>{a5d01df4-9348-4078-ab04-99ee691cd263}</UniqueIdentifier>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="account.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="debug.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="filterplugin.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="main.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="protoplugin.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="services.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="synchro.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="yamn.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="browser\badconnect.cpp">
+ <Filter>Source Files\Mail browser, dialogs</Filter>
+ </ClCompile>
+ <ClCompile Include="browser\mailbrowser.cpp">
+ <Filter>Source Files\Mail browser, dialogs</Filter>
+ </ClCompile>
+ <ClCompile Include="mails\decode.cpp">
+ <Filter>Source Files\Mails</Filter>
+ </ClCompile>
+ <ClCompile Include="mails\mails.cpp">
+ <Filter>Source Files\Mails</Filter>
+ </ClCompile>
+ <ClCompile Include="mails\mime.cpp">
+ <Filter>Source Files\Mails</Filter>
+ </ClCompile>
+ <ClCompile Include="proto\md5.c">
+ <Filter>Source Files\POP3 plugin</Filter>
+ </ClCompile>
+ <ClCompile Include="proto\netlib.cpp">
+ <Filter>Source Files\POP3 plugin</Filter>
+ </ClCompile>
+ <ClCompile Include="proto\pop3\pop3.cpp">
+ <Filter>Source Files\POP3 plugin</Filter>
+ </ClCompile>
+ <ClCompile Include="proto\pop3\pop3comm.cpp">
+ <Filter>Source Files\POP3 plugin</Filter>
+ </ClCompile>
+ <ClCompile Include="proto\pop3\pop3opt.cpp">
+ <Filter>Source Files\POP3 plugin</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="resources\iconeutral.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="resources\iconttbdown.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="resources\icooffline.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="resources\icoyamn3.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="resources\yamn.bmp">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="ChangeLog.txt" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="resources\resource.h">
+ <Filter>Resource Files</Filter>
+ </ClInclude>
+ <ClInclude Include="debug.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="main.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="proto\pop3\pop3.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="proto\pop3\pop3comm.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="proto\pop3\pop3opt.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="yamn.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="include\m_kbdnotify.h">
+ <Filter>Header Files\include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\m_toptoolbar.h">
+ <Filter>Header Files\include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\m_uninstaller.h">
+ <Filter>Header Files\include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\m_updater.h">
+ <Filter>Header Files\include</Filter>
+ </ClInclude>
+ <ClInclude Include="version.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="resources\YAMN.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
+ </ItemGroup>
+</Project>
\ No newline at end of file diff --git a/yamn/icons/proto_YAMN.vcproj b/yamn/icons/proto_YAMN.vcproj new file mode 100644 index 0000000..e4c1d85 --- /dev/null +++ b/yamn/icons/proto_YAMN.vcproj @@ -0,0 +1,237 @@ +<?xml version="1.0" encoding="windows-1251"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="Proto_Yamn"
+ ProjectGUID="{C1CDB82C-6BBF-496E-88F4-CC57E60B0CA9}"
+ RootNamespace="Proto_Yamn"
+ TargetFrameworkVersion="0"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="../../../../Files/Release/Icons"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/proto_YAMN.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="4"
+ RuntimeLibrary="0"
+ PrecompiledHeaderFile=".\Release/proto_YAMN.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/filealign:512"
+ AdditionalDependencies="odbc32.lib odbccp32.lib"
+ IgnoreAllDefaultLibraries="true"
+ SubSystem="2"
+ ResourceOnlyDLL="true"
+ RandomizedBaseAddress="1"
+ ImportLibrary=""
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="../../../../Files/Debug/Icons"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Release/proto_YAMN.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="4"
+ RuntimeLibrary="0"
+ PrecompiledHeaderFile=".\Release/proto_YAMN.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/filealign:512"
+ AdditionalDependencies="odbc32.lib odbccp32.lib"
+ IgnoreAllDefaultLibraries="true"
+ SubSystem="2"
+ ResourceOnlyDLL="true"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary=""
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Resource Files"
+ Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+ >
+ <File
+ RelativePath="..\resources\iconeutral.ico"
+ >
+ </File>
+ <File
+ RelativePath="..\resources\iconttbdown.ico"
+ >
+ </File>
+ <File
+ RelativePath="iconttbup.ico"
+ >
+ </File>
+ <File
+ RelativePath="..\resources\icooffline.ico"
+ >
+ </File>
+ <File
+ RelativePath="icoyamn1.ico"
+ >
+ </File>
+ <File
+ RelativePath="icoyamn2.ico"
+ >
+ </File>
+ <File
+ RelativePath="..\resources\icoyamn3.ico"
+ >
+ </File>
+ <File
+ RelativePath="proto_YAMN.rc"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/yamn/icons/proto_YAMN.vcproj.Nout.User.user b/yamn/icons/proto_YAMN.vcproj.Nout.User.user new file mode 100644 index 0000000..33b4536 --- /dev/null +++ b/yamn/icons/proto_YAMN.vcproj.Nout.User.user @@ -0,0 +1,65 @@ +<?xml version="1.0" encoding="windows-1251"?>
+<VisualStudioUserFile
+ ProjectType="Visual C++"
+ Version="9,00"
+ ShowAllFiles="false"
+ >
+ <Configurations>
+ <Configuration
+ Name="Release|Win32"
+ >
+ <DebugSettings
+ Command=""
+ WorkingDirectory=""
+ CommandArguments=""
+ Attach="false"
+ DebuggerType="3"
+ Remote="1"
+ RemoteMachine="NOUT"
+ RemoteCommand=""
+ HttpUrl=""
+ PDBPath=""
+ SQLDebugging=""
+ Environment=""
+ EnvironmentMerge="true"
+ DebuggerFlavor=""
+ MPIRunCommand=""
+ MPIRunArguments=""
+ MPIRunWorkingDirectory=""
+ ApplicationCommand=""
+ ApplicationArguments=""
+ ShimCommand=""
+ MPIAcceptMode=""
+ MPIAcceptFilter=""
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|Win32"
+ >
+ <DebugSettings
+ Command=""
+ WorkingDirectory=""
+ CommandArguments=""
+ Attach="false"
+ DebuggerType="3"
+ Remote="1"
+ RemoteMachine="NOUT"
+ RemoteCommand=""
+ HttpUrl=""
+ PDBPath=""
+ SQLDebugging=""
+ Environment=""
+ EnvironmentMerge="true"
+ DebuggerFlavor=""
+ MPIRunCommand=""
+ MPIRunArguments=""
+ MPIRunWorkingDirectory=""
+ ApplicationCommand=""
+ ApplicationArguments=""
+ ShimCommand=""
+ MPIAcceptMode=""
+ MPIAcceptFilter=""
+ />
+ </Configuration>
+ </Configurations>
+</VisualStudioUserFile>
diff --git a/yamn/icons/proto_YAMN_10.vcxproj b/yamn/icons/proto_YAMN_10.vcxproj new file mode 100644 index 0000000..9d48ff5 --- /dev/null +++ b/yamn/icons/proto_YAMN_10.vcxproj @@ -0,0 +1,132 @@ +<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectName>Proto_Yamn</ProjectName>
+ <ProjectGuid>{C1CDB82C-6BBF-496E-88F4-CC57E60B0CA9}</ProjectGuid>
+ <RootNamespace>Proto_Yamn</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">../../../../Files/Release/Icons\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)/Obj/$(ProjectName)\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">../../../../Files/Debug/Icons\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)/Obj/$(ProjectName)\</IntDir>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Release/proto_YAMN.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <PrecompiledHeaderOutputFile>.\Release/proto_YAMN.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>.\Release/</AssemblerListingLocation>
+ <ObjectFileName>.\Release/</ObjectFileName>
+ <ProgramDataBaseFileName>.\Release/</ProgramDataBaseFileName>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ <Link>
+ <AdditionalOptions>/filealign:512 %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalDependencies>odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
+ <SubSystem>Windows</SubSystem>
+ <NoEntryPoint>true</NoEntryPoint>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <ImportLibrary>
+ </ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Release/proto_YAMN.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <PrecompiledHeaderOutputFile>.\Release/proto_YAMN.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>.\Release/</AssemblerListingLocation>
+ <ObjectFileName>.\Release/</ObjectFileName>
+ <ProgramDataBaseFileName>.\Release/</ProgramDataBaseFileName>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ <Link>
+ <AdditionalOptions>/filealign:512 %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalDependencies>odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
+ <SubSystem>Windows</SubSystem>
+ <NoEntryPoint>true</NoEntryPoint>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <ImportLibrary>
+ </ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <None Include="..\resources\iconeutral.ico" />
+ <None Include="..\resources\iconttbdown.ico" />
+ <None Include="iconttbup.ico" />
+ <None Include="..\resources\icooffline.ico" />
+ <None Include="icoyamn1.ico" />
+ <None Include="icoyamn2.ico" />
+ <None Include="..\resources\icoyamn3.ico" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="proto_YAMN.rc">
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/yamn/icons/proto_YAMN_10.vcxproj.filters b/yamn/icons/proto_YAMN_10.vcxproj.filters new file mode 100644 index 0000000..ae56e31 --- /dev/null +++ b/yamn/icons/proto_YAMN_10.vcxproj.filters @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{4726e1d1-39cd-435a-bd59-51fdb6745f46}</UniqueIdentifier>
+ <Extensions>ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="..\resources\iconeutral.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="..\resources\iconttbdown.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="iconttbup.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="..\resources\icooffline.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="icoyamn1.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="icoyamn2.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="..\resources\icoyamn3.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="proto_YAMN.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
+ </ItemGroup>
+</Project>
\ No newline at end of file diff --git a/yamn/icons/proto_YAMN_10.vcxproj.user b/yamn/icons/proto_YAMN_10.vcxproj.user new file mode 100644 index 0000000..695b5c7 --- /dev/null +++ b/yamn/icons/proto_YAMN_10.vcxproj.user @@ -0,0 +1,3 @@ +<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+</Project>
\ No newline at end of file diff --git a/yamn/include/m_popup.h b/yamn/include/m_popup.h deleted file mode 100644 index 9e5f179..0000000 --- a/yamn/include/m_popup.h +++ /dev/null @@ -1,318 +0,0 @@ -/*
-===============================================================================
- PopUp plugin
-Plugin Name: PopUp
-Plugin authors: Luca Santarelli aka hrk (hrk@users.sourceforge.net)
- Victor Pavlychko aka zazoo (nullbie@gmail.com)
-===============================================================================
-The purpose of this plugin is to give developers a common "platform/interface"
-to show PopUps. It is born from the source code of NewStatusNotify, another
-plugin I've made.
-
-Remember that users *must* have this plugin enabled, or they won't get any
-popup. Write this in the requirements, do whatever you wish ;-)... but tell
-them!
-===============================================================================
-*/
-#ifndef M_POPUP_H
-#define M_POPUP_H
-
-/*
-NOTE! Since Popup 1.0.1.2 there is a main meun group called "PopUps" where I
-have put a "Enable/Disable" item. You can add your own "enable/disable" items
-by adding these lines before you call MS_CLIST_ADDMAINMENUITEM:
-mi.pszPopUpName = Translate("PopUps");
-mi.position = 0; //You don't need it and it's better if you put it to zero.
-*/
-
-//#define MAX_CONTACTNAME 32
-//#define MAX_SECONDLINE 40
-#define MAX_CONTACTNAME 2048
-#define MAX_SECONDLINE 2048
-
-#define POPUP_USE_SKINNED_BG 0xffffffff
-
-//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.
- char lpzContactName[MAX_CONTACTNAME]; //This is the contact name or the first line in the plugin. Cannot be NULL.
- char lpzText[MAX_SECONDLINE]; //This is the second line text. Users can choose to hide it. Cannot be NULL.
- 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;
-
-typedef struct {
- HANDLE lchContact;
- HICON lchIcon;
- char lpzContactName[MAX_CONTACTNAME];
- char lpzText[MAX_SECONDLINE];
- COLORREF colorBack; //Set background to POPUP_USE_SKINNED_BG to turn on skinning
- COLORREF colorText;
- WNDPROC PluginWindowProc;
- void * PluginData;
- int iSeconds; //Custom delay time in seconds. -1 means "forever", 0 means "default time".
-// char cZero[16];
- LPCTSTR lpzClass; //PopUp class. Used with skinning. See PopUp/AddClass for details
- COLORREF skinBack; //Background color for colorizable skins
- char cZero[16 - sizeof(LPCTSTR) - sizeof(COLORREF)];
- //some unused bytes which may come useful in the future.
-} POPUPDATAEX, *LPPOPUPDATAEX;
-
-/*
-When you call MS_POPUP_ADDPOPUP, my plugin will check if the given POPUPDATA structure is filled with acceptable values. If not, the data will be rejected and no popup will be shown.
-
-- lpzText should be given, because it's really bad if a user chooses to have the second line displayed
-and it's empty :-) Just write it and let the user choose if it will be displayed or not.
-
-- PluginWindowProc is a WNDPROC address you have to give me. Why? What? Where? Calm down 8)
-My plugin will take care of the creation of the popup, of the destruction of the popup, of the come into
-view and the hiding of the popup. Transparency, animations... all this stuff.
-My plugin will not (as example) open the MessageWindow when you left click on a popup.
-Why? Because I don't know if your popup desires to open the MessageWindow :))))
-This means that you need to make a WNDPROC which takes care of the WM_messages you need.
-For example, WM_COMMAND or WM_CONTEXTMENU or WM_LMOUSEUP or whatever.
-At the end of your WNDPROC remember to "return DefWindowProc(hwnd, msg, wParam, lParam);"
-When you process a message that needs a return value (an example could be WM_CTLCOLORSTATIC,
-but you don't need to catch it 'cause it's my plugin's job), simply return the nedeed value. :)
-The default WNDPROC does nothing.
-
-- PluginData is a pointer to a void, which means a pointer to anything. You can make your own structure
-to store the data you need (example: a status information, a date, your name, whatever) and give me a
-pointer to that struct.
-You will need to destroy that structure and free the memory when the PopUp is going to be destroyed. You'll know this when you receive a UM_FREEPLUGINDATA. The name tells it all: free your own plugin data.
-
-Appendix A: Messages my plugin will handle and your WNDPROC will never see.
-WM_CREATE, WM_DESTROY, WM_TIMER, WM_ERASEBKGND
-WM_CTLCOLOR* [whatever it may be: WM_CTLCOLORDLG, WM_CTLCOLORSTATIC...]
-WM_PAINT, WM_PRINT, WM_PRINTCLIENT
-
-Appendix B: "What do I need to do?!?".
-Here is an example in C.
-
-//Your plugin is in /plugins/myPlugin/ or in miranda32/something/
-#include "../../plugins/PopUp/m_popup.h"
-
-Define your own plugin data if you need it. In this example, we need it and we'll use NewStatusNotify as example: thsi plugin shows a popup when someone in your contact list changes his/hers status. We'll need to know his status, both current and old one.
-typedef struct {
- WORD oldStatus;
- WORD newStatus;
-} MY_PLUGIN_DATA;
-
-When we need to show the popup, we do:
-{
- POPUPDATA ppd;
- hContact = A_VALID_HANDLE_YOU_GOT_FROM_SOMEWHERE;
- hIcon = A_VALID_HANDLE_YOU_GOT_SOMEWHERE;
- char * lpzContactName = (char*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME,(WPARAM)lhContact,0);
- //99% of the times you'll just copy this line.
- //1% of the times you may wish to change the contact's name. I don't know why you should, but you can.
- char * lpzText;
- //The text for the second line. You could even make something like: char lpzText[128]; lstrcpy(lpzText, "Hello world!"); It's your choice.
- COLORREF colorBack = GetSysColor(COLOR_BTNFACE); //The colour of Miranda's option Pages (and many other windows...)
- COLORREF colorText = RGB(255,255,255); //White.
- MY_PLUGIN_DATA * mpd = (MY_PLUGIN_DATA*)malloc(sizeof(MY_PLUGIN_DATA));
-
- 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.
- ppd.lchIcon = hIcon;
- lstrcpy(ppd.lpzContactName, lpzContactName);
- lstrcpy(ppd.lpzText, lpzText);
- ppd.colorBack = colorBack;
- ppd.colorText = colorText;
- ppd.PluginWindowProc = (WNDPROC)PopupDlgProc;
-
- //Now the "additional" data.
- mpd->oldStatus = ID_STATUS_OFFLINE;
- mpd->newStatus = ID_STATUS_ONLINE;
-
- //Now that the plugin data has been filled, we add it to the PopUpData.
- ppd.PluginData = mpd;
-
- //Now that every field has been filled, we want to see the popup.
- CallService(MS_POPUP_ADDPOPUP, (WPARAM)&ppd, 0);
-}
-
-Obviously, you have previously declared some:
-static int CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
-{
- switch(message) {
- case WM_COMMAND:
- if ((HIWORD)wParam == STN_CLICKED) { //It was a click on the Popup.
- PUDeletePopUp(hWnd);
- return TRUE;
- }
- break;
- case UM_FREEPLUGINDATA: {
- MY_PLUGIN_DATA * mpd = NULL;
- mpd = (MY_PLUGIN_DATA*)CallService(MS_POPUP_GETPLUGINDATA, (WPARAM)hWnd,(LPARAM)mpd);
- if (mdp > 0) free(mpd);
- return TRUE; //TRUE or FALSE is the same, it gets ignored.
- }
- default:
- break;
- }
- return DefWindowProc(hWnd, message, wParam, lParam);
-}
-*/
-
-/*
-Creates, adds and shows a popup, given a (valid) POPUPDATA structure pointer.
-wParam = (WPARAM)(*POPUPDATA)PopUpDataAddress
-lParam = 0
-Returns: > 0 on success, 0 if creation went bad, -1 if the PopUpData contained unacceptable values.
-NOTE: it returns -1 if the PopUpData was not valid, if there were already too many popups, if the module was disabled.
-Otherwise, it can return anything else...
-*/
-#define MS_POPUP_ADDPOPUP "PopUp/AddPopUp"
-static int __inline PUAddPopUp(POPUPDATA* ppdp) {
- return CallService(MS_POPUP_ADDPOPUP, (WPARAM)ppdp,0);
-}
-
-#define MS_POPUP_ADDPOPUPEX "PopUp/AddPopUpEx"
-static int __inline PUAddPopUpEx(POPUPDATAEX* ppdp) {
- return CallService(MS_POPUP_ADDPOPUPEX, (WPARAM)ppdp,0);
-}
-
-/*
-Returns the handle to the contact associated to the specified PopUpWindow.
-You will probably need to know this handle inside your WNDPROC. Exampole: you want to open the MessageWindow. :-)
-Call MS_POPUP_GETCONTACT on the hWnd you were given in the WNDPROC.
-wParam = (WPARAM)(HWND)hPopUpWindow
-lParam = 0;
-Returns: the HANDLE of the contact. Can return NULL, meaning it's the main contact. -1 means failure.
-*/
-#define MS_POPUP_GETCONTACT "PopUp/GetContact"
-static HANDLE __inline PUGetContact(HWND hPopUpWindow) {
- return (HANDLE)CallService(MS_POPUP_GETCONTACT, (WPARAM)hPopUpWindow,0);
-}
-
-/*
-wParam = (WPARAM)(HWND)hPopUpWindow
-lParam = (LPARAM)(PLUGINDATA*)PluginDataAddress;
-Returns: the address of the PLUGINDATA structure. Can return NULL, meaning nothing was given. -1 means failure.
-IMPORTANT NOTE: it doesn't seem to work if you do:
-CallService(..., (LPARAM)aPointerToAStruct);
-and then use that struct.
-Do this, instead:
-aPointerToStruct = CallService(..., (LPARAM)aPointerToAStruct);
-and it will work. Just look at the example I've written above (PopUpDlgProc).
-*/
-#define MS_POPUP_GETPLUGINDATA "PopUp/GetPluginData"
-static void __inline * PUGetPluginData(HWND hPopUpWindow) {
- long * uselessPointer = NULL;
- return (void*)CallService(MS_POPUP_GETPLUGINDATA,(WPARAM)hPopUpWindow,(LPARAM)uselessPointer);
-}
-
-/*
-wParam = 0
-lParam = 0
-Returns: 0 if the user has chosen not to have the second line, 1 if he choose to have the second line.
-*/
-#define MS_POPUP_ISSECONDLINESHOWN "PopUp/IsSecondLineShown"
-static BOOL __inline PUIsSecondLineShown() {
- return (BOOL)CallService(MS_POPUP_ISSECONDLINESHOWN,0,0);
-}
-
-/*
-Requests an action or an answer from PopUp module.
-wParam = (WPARAM)wpQuery
-returns 0 on success, -1 on error, 1 on stupid calls ;-)
-*/
-#define PUQS_ENABLEPOPUPS 1 //returns 0 if state was changed, 1 if state wasn't changed
-#define PUQS_DISABLEPOPUPS 2 // " "
-#define PUQS_GETSTATUS 3 //Returns 1 (TRUE) if popups are enabled, 0 (FALSE) if popups are disabled.
-
-#define MS_POPUP_QUERY "PopUp/Query"
-
-/*
-UM_FREEPLUGINDATA
-wParam = lParam = 0. Process this message if you have allocated your own memory. (i.e.: POPUPDATA.PluginData != NULL)
-*/
-#define UM_FREEPLUGINDATA (WM_USER + 0x0200)
-
-/*
-UM_DESTROYPOPUP
-wParam = lParam = 0. Send this message when you want to destroy the popup, or use the function below.
-*/
-#define UM_DESTROYPOPUP (WM_USER + 0x0201)
-static int __inline PUDeletePopUp(HWND hWndPopUp) {
- return (int)SendMessage(hWndPopUp, UM_DESTROYPOPUP,0,0);
-}
-
-/*
-UM_INITPOPUP
-wParam = (WPARAM)(HWND)hPopUpWindow (but this is useless, since I'll directly send it to your hPopUpWindow
-lParam = 0.
-This message is sent to the PopUp when its creation has been finished, so POPUPDATA (and thus your PluginData) is reachable.
-Catch it if you needed to catch WM_CREATE or WM_INITDIALOG, which you'll never ever get in your entire popup-life.
-Return value: if you process this message, return 0. If you don't process it, return 0. Do whatever you like ;-)
-*/
-#define UM_INITPOPUP (WM_USER + 0x0202)
-
-/*
-wParam = (WPARAM)(HWND)hPopUpWindow
-lParam = (LPARAM)(char*)lpzNewText
-returns: > 0 for success, -1 for failure, 0 if the failure is due to second line not being shown. (but you could call PUIsSecondLineShown() before changing the text...)
-Changes the text displayed in the second line of the popup.
-*/
-#define MS_POPUP_CHANGETEXT "PopUp/Changetext"
-static int __inline PUChangeText(HWND hWndPopUp, LPCTSTR lpzNewText) {
- return (int)CallService(MS_POPUP_CHANGETEXT, (WPARAM)hWndPopUp, (LPARAM)lpzNewText);
-}
-
-/*
-wParam = (WPARAM)(HWND)hPopUpWindow
-lParam = (LPARAM)(POPUPDATAEX*)newData
-Changes the entire popup
-*/
-#define MS_POPUP_CHANGE "PopUp/Change"
-static int __inline PUChange(HWND hWndPopUp, POPUPDATAEX *newData) {
- return (int)CallService(MS_POPUP_CHANGE, (WPARAM)hWndPopUp, (LPARAM)newData);
-}
-
-/*
-This is mainly for developers.
-Shows a warning message in a PopUp. It's useful if you need a "MessageBox" like function, but you don't want a modal window (which will interfere with a DialogProcedure. MessageBox steals focus and control, this one not.
-wParam = (char*) lpzMessage
-lParam = 0;
-Returns: 0 if the popup was shown, -1 in case of failure.
-*/
-#define SM_WARNING 0x01 //Triangle icon.
-#define SM_NOTIFY 0x02 //Exclamation mark icon.
-#define MS_POPUP_SHOWMESSAGE "PopUp/ShowMessage"
-
-static int __inline PUShowMessage(char* lpzText, BYTE kind) {
- return (int)CallService(MS_POPUP_SHOWMESSAGE, (WPARAM)lpzText,(LPARAM)kind);
-}
-
-/*
-Each skinned popup (e.g. with colorBack == POPUP_USE_SKINNED_BG) should have
-class set. Then you can choose separate skin for each class (for example, you
-can create separate class for your plugin and use it for all ypu popups. User
-would became able to choose skin for your popups independently from others)
-
-You have to register popup class before using it. To do so call "PopUp/AddClass"
-with lParam = (LPARAM)(const char *)popUpClassName.
-
-All class names are translated (via Translate()) before being added to list. You
-should use english names for them.
-
-There are three predefined classes and one for backward compatability.
-
-Note that you can add clases after popup wal loaded, e.g. you shoul intercept
-ME_SYSTEM_MODULESLOADED event
-*/
-#define MS_POPUP_ADDCLASS "PopUp/AddClass"
-#define POPUP_CLASS_DEFAULT "Default"
-#define POPUP_CLASS_WARNING "Warning"
-#define POPUP_CLASS_NOTIFY "Notify"
-#define POPUP_CLASS_OLDAPI "PopUp 1.0.1.x compatability" // for internal purposes
-
-static void __inline PUAddClass(const char *lpzClass){
- CallService(MS_POPUP_ADDCLASS, 0, (LPARAM)lpzClass);
-}
-
-#endif
diff --git a/yamn/include/m_toptoolbar.h b/yamn/include/m_toptoolbar.h deleted file mode 100644 index 5b83100..0000000 --- a/yamn/include/m_toptoolbar.h +++ /dev/null @@ -1,125 +0,0 @@ -
-#ifndef M_TOPTOOLBAR_H
-#define M_TOPTOOLBAR_H
-
-//button flags
-#define TTBBF_DISABLED 1
-#define TTBBF_VISIBLE 2
-#define TTBBF_PUSHED 4
-#define TTBBF_SHOWTOOLTIP 8
-#define TTBBF_DRAWBORDER 16//draw border for bitmap,bitmap must be WxH 16x12
-#define TTBBF_ISSEPARATOR 32
-
-//for internal launch buttons
-#define TTBBF_ISLBUTTON 64
-
-typedef struct {
- int cbSize;
- HBITMAP hbBitmapUp;
- HBITMAP hbBitmapDown;
- char *pszServiceUp;
- char *pszServiceDown;
- DWORD dwFlags;
- LPARAM lParamUp;
- WPARAM wParamUp;
- LPARAM lParamDown;
- WPARAM wParamDown;
- char *name;
-
-} TTBButton, * lpTTBButton;
-
-typedef struct {
- int cbSize;
- HBITMAP hbBitmapUp;
- HBITMAP hbBitmapDown;
- char *pszServiceUp;
- char *pszServiceDown;
- DWORD dwFlags;
- LPARAM lParamUp;
- WPARAM wParamUp;
- LPARAM lParamDown;
- WPARAM wParamDown;
- char *name;
- HICON hIconUp,hIconDn;
- char *tooltipUp;
- char *tooltipDn;
-
-} TTBButtonV2, * lpTTBButtonV2;
-
-//=== EVENTS ===
-/*
-toptoolbar/moduleloaded event
-wParam = lParam = 0
-Called when the toolbar services are available
-
-!!!Warning you may work with TTB services only in this event or later.
-
-*/
-#define ME_TTB_MODULELOADED "TopToolBar/ModuleLoaded"
-
-
-
-//=== SERVICES ===
-/*
-toptoolbar/addbutton service
-wparam = (TTBButton*)lpTTBButton
-lparam = 0
-returns: hTTBButton - handle of added button on success, -1 on failure.
-*/
-#define MS_TTB_ADDBUTTON "TopToolBar/AddButton"
-
-/*
-toptoolbar/removebutton service
-wparam = (HANDLE)hTTButton
-lparam = 0
-returns: 0 on success, -1 on failure.
-*/
-#define MS_TTB_REMOVEBUTTON "TopToolBar/RemoveButton"
-
-/*
-toptoolbar/setstate service
-wparam = (HANDLE)hTTButton
-lparam = (LPARAM) state
-returns: 0 on success, -1 on failure.
-*/
-#define TTBST_PUSHED 1
-#define TTBST_RELEASED 2
-
-#define MS_TTB_SETBUTTONSTATE "TopToolBar/SetState"
-
-/*
-toptoolbar/getstate service
-wparam = (HANDLE)hTTButton
-lparam = 0
-returns: state on success, -1 on failure.
-*/
-#define MS_TTB_GETBUTTONSTATE "TopToolBar/GetState"
-
-/*
-toptoolbar/getoptions service
-(HIWORD)wparam = (HANDLE)hTTButton
-(LOWORD)wparam = TTBO_FLAG
-lparam = 0,or lparam=lpTTBButton if flag=TTBO_ALLDATA
-returns: value on success, -1 on failure.
-*/
-#define TTBO_FLAGS 0 //get/set all flags
-#define TTBO_POS 1 //position
-#define TTBO_WIDTH 2 //not impemented
-#define TTBO_HEIGHT 3 //not impemented
-#define TTBO_TIPNAME 4 //tool tip name
-#define TTBO_ALLDATA 5 //change all data via lparam=lpTTBButton
-
-
-#define MS_TTB_GETBUTTONOPTIONS "TopToolBar/GetOptions"
-
-/*
-toptoolbar/setoptions service
-(HIWORD)wparam = (HANDLE)hTTButton
-(LOWORD)wparam = TTBO_FLAG
-lparam = value
-returns: 1 on success, -1 on failure.
-*/
-#define MS_TTB_SETBUTTONOPTIONS "TopToolBar/SetOptions"
-
-
-#endif
diff --git a/yamn/include/m_updater.h b/yamn/include/m_updater.h deleted file mode 100644 index e10bcb3..0000000 --- a/yamn/include/m_updater.h +++ /dev/null @@ -1,156 +0,0 @@ -#ifndef _M_UPDATER_H
-#define _M_UPDATER_H
-
-#include <stdio.h>
-#include "../../../include/newpluginapi.h" //CallService,UnHookEvent
-#include "../../../include/m_utils.h" //window broadcasting
-//#include <newpluginapi.h>
-//#include <m_utils.h>
-
-// NOTES:
-// - For langpack updates, include a string of the following format in the langpack text file:
-// ";FLID: <file listing name> <version>"
-// version must be four numbers seperated by '.', in the range 0-255 inclusive
-// - Updater will disable plugins that are downloaded but were not active prior to the update (this is so that, if an archive contains e.g. ansi and
-// unicode versions, the correct plugin will be the only one active after the new version is installed)...so if you add a support plugin, you may need
-// to install an ini file to make the plugin activate when miranda restarts after the update
-// - Updater will replace all dlls that have the same internal shortName as a downloaded update dll (this is so that msn1.dll and msn2.dll, for example,
-// will both be updated) - so if you have a unicode and a non-unicode version of a plugin in your archive, you should make the internal names different (which will break automatic
-// updates from the file listing if there is only one file listing entry for both versions, unless you use the 'MS_UPDATE_REGISTER' service below)
-// - Updater will install all files in the root of the archive into the plugins folder, except for langpack files that contain the FLID string which go into the root folder (same
-// folder as miranda32.exe)...all folders in the archive will also be copied to miranda's root folder, and their contents transferred into the new folders. The only exception is a
-// special folder called 'root_files' - if there is a folder by that name in the archive, it's contents will also be copied into miranda's root folder - this is intended to be used
-// to install additional dlls etc that a plugin may require)
-
-// if you set Update.szUpdateURL to the following value when registering, as well as setting your beta site and version data,
-// Updater will ignore szVersionURL and pbVersionPrefix, and attempt to find the file listing URL's from the backend XML data.
-// for this to work, the plugin name in pluginInfo.shortName must match the file listing exactly (except for case)
-#define UPDATER_AUTOREGISTER "UpdaterAUTOREGISTER"
-// Updater will also use the backend xml data if you provide URL's that reference the miranda file listing for updates (so you can use that method
-// if e.g. your plugin shortName does not match the file listing) - it will grab the file listing id from the end of these URLs
-
-typedef struct Update_tag {
- int cbSize;
- char *szComponentName; // component name as it will appear in the UI (will be translated before displaying)
-
- char *szVersionURL; // URL where the current version can be found (NULL to disable)
- BYTE *pbVersionPrefix; // bytes occuring in VersionURL before the version, used to locate the version information within the URL data
- // (note that this URL could point at a binary file - dunno why, but it could :)
- int cpbVersionPrefix; // number of bytes pointed to by pbVersionPrefix
- char *szUpdateURL; // URL where dll/zip is located
- // set to UPDATER_AUTOREGISTER if you want Updater to find the file listing URLs (ensure plugin shortName matches file listing!)
-
- char *szBetaVersionURL; // URL where the beta version can be found (NULL to disable betas)
- BYTE *pbBetaVersionPrefix; // bytes occuring in VersionURL before the version, used to locate the version information within the URL data
- int cpbBetaVersionPrefix; // number of bytes pointed to by pbVersionPrefix
- char *szBetaUpdateURL; // URL where dll/zip is located
-
- BYTE *pbVersion; // bytes of current version, used for comparison with those in VersionURL
- int cpbVersion; // number of bytes pointed to by pbVersion
-
- char *szBetaChangelogURL; // url for displaying changelog for beta versions
-} Update;
-
-// register a comonent with Updater
-//
-// wparam = 0
-// lparam = (LPARAM)&Update
-#define MS_UPDATE_REGISTER "Update/Register"
-
-// utility functions to create a version string from a DWORD or from pluginInfo
-// point buf at a buffer at least 16 chars wide - but note the version string returned may be shorter
-//
-__inline static char *CreateVersionString(DWORD version, char *buf) {
- mir_snprintf(buf, 16, "%d.%d.%d.%d", (version >> 24) & 0xFF, (version >> 16) & 0xFF, (version >> 8) & 0xFF, version & 0xFF);
- return buf;
-}
-
-__inline static char *CreateVersionStringPlugin(PLUGININFO *pluginInfo, char *buf) {
- return CreateVersionString(pluginInfo->version, buf);
-}
-
-__inline static char *CreateVersionStringPluginEx(PLUGININFOEX *pluginInfo, char *buf) {
- return CreateVersionString(pluginInfo->version, buf);
-}
-
-
-// register the 'easy' way - use this method if you have no beta URL and the plugin is on the miranda file listing
-// NOTE: the plugin version string on the file listing must be the string version of the version in pluginInfo (i.e. 0.0.0.1,
-// four numbers between 0 and 255 inclusivem, so no letters, brackets, etc.)
-//
-// wParam = (int)fileID - this is the file ID from the file listing (i.e. the number at the end of the download link)
-// lParam = (PLUGININFO*)&pluginInfo
-#define MS_UPDATE_REGISTERFL "Update/RegisterFL"
-
-// this function can be used to 'unregister' components - useful for plugins that register non-plugin/langpack components and
-// may need to change those components on the fly
-// lParam = (char *)szComponentName
-#define MS_UPDATE_UNREGISTER "Update/Unregister"
-
-// this event is fired when the startup process is complete, but NOT if a restart is imminent
-// it is designed for status managment plugins to use as a trigger for beggining their own startup process
-// wParam = lParam = 0 (unused)
-// (added in version 0.1.6.0)
-#define ME_UPDATE_STARTUPDONE "Update/StartupDone"
-
-// this service can be used to enable/disable Updater's global status control
-// it can be called from the StartupDone event handler
-// wParam = (BOOL)enable
-// lParam = 0
-// (added in version 0.1.6.0)
-#define MS_UPDATE_ENABLESTATUSCONTROL "Update/EnableStatusControl"
-
-// An description of usage of the above service and event:
-// Say you are a status control plugin that normally sets protocol or global statuses in your ModulesLoaded event handler.
-// In order to make yourself 'Updater compatible', you would move the status control code from ModulesLoaded to another function,
-// say DoStartup. Then, in ModulesLoaded you would check for the existence of the MS_UPDATE_ENABLESTATUSCONTROL service.
-// If it does not exist, call DoStartup. If it does exist, hook the ME_UPDATE_STARTUPDONE event and call DoStartup from there. You may
-// also wish to call MS_UPDATE_ENABLESTATUSCONTROL with wParam == FALSE at this time, to disable Updater's own status control feature.
-
-// this service can be used to determine whether updates are possible for a component with the given name
-// wParam = 0
-// lParam = (char *)szComponentName
-// returns TRUE if updates are supported, FALSE otherwise
-#define MS_UPDATE_ISUPDATESUPPORTED "Update/IsUpdateSupported"
-
-#endif
-
-
-/////////////// Usage Example ///////////////
-
-#ifdef EXAMPLE_CODE
-
-// you need to #include "m_updater.h" and HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded) in your Load function...
-
-int OnModulesLoaded(WPARAM wParam, LPARAM lParam) {
-
- Update update = {0}; // for c you'd use memset or ZeroMemory...
- char szVersion[16];
-
- update.cbSize = sizeof(Update);
-
- update.szComponentName = pluginInfo.shortName;
- update.pbVersion = (BYTE *)CreateVersionString(&pluginInfo, szVersion);
- update.cpbVersion = strlen((char *)update.pbVersion);
-
- // these are the three lines that matter - the archive, the page containing the version string, and the text (or data)
- // before the version that we use to locate it on the page
- // (note that if the update URL and the version URL point to standard file listing entries, the backend xml
- // data will be used to check for updates rather than the actual web page - this is not true for beta urls)
- update.szUpdateURL = "http://scottellis.com.au:81/test/updater.zip";
- update.szVersionURL = "http://scottellis.com.au:81/test/updater_test.html";
- update.pbVersionPrefix = (BYTE *)"Updater version ";
-
- update.cpbVersionPrefix = strlen((char *)update.pbVersionPrefix);
-
- // do the same for the beta versions of the above struct members if you wish to allow beta updates from another URL
-
- CallService(MS_UPDATE_REGISTER, 0, (WPARAM)&update);
-
- // Alternatively, to register a plugin with e.g. file ID 2254 on the file listing...
- // CallService(MS_UPDATE_REGISTERFL, (WPARAM)2254, (LPARAM)&pluginInfo);
-
- return 0;
-}
-
-#endif
diff --git a/yamn/main.cpp b/yamn/main.cpp index 9abb1a9..3a7db58 100644 --- a/yamn/main.cpp +++ b/yamn/main.cpp @@ -52,13 +52,15 @@ static int iDllPlugins=0; PLUGINLINK *pluginLink;
YAMN_VARIABLES YAMNVar;
+int hLangpack;
+
static const MUUID interfaces[] = {MUUID_YAMN_FORCECHECK, MIID_LAST};
PLUGININFOEX pluginInfo={
sizeof(PLUGININFOEX),
YAMN_SHORTNAME,
YAMN_VERSION,
- "Mail notifier and browser for Miranda IM. Included POP3 protocol.",
+ "Mail notifier and browser for Miranda IM. Included POP3 protocol. Mod for Mataes Pack.",
"y_b tweety (majvan)",
"francois.mean@skynet.be",
" (2002-2004 majvan) 2005-2007 tweety y_b Miranda community",
@@ -325,7 +327,7 @@ int SystemModulesLoaded(WPARAM,LPARAM){ for (int i=0; i<ICONSNUMBER; i++){
sid.iDefaultIndex = -iconIndexes[i];
sid.pszName = iconNames[i];
- sid.pszDescription = Translate(iconDescs[i]);
+ sid.pszDescription = iconDescs[i];
sid.hDefaultIcon = hYamnIcons[i];
CallService(MS_SKIN2_ADDICON, 0, (LPARAM)&sid);
if (temp = (HICON) CallService(MS_SKIN2_GETICON, 0, (LPARAM) iconNames[i]))hYamnIcons[i]=temp;
@@ -340,19 +342,19 @@ int SystemModulesLoaded(WPARAM,LPARAM){ mi.position = 0xb0000000;
mi.flags = 0;
mi.hIcon = hYamnIcons[5];
- mi.pszName = Translate("Check &mail (All Account)");
+ mi.pszName = "Check &mail (All Account)";
mi.pszPopupName = NULL;//ProtoName;
mi.pszService = MS_YAMN_FORCECHECK;
- if(DBGetContactSettingByte(NULL, YAMN_DBMODULE, YAMN_SHOWMAINMENU, 0))
+ if(DBGetContactSettingByte(NULL, YAMN_DBMODULE, YAMN_SHOWMAINMENU, 1))
hMenuItemMain = (HANDLE) CallService(MS_CLIST_ADDMAINMENUITEM,0,(LPARAM)&mi);
- mi.pszName = Translate("Check &mail (This Account)");
+ mi.pszName = "Check &mail (This Account)";
mi.pszContactOwner = ProtoName;
mi.pszService = MS_YAMN_CLISTCONTEXT;
hMenuItemCont = (HANDLE) CallService(MS_CLIST_ADDCONTACTMENUITEM,0,(LPARAM)&mi);
mi.hIcon = hYamnIcons[4];
- mi.pszName = Translate("Launch application");
+ mi.pszName = "Launch application";
mi.pszContactOwner = ProtoName;
mi.pszService = MS_YAMN_CLISTCONTEXTAPP;
hMenuItemContApp = (HANDLE) CallService(MS_CLIST_ADDCONTACTMENUITEM,0,(LPARAM)&mi);
@@ -393,7 +395,7 @@ int SystemModulesLoaded(WPARAM,LPARAM){ //char AccountFolder[MAX_PATH];
//CallService(MS_DB_GETPROFILEPATH, (WPARAM) MAX_PATH, (LPARAM)AccountFolder);
//sprintf(AccountFolder,"%s\\%s",AccountFolder,ProtoName);
- hAccountFolder = FoldersRegisterCustomPathW(ProtoName,YAMN_DBMODULE" Account Folder",UserDirectory);
+ hAccountFolder = FoldersRegisterCustomPathW(ProtoName,YAMN_DBMODULE" Account Folder", UserDirectory);
FoldersGetCustomPathW(hAccountFolder, UserDirectory, MAX_PATH, UserDirectory);
//MultiByteToWideChar(CP_ACP,MB_USEGLYPHCHARS,AccountFolder,-1,UserDirectory,strlen(AccountFolder)+1);
@@ -414,6 +416,7 @@ extern "C" int __declspec(dllexport) Load(PLUGINLINK *link) int i,k;
pluginLink=link;
+ mir_getLP(&pluginInfo);
YAMN_STATUS = ID_STATUS_OFFLINE;
diff --git a/yamn/main.h b/yamn/main.h index 21923ae..ee1d338 100644 --- a/yamn/main.h +++ b/yamn/main.h @@ -13,14 +13,14 @@ //#define YAMN_9x
#ifndef WIN2IN1
#ifdef YAMN_9x
- #define YAMN_SHORTNAME "YAMN tweety win9x"
+ #define YAMN_SHORTNAME "YAMN Mataes Release"
#define YAMN_FILENAME "yamn_9x"
#else
- #define YAMN_SHORTNAME "YAMN tweety"
+ #define YAMN_SHORTNAME "YAMN Mataes Release"
#define YAMN_FILENAME "yamn"
#endif
#else
- #define YAMN_SHORTNAME "YAMN tweety 2in1"
+ #define YAMN_SHORTNAME "YAMN Mataes Release"
#define YAMN_FILENAME "yamn"
#endif //WIN2IN1
@@ -47,7 +47,7 @@ #define YAMN_SHOWASPROTO "ShowAsProtcol"
#define YAMN_DBTIMEOPTIONS "MailBrowserTimeOpts"
-#define YAMN_DEFAULTHK MAKEWORD(VK_F12,MOD_CONTROL)
+#define YAMN_DEFAULTHK MAKEWORD(VK_F11,MOD_CONTROL)
#define SHOWDATELONG 0x01
#define SHOWDATENOTODAY 0x02
diff --git a/yamn/proto/pop3/pop3comm.cpp b/yamn/proto/pop3/pop3comm.cpp index d80ab20..44cbfcc 100644 --- a/yamn/proto/pop3/pop3comm.cpp +++ b/yamn/proto/pop3/pop3comm.cpp @@ -341,7 +341,7 @@ int RegisterPOP3Plugin(WPARAM,LPARAM) }
/*//this doesn't work. the function doesn't know which contact to check
- //if((Finder->Flags & YAMN_ACC_ENA) && (Finder->NewMailN.Flags & YAMN_ACC_CONT) && DBGetContactSettingByte(NULL, YAMN_DBMODULE, YAMN_SHOWMAINMENU, 0))
+ //if((Finder->Flags & YAMN_ACC_ENA) && (Finder->NewMailN.Flags & YAMN_ACC_CONT) && DBGetContactSettingByte(NULL, YAMN_DBMODULE, YAMN_SHOWMAINMENU, 1))
//{
// mi.cbSize = sizeof(mi);
// mi.position = 0xb0000000;
diff --git a/yamn/proto/pop3/pop3opt.cpp b/yamn/proto/pop3/pop3opt.cpp index 004d2aa..ec748ac 100644 --- a/yamn/proto/pop3/pop3opt.cpp +++ b/yamn/proto/pop3/pop3opt.cpp @@ -27,7 +27,6 @@ #include "../../main.h"
#include "pop3comm.h"
#include "pop3opt.h"
-#include "uxtheme.h"
//- imported ---------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
@@ -88,8 +87,8 @@ INT_PTR CALLBACK DlgProcYAMNOpt(HWND hDlg,UINT msg,WPARAM wParam,LPARAM lParam) CheckDlgButton(hDlg,IDC_LONGDATE,(optDateTime&SHOWDATELONG) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hDlg,IDC_SMARTDATE,(optDateTime&SHOWDATENOTODAY) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hDlg,IDC_NOSECONDS,(optDateTime&SHOWDATENOSECONDS) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hDlg,IDC_MAINMENU,DBGetContactSettingByte(NULL, YAMN_DBMODULE, YAMN_SHOWMAINMENU, 0));
- CheckDlgButton(hDlg,IDC_YAMNASPROTO,DBGetContactSettingByte(NULL, YAMN_DBMODULE, YAMN_SHOWASPROTO, 0));
+ CheckDlgButton(hDlg,IDC_MAINMENU,DBGetContactSettingByte(NULL, YAMN_DBMODULE, YAMN_SHOWMAINMENU, 1));
+ CheckDlgButton(hDlg,IDC_YAMNASPROTO,DBGetContactSettingByte(NULL, YAMN_DBMODULE, YAMN_SHOWASPROTO, 1));
CheckDlgButton(hDlg,IDC_CLOSEONDELETE,DBGetContactSettingByte(NULL, YAMN_DBMODULE, YAMN_CLOSEDELETE, 0));
break;
@@ -255,7 +254,7 @@ int YAMNOptInitSvc(WPARAM wParam,LPARAM lParam) odp.cbSize=sizeof(odp);
odp.position=0x00000000;
odp.hInstance=YAMNVar.hInst;
- odp.pszGroup=LPGEN("Plugins");
+ odp.pszGroup=LPGEN("Network");
odp.pszTitle=LPGEN("YAMN");
odp.flags=ODPF_BOLDGROUPS;
//insert YAMN options dialog
@@ -280,7 +279,7 @@ int YAMNOptInitSvc(WPARAM wParam,LPARAM lParam) if( ServiceExists(MS_POPUP_ADDPOPUPEX) )
{
- odp.pszGroup=Translate("PopUps");
+ odp.pszGroup=LPGEN("PopUps");
odp.pszTab=LPGEN("YAMN");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_POP3ACCOUNTPOPUP);
odp.pfnDlgProc = DlgProcPOP3AccPopup;
@@ -565,7 +564,7 @@ BOOL DlgShowAccount(HWND hDlg,WPARAM wParam,LPARAM lParam) DlgSetItemText(hDlg,(WPARAM)IDC_EDITAPPPARAM,(LPARAM)NULL);
DlgSetItemText(hDlg,(WPARAM)IDC_STTIMELEFT,(LPARAM)NULL);
SetDlgItemInt(hDlg,IDC_EDITPORT,110,FALSE);
- SetDlgItemInt(hDlg,IDC_EDITINTERVAL,10,FALSE);
+ SetDlgItemInt(hDlg,IDC_EDITINTERVAL,30,FALSE);
SetDlgItemInt(hDlg,IDC_EDITPOPS,0,FALSE);
SetDlgItemInt(hDlg,IDC_EDITNPOPS,0,FALSE);
SetDlgItemInt(hDlg,IDC_EDITFPOPS,0,FALSE);
@@ -573,7 +572,7 @@ BOOL DlgShowAccount(HWND hDlg,WPARAM wParam,LPARAM lParam) CheckDlgButton(hDlg,IDC_CHECK,BST_CHECKED);
CheckDlgButton(hDlg,IDC_CHECKSND,BST_CHECKED);
CheckDlgButton(hDlg,IDC_CHECKMSG,BST_UNCHECKED);
- CheckDlgButton(hDlg,IDC_CHECKICO,BST_CHECKED);
+ CheckDlgButton(hDlg,IDC_CHECKICO,BST_UNCHECKED);
CheckDlgButton(hDlg,IDC_CHECKPOP,BST_CHECKED);
CheckDlgButton(hDlg,IDC_CHECKCOL,BST_CHECKED);
CheckDlgButton(hDlg,IDC_CHECKAPP,BST_UNCHECKED);
@@ -602,6 +601,7 @@ BOOL DlgShowAccount(HWND hDlg,WPARAM wParam,LPARAM lParam) CheckDlgButton(hDlg,IDC_CHECKNOTLS,BST_UNCHECKED);
CheckDlgButton(hDlg,IDC_CHECKAPOP,BST_UNCHECKED);
CheckDlgButton(hDlg,IDC_AUTOBODY,BST_UNCHECKED);
+ CheckDlgButton(hDlg,IDC_CHECKCONTACT,BST_CHECKED);
SetDlgItemText(hDlg,IDC_STSTATUS,TranslateT("No account selected"));
}
@@ -686,6 +686,19 @@ BOOL CALLBACK DlgProcPOP3AccStatusOpt(HWND hDlg,UINT msg,WPARAM wParam,LPARAM lP DlgShowAccountStatus(hDlg,(WPARAM)M_SHOWACTUAL,(LPARAM)ActualAccount);
DlgEnableAccountStatus(hDlg,(WPARAM)TRUE,(LPARAM)TRUE);
}
+ else
+ {
+ CheckDlgButton(hDlg,IDC_CHECKST0,BST_CHECKED);
+ CheckDlgButton(hDlg,IDC_CHECKST1,BST_CHECKED);
+ CheckDlgButton(hDlg,IDC_CHECKST2,BST_CHECKED);
+ CheckDlgButton(hDlg,IDC_CHECKST3,BST_CHECKED);
+ CheckDlgButton(hDlg,IDC_CHECKST4,BST_CHECKED);
+ CheckDlgButton(hDlg,IDC_CHECKST5,BST_CHECKED);
+ CheckDlgButton(hDlg,IDC_CHECKST6,BST_CHECKED);
+ CheckDlgButton(hDlg,IDC_CHECKST7,BST_CHECKED);
+ CheckDlgButton(hDlg,IDC_CHECKST8,BST_CHECKED);
+ CheckDlgButton(hDlg,IDC_CHECKST9,BST_CHECKED);
+ }
TranslateDialogDefault(hDlg);
SendMessage(GetParent(hDlg),PSM_UNCHANGED,(WPARAM)hDlg,0);
return TRUE;
@@ -961,7 +974,9 @@ INT_PTR CALLBACK DlgProcPOP3AccOpt(HWND hDlg,UINT msg,WPARAM wParam,LPARAM lPara memset(&OFNStruct,0,sizeof(OPENFILENAME));
OFNStruct.lStructSize=sizeof(OPENFILENAME);
OFNStruct.hwndOwner=hDlg;
- OFNStruct.lpstrFilter=_T("Executables (*.exe;*.bat;*.cmd;*.com)\0*.exe;*.bat;*.cmd;*.com\0All Files (*.*)\0*.*\0");
+ TCHAR filter[MAX_PATH];
+ mir_sntprintf(filter, SIZEOF(filter), _T("%s (*.exe;*.bat;*.cmd;*.com)%c*.exe;*.bat;*.cmd;*.com%c%s (*.*)%c*.*%c"), TranslateT("Executables"), 0, 0, TranslateT("All Files"), 0, 0);
+ OFNStruct.lpstrFilter= filter;
OFNStruct.nFilterIndex=1;
OFNStruct.nMaxFile=MAX_PATH;
OFNStruct.lpstrFile=new TCHAR[MAX_PATH];
diff --git a/yamn/proto/ssl.cpp b/yamn/proto/ssl.cpp deleted file mode 100644 index 2865e91..0000000 --- a/yamn/proto/ssl.cpp +++ /dev/null @@ -1,344 +0,0 @@ -/*
- * This code implements communication based on OpenSSL library
- *
- * (c) majvan 2002,2004
- */
-
-#include "../filter/simple/AggressiveOptimize.h"
-#include <windows.h>
-#include <stdio.h>
-#include <newpluginapi.h> //CallService,UnHookEvent
-#include <m_netlib.h> //socket thorugh proxy functions
-#include <m_langpack.h> //langpack for "connection" and other words
-#include "../debug.h"
-#ifdef SSLTHRUNETLIB
- #include "netlib.h" //yes, we want to use netlib connection
-#endif
-#include "ssl.h"
-
-//--------------------------------------------------------------------------------------------------
-//--------------------------------------------------------------------------------------------------
-
-PFN_SSL_int_void SSL_library_init; // int SSL_library_init()
-PFN_SSL_pvoid_void SSLv23_client_method; // SSL_METHOD *SSLv23_client_method()
-PFN_SSL_pvoid_void TLSv1_client_method; // SSL_METHOD *TLSv1_client_method()
-PFN_SSL_pvoid_pvoid SSL_CTX_new; // SSL_CTX *SSL_CTX_new(SSL_METHOD *method)
-PFN_SSL_void_pvoid SSL_CTX_free; // void SSL_CTX_free(SSL_CTX *ctx);
-PFN_SSL_pvoid_pvoid SSL_new; // SSL *SSL_new(SSL_CTX *ctx)
-PFN_SSL_void_pvoid SSL_free; // void SSL_free(SSL *ssl);
-PFN_SSL_int_pvoid_int SSL_set_fd; // int SSL_set_fd(SSL *ssl, int fd);
-PFN_SSL_int_pvoid SSL_connect; // int SSL_connect(SSL *ssl);
-PFN_SSL_int_pvoid_pvoid_int SSL_read; // int SSL_read(SSL *ssl, void *buffer, int bufsize)
-PFN_SSL_int_pvoid_pvoid_int SSL_write; // int SSL_write(SSL *ssl, void *buffer, int bufsize)
-PFN_SSL_int_pvoid_int SSL_get_error; // int SSL_write(SSL *ssl, int ret)
-
-BOOL SSLLoaded=FALSE;
-HINSTANCE hSSLLibrary=(HINSTANCE)NULL;
-PVOID SSLCtx=NULL;
-PVOID TLSCtx=NULL;
-
-//PVOID CSSLClient::SSLCtx=NULL;
-//BOOL CSSLClient::SSLLoaded=FALSE;
-//HINSTANCE CSSLClient::hSSLLibrary=(HINSTANCE)NULL;
-extern HANDLE hNetlibUser;
-
-void __stdcall SSL_DebugLog( const char *fmt, ... )
-{
- char str[ 4096 ];
- va_list vararg;
-
- va_start( vararg, fmt );
- int tBytes = _vsnprintf( str, sizeof(str)-1, fmt, vararg );
- if ( tBytes == 0 )
- return;
-
- if ( tBytes > 0 )
- str[ tBytes ] = 0;
- else
- str[ sizeof(str)-1 ] = 0;
-
- CallService( MS_NETLIB_LOG, ( WPARAM )hNetlibUser, ( LPARAM )str );
- va_end( vararg );
-}
-
-#define SSLstr "SSL support"
-#define SSLconnstr "SSL connection"
-
-int RegisterSSL()
-{
-#ifdef DEBUG_COMM
- DebugLog(CommFile,"<Register SSL support>");
-#endif
- SSL_DebugLog("%s %sing...",SSLstr,"register");
- if(NULL==(hSSLLibrary=LoadLibrary("ssleay32.dll")))
- if(NULL==(hSSLLibrary=LoadLibrary("libssl32.dll"))) //try to load library using the old OpenSSL filename
- {
-#ifdef DEBUG_COMM
- DebugLog(CommFile,"<error, status:library not found></Register SSL support>\n");
-#endif
- SSL_DebugLog("%s failed.",SSLstr);
- return 0;
- }
-
- if(NULL!=(SSL_library_init=(PFN_SSL_int_void)GetProcAddress(hSSLLibrary,"SSL_library_init")))
- if(NULL!=(SSLv23_client_method=(PFN_SSL_pvoid_void)GetProcAddress(hSSLLibrary,"SSLv23_client_method")))
- if(NULL!=(SSL_CTX_new=(PFN_SSL_pvoid_pvoid)GetProcAddress(hSSLLibrary,"SSL_CTX_new")))
- if(NULL!=(SSL_CTX_free=(PFN_SSL_void_pvoid)GetProcAddress(hSSLLibrary,"SSL_CTX_free")))
- if(NULL!=(SSL_new=(PFN_SSL_pvoid_pvoid)GetProcAddress(hSSLLibrary,"SSL_new")))
- if(NULL!=(SSL_free=(PFN_SSL_void_pvoid)GetProcAddress(hSSLLibrary,"SSL_free")))
- if(NULL!=(SSL_set_fd=(PFN_SSL_int_pvoid_int)GetProcAddress(hSSLLibrary,"SSL_set_fd")))
- if(NULL!=(SSL_connect=(PFN_SSL_int_pvoid)GetProcAddress(hSSLLibrary,"SSL_connect")))
- if(NULL!=(SSL_read=(PFN_SSL_int_pvoid_pvoid_int)GetProcAddress(hSSLLibrary,"SSL_read")))
- if(NULL!=(SSL_write=(PFN_SSL_int_pvoid_pvoid_int)GetProcAddress(hSSLLibrary,"SSL_write")))
- if(NULL!=(SSL_get_error=(PFN_SSL_int_pvoid_int)GetProcAddress(hSSLLibrary,"SSL_get_error")))
- {
- TLSv1_client_method=(PFN_SSL_pvoid_void)GetProcAddress(hSSLLibrary,"TLSv1_client_method");
- if (TLSv1_client_method) {
- TLSCtx=SSL_CTX_new(TLSv1_client_method()); //TLS1 only used
- } else {
- SSL_DebugLog("TLSv1 not available");
- }
- SSL_library_init();
- SSLCtx=SSL_CTX_new(SSLv23_client_method()); //SSL2,3 & TLS1 used
-#ifdef DEBUG_COMM
- DebugLog(CommFile,"</Register SSL support>\n");
-#endif
- SSLLoaded=TRUE;
- SSL_DebugLog("%s %sed.",SSLstr,"register");
- return 1;
- }
-
- FreeLibrary(hSSLLibrary);
- hSSLLibrary=(HINSTANCE)NULL;
-#ifdef DEBUG_COMM
- DebugLog(CommFile,"<error, status:library not compatible></Register SSL support>\n");
-#endif
- SSL_DebugLog("%s failed: %s not compatible",SSLstr,"ssleay32.dll");
- return 0;
-}
-
-//Connects to the server through the sock
-//if not success, exception is throwed
-void CSSLClient::Connect(const char* servername,const int port) throw(DWORD)
-{
- WSADATA wsaData;
-
- NetworkError=SystemError=0;
-
- if(!SSLLoaded)
- throw NetworkError=ESSL_NOTLOADED;
- try
- {
-#ifdef SSLTHRUNETLIB
- NETLIBOPENCONNECTION nloc;
-
- nloc.cbSize=sizeof(NETLIBOPENCONNECTION);
- nloc.szHost=servername;
- nloc.wPort=port;
- nloc.flags=0;
- #ifdef DEBUG_COMM
- DebugLog(CommFile,"<open connection>\n");
- #endif
- if(NULL==(hNLConn=(HANDLE)CallService(MS_NETLIB_OPENCONNECTION,(WPARAM)hNetlibUser,(LPARAM)&nloc)))
- {
- #ifdef DEBUG_COMM
- DebugLog(CommFile,"<error></open connection>\n");
- #endif
- sock=INVALID_SOCKET;
- }
- else
- {
- #ifdef DEBUG_COMM
- DebugLog(CommFile,"</open connection>\n");
- #endif
- sock=CallService(MS_NETLIB_GETSOCKET,(WPARAM)hNLConn,0);
- }
-#endif
-
- if(sock==INVALID_SOCKET)
- {
- if(0!=WSAStartup(MAKEWORD(2,0),&wsaData))
- {
- SystemError=WSAGetLastError();
- throw NetworkError=(DWORD)ESSL_WINSOCKINIT;
- }
- ZeroMemory(&connection,sizeof(struct sockaddr_in));
-#ifdef DEBUG_COMM
- DebugLog(CommFile,"<gethostbyname>\n");
-#endif
- if(NULL==(server=gethostbyname(servername)))
- {
- SystemError=WSAGetLastError();
- throw NetworkError=(DWORD)ESSL_GETHOSTBYNAME;
- }
- memmove((char*)&(connection.sin_addr.s_addr),server->h_addr,server->h_length);
- connection.sin_family=AF_INET;
- connection.sin_port=htons((unsigned short int)port); /* integral size mismatch in argument - htons(port)*/
- if(INVALID_SOCKET==(sock=socket(AF_INET,SOCK_STREAM,0)))
- {
- SystemError=WSAGetLastError();
- throw NetworkError=(DWORD)ESSL_CREATESOCKET;
- }
- if(-1==connect(sock,(struct sockaddr*)&connection,sizeof(connection)))
- {
- SystemError=WSAGetLastError();
- throw NetworkError=(DWORD)ESSL_SOCKETCONNECT;
- }
-#ifdef DEBUG_COMM
- DebugLog(CommFile,"</gethostbyname>\n");
-#endif
- }
-
-#ifdef DEBUG_COMM
- DebugLog(CommFile,"<connect SSL>\n");
-#endif
- if(NULL==(hConnection=SSL_new(SSLCtx)))
- throw NetworkError=(DWORD)ESSL_CREATESSL;
- if(SSL_set_fd(hConnection,sock)<1)
- throw NetworkError=(DWORD)ESSL_SETSOCKET;
- if(SSL_connect(hConnection)<1)
- throw NetworkError=(DWORD)ESSL_CONNECT;
- ConEstablished=TRUE;
-#ifdef DEBUG_COMM
- DebugLog(CommFile,"</connect>\n");
-#endif
- SSL_DebugLog("%s to %s:%d %s.",SSLconnstr,servername,port,"established");
- return;
- }
- catch(...)
- {
-#ifdef DEBUG_COMM
- DebugLog(CommFile,"<error></connect>\n");
-#endif
- SSL_DebugLog("%s to %s:%d %s.",SSLconnstr,servername,port,"failed");
- throw;
- }
-}
-
-void CSSLClient::SSLify() throw(DWORD)
-{
- SSL_DebugLog("Hmm... Trying to start TLS in SSL... This should be a bug.");
-}
-
-//Performs a simple query
-// query- command to send
-void CSSLClient::Send(const char *query) throw(DWORD)
-{
- unsigned int Sent;
-
- if(NULL==query)
- return;
-#ifdef DEBUG_COMM
- DebugLog(CommFile,"<send SSL>%s",query);
-#endif
- try
- {
- if(!ConEstablished)
- throw NetworkError=(DWORD)ESSL_SEND;
- SSL_DebugLog("SSL send %s",query);
- Sent=SSL_write(hConnection,(PVOID)query,strlen(query));
- if(Sent!=strlen(query))
- {
- SystemError=SSL_get_error(hConnection,Sent);
- throw NetworkError=(DWORD)ESSL_SEND;
- }
-#ifdef DEBUG_COMM
- DebugLog(CommFile,"</send>\n");
-#endif
- }
- catch(...)
- {
-#ifdef DEBUG_COMM
- DebugLog(CommFile,"<error></send>\n");
-#endif
- if (ConEstablished) SSL_DebugLog("SSL send %s","failed");
- throw;
- }
-}
-
-//Reads data from SSL socket
-// buf- buffer where to store max. buflen of received characters
-// if buf is NULL, creates buffer of buflen size
-// buf is NULL by default
-//You need free() returned buffer, which can be allocated in this function
-//if not success, exception is throwed
-char* CSSLClient::Recv(char *buf,int buflen) throw(DWORD)
-{
-#ifdef DEBUG_COMM
- DebugLog(CommFile,"<reading>");
-#endif
- try
- {
- if(!ConEstablished)
- throw NetworkError=(DWORD)ESSL_RECV;
- if(buf==NULL)
- buf=(char *)malloc(sizeof(char)*(buflen+1));
- if(buf==NULL)
- throw NetworkError=(DWORD)ESSL_RECVALLOC;
- ZeroMemory(buf,buflen);
- if (hConnection){
- Rcv=SSL_read(hConnection,buf,buflen);
- } else {
- Rcv=0;
- SSL_DebugLog("SSL connection is lost");
- }
- if(Rcv<1)
- {
- SystemError=SSL_get_error(hConnection,Rcv);
- throw NetworkError=(DWORD)ESSL_RECV;
- }
-#ifdef DEBUG_COMM
- *(buf+Rcv)=0; //end the buffer to write it to file
- DebugLog(CommFile,"%s",buf);
- DebugLog(CommFile,"</reading>\n");
-#endif
- SSL_DebugLog("SSL recv %s",buf);
- return(buf);
- }
- catch(...)
- {
-#ifdef DEBUG_COMM
- DebugLog(CommFile,"<error></reading>\n");
-#endif
- if (ConEstablished) SSL_DebugLog("SSL recv %s","failed.");
- throw;
- }
-}
-
-//Closes SSL connection
-void CSSLClient::Disconnect()
-{
-#ifdef SSLTHRUNETLIB
- if((HANDLE)NULL!=hNLConn)
- Netlib_CloseHandle(hNLConn);
- else
-#endif
- if(INVALID_SOCKET!=sock)
- closesocket(sock);
-
- if(hConnection!=(HANDLE)NULL)
- SSL_free(hConnection);
- hConnection=(HANDLE)NULL;
- sock=INVALID_SOCKET;
- hNLConn=(HANDLE)NULL;
- if (ConEstablished) SSL_DebugLog("%s %s.",SSLconnstr,"closed");
- ConEstablished=FALSE;
-}
-
-void UnregisterSSL()
-{
- if(SSLLoaded)
- {
-#ifdef DEBUG_COMM
- DebugLog(CommFile,"<Unregister SSL support>");
-#endif
- SSL_CTX_free(SSLCtx);
- if (TLSCtx) SSL_CTX_free(TLSCtx);
- FreeLibrary(hSSLLibrary);
- hSSLLibrary=(HINSTANCE)NULL;
-#ifdef DEBUG_COMM
- DebugLog(CommFile,"</Unregister SSL support>\n");
-#endif
- SSL_DebugLog("%s unregistered.",SSLstr);
- }
-}
diff --git a/yamn/proto/ssl.h b/yamn/proto/ssl.h deleted file mode 100644 index 2a61551..0000000 --- a/yamn/proto/ssl.h +++ /dev/null @@ -1,61 +0,0 @@ -#ifndef __SSL_H
-#define __SSL_H
-
-#include "netclient.h"
-
-#pragma warning( disable : 4290 )
-#define SSLTHRUNETLIB //performs netlib connection before normal winsock connection
-
-
-typedef int (*PFN_SSL_int_void)(void);
-typedef PVOID (*PFN_SSL_pvoid_void)(void);
-typedef PVOID (*PFN_SSL_pvoid_pvoid)(PVOID);
-typedef void (*PFN_SSL_void_pvoid)(PVOID);
-typedef int (*PFN_SSL_int_pvoid_int)(PVOID, int);
-typedef int (*PFN_SSL_int_pvoid)(PVOID);
-typedef int (*PFN_SSL_int_pvoid_pvoid_int)(PVOID, PVOID, int);
-
-class CSSLClient: public CNetClient
-{
-public:
- CSSLClient(): hConnection(NULL), sock(INVALID_SOCKET), ConEstablished(FALSE) {}
- void Connect(const char* servername,const int port) throw(DWORD);
- void Send(const char *query) throw(DWORD);
- char* Recv(char *buf=NULL,int buflen=65536) throw(DWORD);
- void Disconnect();
- void SSLify()throw(DWORD);
-
- inline BOOL Connected() {return ConEstablished;}
-
- //static BOOL SSLLoaded;
- //static HINSTANCE hSSLLibrary;
- //static PVOID SSLCtx;
-protected:
- HANDLE hConnection;
-#ifdef SSLTHRUNETLIB
- HANDLE hNLConn;
-#endif
-
- int sock;
- struct hostent *server;
- struct sockaddr_in connection;
-
- BOOL ConEstablished;
-};
-
-enum
-{
- ESSL_NOTLOADED=1, //OpenSSL is not loaded
- ESSL_WINSOCKINIT, //WinSock 2.0 init failed
- ESSL_GETHOSTBYNAME, //DNS error
- ESSL_CREATESOCKET, //error creating socket
- ESSL_SOCKETCONNECT, //error connecting with socket
- ESSL_CREATESSL, //error creating SSL session structure
- ESSL_SETSOCKET, //error connect socket with SSL session for bidirect I/O space
- ESSL_CONNECT, //cannot connect to server
- ESSL_SEND, //cannot send data
- ESSL_RECV, //cannot receive data
- ESSL_RECVALLOC, //cannot allocate memory for received data
-};
-
-#endif
diff --git a/yamn/services.cpp b/yamn/services.cpp index e4b8b79..60b24c2 100644 --- a/yamn/services.cpp +++ b/yamn/services.cpp @@ -53,7 +53,7 @@ static INT_PTR Service_GetCaps(WPARAM wParam, LPARAM lParam) if(wParam==PFLAGNUM_2)
return PF2_ONLINE | PF2_SHORTAWAY | PF2_LONGAWAY | PF2_LIGHTDND;
if(wParam==PFLAGNUM_5)
- if(DBGetContactSettingByte(NULL, YAMN_DBMODULE, YAMN_SHOWASPROTO, 0))
+ if(DBGetContactSettingByte(NULL, YAMN_DBMODULE, YAMN_SHOWASPROTO, 1))
return PF2_SHORTAWAY | PF2_LONGAWAY | PF2_LIGHTDND;
else
return PF2_ONLINE | PF2_SHORTAWAY | PF2_LONGAWAY | PF2_LIGHTDND;
diff --git a/yamn/yamn.h b/yamn/yamn.h index ee2fccb..b209b24 100644 --- a/yamn/yamn.h +++ b/yamn/yamn.h @@ -17,8 +17,10 @@ #include <direct.h> //For _chdir()
#define MIRANDA_VER 0x0600
+#define MIRANDA_CUSTOM_LP
#include <commctrl.h> //For hotkeys
+#include "win2k.h"
#include "newpluginapi.h" //CallService,UnHookEvent
#include "m_utils.h" //window broadcasting
#include "m_system.h"
@@ -33,11 +35,11 @@ #include "m_protomod.h" //protocols module
#include "m_protosvc.h"
#include "include/m_uninstaller.h" //PluginUninstaller structures
-#include "include/m_toptoolbar.h"
+#include "m_toptoolbar.h"
#include "m_icolib.h"
#include "include/m_kbdnotify.h"
#include "m_popup.h"
-#include "include/m_updater.h"
+#include "m_updater.h"
#include "m_account.h" //Account structure and all needed structures to cooperate with YAMN
#include "m_messages.h" //Messages sent to YAMN windows
#include "mails/m_mails.h" //use YAMN's mails
|