From 2f10a9e6cc4782d61f0f15bbff36209af922bd34 Mon Sep 17 00:00:00 2001 From: mataes2007 Date: Thu, 17 Nov 2011 18:10:43 +0000 Subject: =?UTF-8?q?=D0=BE=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB=D0=B5=D0=BD=D1=8B?= =?UTF-8?q?=20=D0=B8=20=D0=BF=D0=BE=D0=B4=D1=87=D0=B8=D1=89=D0=B5=D0=BD?= =?UTF-8?q?=D1=8B=20=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=D0=BD?= =?UTF-8?q?=D1=8B=D0=B5=20=D0=BF=D0=BB=D0=B0=D0=B3=D0=B8=D0=BD=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://miranda-plugins.googlecode.com/svn/trunk@174 e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb --- lastseen-mod/file.c | 6 +- lastseen-mod/history.c | 8 +- lastseen-mod/main.c | 42 ++-- lastseen-mod/menu.c | 22 +- lastseen-mod/missed.c | 4 +- lastseen-mod/options.c | 138 ++--------- lastseen-mod/resource.h | 7 +- lastseen-mod/resource.rc | 16 +- lastseen-mod/seen.h | 21 +- lastseen-mod/seen_info.txt | 2 +- lastseen-mod/seenplugin.dev | 189 --------------- lastseen-mod/seenplugin.win | 63 ----- lastseen-mod/seenplugin_10.vcxproj | 358 +++++++++++++++++++++++++++++ lastseen-mod/seenplugin_10.vcxproj.filters | 60 +++++ lastseen-mod/userinfo.c | 8 +- lastseen-mod/utils.c | 8 +- 16 files changed, 506 insertions(+), 446 deletions(-) delete mode 100644 lastseen-mod/seenplugin.dev delete mode 100644 lastseen-mod/seenplugin.win create mode 100644 lastseen-mod/seenplugin_10.vcxproj create mode 100644 lastseen-mod/seenplugin_10.vcxproj.filters (limited to 'lastseen-mod') 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 #include #include #include #include -#include #include "resource.h" #include @@ -51,7 +56,7 @@ Last change by : $Author: y_b $ #include #include -#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 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + SeenPlugin + {EFD45F48-63D5-48AE-96CD-8ADB3545A4EE} + Seenplugin + + + + DynamicLibrary + false + MultiByte + + + DynamicLibrary + false + MultiByte + + + DynamicLibrary + false + + + DynamicLibrary + false + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ../../../Files/Release/Plugins\ + ../../../Files/Release64/Plugins\ + $(SolutionDir)$(Configuration)/Obj/$(ProjectName)\ + $(SolutionDir)$(Configuration)64/Obj/$(ProjectName)\ + ../../../Files/Debug/Plugins\ + ../../../Files/Debug64/Plugins\ + $(SolutionDir)$(Configuration)/Obj/$(ProjectName)\ + $(SolutionDir)$(Configuration)64/Obj/$(ProjectName)\ + AllRules.ruleset + AllRules.ruleset + + + + + AllRules.ruleset + AllRules.ruleset + + + + + + + + NDEBUG;%(PreprocessorDefinitions) + true + Win32 + .\releasePermNSN/seenplugin.tlb + + + + + Full + OnlyExplicitInline + Size + true + ../../include;../../ExternalAPI + PERMITNSN;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + true + + + + + Level3 + ProgramDatabase + 4996;%(DisableSpecificWarnings) + MultiThreaded + + + NDEBUG;%(PreprocessorDefinitions) + + + /filealign:0x200 %(AdditionalOptions) + ws2_32.lib;comctl32.lib;winmm.lib;%(AdditionalDependencies) + + + true + true + UseLinkTimeCodeGeneration + 0x67400000 + false + + + $(IntDir)$(TargetName).lib + MachineX86 + + + + + + + + + NDEBUG;%(PreprocessorDefinitions) + true + .\releasePermNSN/seenplugin.tlb + + + + + Full + OnlyExplicitInline + Size + true + ../../include;../../ExternalAPI + PERMITNSN;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + true + + + + + Level3 + ProgramDatabase + 4996;%(DisableSpecificWarnings) + MultiThreaded + + + NDEBUG;%(PreprocessorDefinitions) + + + /filealign:0x200 %(AdditionalOptions) + ws2_32.lib;comctl32.lib;winmm.lib;%(AdditionalDependencies) + + + true + true + UseLinkTimeCodeGeneration + 0x67400000 + false + + + $(IntDir)$(TargetName).lib + + + + + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\DebugPermNSN/seenplugin.tlb + + + + + Disabled + ../../include;../../ExternalAPI;%(AdditionalIncludeDirectories) + PERMITNSN;WIN32;_DEBUG;_WINDOWS;_USRDLL;MP_SEEN_EXPORTS;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebug + + + All + Level3 + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + + + ws2_32.lib;comctl32.lib;winmm.lib;%(AdditionalDependencies) + true + 0x67400000 + false + + + $(IntDir)$(TargetName).lib + MachineX86 + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + .\DebugPermNSN/seenplugin.tlb + + + + + Disabled + ../../include;../../ExternalAPI;%(AdditionalIncludeDirectories) + PERMITNSN;WIN32;_DEBUG;_WINDOWS;_USRDLL;MP_SEEN_EXPORTS;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + All + Level3 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + + + ws2_32.lib;comctl32.lib;winmm.lib;%(AdditionalDependencies) + true + 0x67400000 + false + + + $(IntDir)$(TargetName).lib + + + + + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + + + + + + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + + + + + + + \ 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 @@ + + + + + {89af4e67-032f-4900-b14d-1d956b6c376d} + cpp;c;cxx;rc;def;r;odl;idl;hpj;bat + + + {1f155b67-4f4e-4b49-a10e-6a0588c62a69} + h;hpp;hxx;hm;inl + + + {a800d3aa-15e0-4d7d-8b9f-99dfd4112d8e} + ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + + + Resource Files + + + + + + + \ 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(""))) @@ -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); -- cgit v1.2.3