summaryrefslogtreecommitdiff
path: root/plugins/SeenPlugin
diff options
context:
space:
mode:
authorVadim Dashevskiy <watcherhd@gmail.com>2012-06-16 11:03:30 +0000
committerVadim Dashevskiy <watcherhd@gmail.com>2012-06-16 11:03:30 +0000
commit5750b26d1a312d0298381de81430a77d96192fb2 (patch)
treedd3ef1d346df6083c8ab148948a9c01cb000ee57 /plugins/SeenPlugin
parentcbdcfde4b22d219f5ffe802cb03fb736517cdd72 (diff)
another portion of unneeded MirandaPluginInterfaces removal
git-svn-id: http://svn.miranda-ng.org/main/trunk@443 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SeenPlugin')
-rw-r--r--plugins/SeenPlugin/main.c15
-rw-r--r--plugins/SeenPlugin/options.c13
-rw-r--r--plugins/SeenPlugin/resource.h4
-rw-r--r--plugins/SeenPlugin/resource.rc13
-rw-r--r--plugins/SeenPlugin/utils.c47
5 files changed, 8 insertions, 84 deletions
diff --git a/plugins/SeenPlugin/main.c b/plugins/SeenPlugin/main.c
index c1aefc32e2..8dd6f643e3 100644
--- a/plugins/SeenPlugin/main.c
+++ b/plugins/SeenPlugin/main.c
@@ -41,13 +41,8 @@ PLUGININFOEX pluginInfo={
"© 2001-2002 Heiko Schillinger, 2003 modified by Bruno Rino, 2005-7 Modified by YB",
"http://forums.miranda-im.org/showthread.php?t=2822",
0,
-#ifndef PERMITNSN
- DEFMOD_RNDUSERONLINE,
- { 0x0beac488,0x578d,0x458d,{0xbb, 0x93, 0x8f, 0x2f, 0x53, 0x9b, 0x2a, 0xe4}}/* 0beac488-578d-458d-bb93-8f2f539b2ae4 */
-#else
0,
{ 0x2d506d46,0xc94e,0x4ef8,{0x85, 0x37, 0xf1, 0x12, 0x33, 0xa8, 0x03, 0x81}}/* 2d506d46-c94e-4ef8-8537-f11233a80381 */
-#endif
};
#define TRANSNUMBER 2
@@ -110,9 +105,7 @@ int MainInit(WPARAM wparam,LPARAM lparam)
CallService("DBEditorpp/RegisterSingleModule", (WPARAM)S_MOD, 0);
DBWriteContactSettingString(NULL,"Uninstall",Translate("Last seen"),S_MOD);
-#ifndef PERMITNSN
- SkinAddNewSoundEx("UserOnline",Translate("Alerts"),Translate("Online"));
-#endif
+
if (ServiceExists(MS_TIPPER_ADDTRANSLATION)) {
int i=0;
for (i=0;i<TRANSNUMBER;i++) {
@@ -130,11 +123,7 @@ __declspec(dllexport) PLUGININFOEX * MirandaPluginInfoEx(DWORD mirandaVersion)
}
#define MIID_LASTSEEN {0x0df23e71, 0x7950, 0x43d5, {0xb9, 0x86, 0x7a, 0xbf, 0xf5, 0xa5, 0x40, 0x18}}
-static const MUUID interfaces[] = {MIID_LASTSEEN,
-#ifndef PERMITNSN
-MIID_USERONLINE,
-#endif
-MIID_LAST};
+static const MUUID interfaces[] = {MIID_LASTSEEN, MIID_LAST};
__declspec(dllexport) const MUUID * MirandaPluginInterfaces(void)
{
return interfaces;
diff --git a/plugins/SeenPlugin/options.c b/plugins/SeenPlugin/options.c
index f47fe03666..af3c4f20f8 100644
--- a/plugins/SeenPlugin/options.c
+++ b/plugins/SeenPlugin/options.c
@@ -78,11 +78,7 @@ INT_PTR CALLBACK OptsPopUpsDlgProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lpara
DBFreeVariant(&dbv);
SetDlgItemText(hdlg,IDC_POPUPSTAMPTEXT,!DBGetContactSetting(NULL,S_MOD,"PopupStampText",&dbv)?dbv.pszVal:DEFAULT_POPUPSTAMPTEXT);
DBFreeVariant(&dbv);
-#ifndef PERMITNSN
- i = DBGetContactSettingByte(NULL,S_MOD,"SuppCListOnline",3);
- CheckDlgButton(hdlg,IDC_DISWATCHED,i&1);
- CheckDlgButton(hdlg,IDC_DISNONWATCHED,i&2);
-#endif
+
}
break; //case WM_INITDIALOG
case WM_COMMAND:
@@ -167,12 +163,7 @@ INT_PTR CALLBACK OptsPopUpsDlgProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lpara
DBWriteContactSettingDword(NULL,S_MOD,szstamp,sett);
else DBDeleteContactSetting(NULL,S_MOD,szstamp);
}
-#ifndef PERMITNSN
- checkValue = (BYTE)IsDlgButtonChecked(hdlg,IDC_DISNONWATCHED)<<1;
- checkValue |= (BYTE)IsDlgButtonChecked(hdlg,IDC_DISWATCHED);
- if (3 == checkValue) DBDeleteContactSetting(NULL,S_MOD,"SuppCListOnline");
- else DBWriteContactSettingByte(NULL,S_MOD,"SuppCListOnline",checkValue);
-#endif
+
break; //case PSN_APPLY
}
break; //case 0
diff --git a/plugins/SeenPlugin/resource.h b/plugins/SeenPlugin/resource.h
index 913ed4c8b4..110639bb3b 100644
--- a/plugins/SeenPlugin/resource.h
+++ b/plugins/SeenPlugin/resource.h
@@ -75,10 +75,6 @@
#define IDC_SENDMSG 1045
#define IDC_LABTTITLE 1046
#define IDC_OPTIONSTAB 1047
-#ifndef PERMITNSN
-#define IDC_DISWATCHED 1048
-#define IDC_DISNONWATCHED 1049
-#endif
#define IDC_IDLESUPPORT 1050
#define IDC_MAINGROUP -1
#define IDC_INFO -1
diff --git a/plugins/SeenPlugin/resource.rc b/plugins/SeenPlugin/resource.rc
index 90733f0fd1..d813b69be3 100644
--- a/plugins/SeenPlugin/resource.rc
+++ b/plugins/SeenPlugin/resource.rc
@@ -134,11 +134,6 @@ BEGIN
CONTROL "",ID_STATUS_OFFLINE,"ColourPicker",WS_TABSTOP,210,120,20,14
CONTROL "",ID_STATUS_OFFLINE+20,"ColourPicker",WS_TABSTOP,235,120,20,14
PUSHBUTTON "Reset colors",IDC_DEFAULTCOL,115,145,50,13
-#ifndef PERMITNSN
- GROUPBOX "Disable CList Notifications",IDC_STATIC,0,170,280,38,WS_GROUP
- CONTROL "For watched protocols",IDC_DISWATCHED,"Button", BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,10,180,100,10
- CONTROL "For non-watched protocols",IDC_DISNONWATCHED,"Button", BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,10,193,100,10
-#endif
END
IDD_USERINFO DIALOGEX 0, 0, 222, 132
@@ -252,12 +247,8 @@ BEGIN
BEGIN
VALUE "Comments", "Last Seen Mod Plugin for Miranda IM\0"
VALUE "CompanyName", "Heiko Schillinger, YB\0"
-#ifdef PERMITNSN
- VALUE "FileDescription", "Last Seen Plugin\0"
-#else
- VALUE "FileDescription", "Last Seen Plugin (NSN Compatible)\0"
-#endif
- VALUE "FileVersion", "5.0.4.7\0"
+ VALUE "FileDescription", "Last Seen Plugin (NSN Compatible)\0"
+ VALUE "FileVersion", "5.0.4.7\0"
VALUE "InternalName", "Last Seen\0"
VALUE "LegalCopyright", "© 2001-2002 by Heiko Schillinger, 2003 by Bruno Rino, 2006 by YB\0"
VALUE "LegalTrademarks", "\0"
diff --git a/plugins/SeenPlugin/utils.c b/plugins/SeenPlugin/utils.c
index a7300f873b..4d0e64d00c 100644
--- a/plugins/SeenPlugin/utils.c
+++ b/plugins/SeenPlugin/utils.c
@@ -629,9 +629,7 @@ static DWORD __stdcall waitThread(logthread_info* infoParam)
return 0;
}
-#ifndef PERMITNSN
-static int uniqueEventId=0;
-#endif
+
int UpdateValues(HANDLE hContact,LPARAM lparam)
{
@@ -730,48 +728,7 @@ int UpdateValues(HANDLE hContact,LPARAM lparam)
}
contactQueue[index]->courStatus = isIdleEvent?DBGetContactSettingWord(hContact,cws->szModule,"Status",ID_STATUS_OFFLINE):cws->value.wVal;
} }
-#ifndef PERMITNSN
- //Some useronline.c functionality
- {
- int newStatus,oldStatus;
- newStatus=(cws->value.wVal|0x8000);
- oldStatus=DBGetContactSettingWord(hContact,"UserOnline","OldStatus",ID_STATUS_OFFLINE);
- DBWriteContactSettingWord(hContact,"UserOnline","OldStatus",(WORD)newStatus);
- if(DBGetContactSettingByte(hContact,"CList","Hidden",0)) return 0;
- if ((newStatus==ID_STATUS_ONLINE || newStatus==ID_STATUS_FREECHAT) &&
- oldStatus!=ID_STATUS_ONLINE && oldStatus!=ID_STATUS_FREECHAT) {
- BYTE supp = db_byte_get(NULL, S_MOD, "SuppCListOnline", 3); //By default no online allert :P
- BOOL willAlert = FALSE;
- switch (supp) {
- case 3: willAlert = FALSE; break;
- case 2: willAlert = !IsWatchedProtocol(cws->szModule); break;
- case 1: willAlert = IsWatchedProtocol(cws->szModule); break;
- case 0: willAlert = TRUE; break;
- }
- if (willAlert) {
- DWORD ticked = db_dword_get(NULL, "UserOnline", cws->szModule, GetTickCount());
- // only play the sound (or show event) if this event happens at least 10 secs after the proto went from offline
- if ( GetTickCount() - ticked > (1000*10) ) {
- CLISTEVENT cle;
- char tooltip[256];
-
- ZeroMemory(&cle,sizeof(cle));
- cle.cbSize=sizeof(cle);
- cle.flags=CLEF_ONLYAFEW;
- cle.hContact=hContact;
- cle.hDbEvent=(HANDLE)(uniqueEventId++);
- cle.hIcon=LoadSkinnedIcon(SKINICON_OTHER_USERONLINE);
- cle.pszService="UserOnline/Description";
- mir_snprintf(tooltip,256,Translate("%s is Online"),(char*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME,(WPARAM)hContact,0));
- cle.pszTooltip=tooltip;
- CallService(MS_CLIST_ADDEVENT,0,(LPARAM)&cle);
-
- SkinPlaySound("UserOnline");
- }
- }
- }
- }
-#endif
+
return 0;
}