diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2014-06-12 17:49:53 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2014-06-12 17:49:53 +0000 |
commit | 7de38a08b97e0554e318b8c25806cef5d47259e6 (patch) | |
tree | 2400708e16b437245da88623046e96fb833e23b9 /plugins/ClientChangeNotify/src | |
parent | 1b88f240b94fc04aa11ef352b720fda741c0ebc6 (diff) |
headers of not adopted plugins moved to !Deprecated
git-svn-id: http://svn.miranda-ng.org/main/trunk@9438 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/ClientChangeNotify/src')
-rw-r--r-- | plugins/ClientChangeNotify/src/ClientChangeNotify.cpp | 57 | ||||
-rw-r--r-- | plugins/ClientChangeNotify/src/Common.h | 3 | ||||
-rw-r--r-- | plugins/ClientChangeNotify/src/OptDlg.cpp | 1 |
3 files changed, 0 insertions, 61 deletions
diff --git a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp index 2aaa9463b2..55c09e6d4d 100644 --- a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp +++ b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp @@ -105,22 +105,6 @@ void Popup_DoAction(HWND hWnd, BYTE Action, PLUGIN_DATA *pdata) CallServiceSync(MS_HISTORY_SHOWCONTACTHISTORY, hContact, 0);
break;
- case PCA_OPENLOG: // open log file
- {
- TCString LogFilePath;
- LS_LOGINFO li = {0};
- li.cbSize = sizeof(li);
- li.szID = LOG_ID;
- li.hContact = hContact;
- li.Flags = LSLI_TCHAR;
- li.tszLogPath = LogFilePath.GetBuffer(MAX_PATH);
- if (!CallService(MS_LOGSERVICE_GETLOGINFO, (WPARAM)&li, 0)) {
- LogFilePath.ReleaseBuffer();
- ShowLog(LogFilePath);
- }
- else LogFilePath.ReleaseBuffer();
- break;
- }
case PCA_CLOSEPOPUP: // close popup
PUDeletePopup(hWnd);
break;
@@ -276,50 +260,11 @@ int ContactSettingChanged(WPARAM hContact, LPARAM lParam) ClientName.ReleaseBuffer();
}
else ClientName = sd.MirVer;
-
- if (bVariablesExists)
- logservice_log(LOG_ID, hContact, ClientName);
- else {
- _ASSERT(szProto);
- TCString szUID(_T(""));
- char *uid = (char*)CallProtoService(szProto, PS_GETCAPS, PFLAG_UNIQUEIDSETTING, 0);
- if (uid && (INT_PTR)uid != CALLSERVICE_NOTFOUND)
- szUID = DBGetContactSettingAsString(hContact, szProto, uid, _T(""));
-
- logservice_log(LOG_ID, hContact, TCString((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR)) + _T(" (") + szUID + TranslateT(") changed client to ") + ClientName);
- }
}
_ASSERT(sd.MirVer.GetLen()); // save the last known MirVer value even if the new one is empty
return 0;
}
-static int ContactSettingsInit(WPARAM wParam, LPARAM lParam)
-{
- CONTACTSETTINGSINIT *csi = (CONTACTSETTINGSINIT*)wParam;
- char *szProto = (csi->Type == CSIT_CONTACT) ? GetContactProto(csi->hContact) : NULL;
- if ((csi->Type == CSIT_GROUP) || (szProto && csi->Type == CSIT_CONTACT)) {
- int Flag1 = (csi->Type == CSIT_CONTACT) ? CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) : PF1_IM; // if it's a group settings dialog, we assume that there are possibly some contacts in the group with PF1_IM capability
- if (Flag1 & (PF1_IMRECV | PF1_URLRECV | PF1_FILERECV)) { // I hope, these flags are sufficient to describe which protocols can theoretically have a client
- CONTACTSETTINGSCONTROL csc = {0};
- csc.cbSize = sizeof(csc);
- csc.cbStateSize = sizeof(CSCONTROLSTATE);
- csc.Position = CSPOS_SORTBYALPHABET;
- csc.Flags = CSCF_TCHAR;
- csc.ControlType = CSCT_COMBOBOX;
- csc.ptszTitle = LPGENT("Client change notifications:");
- csc.ptszGroup = CSGROUP_NOTIFICATIONS;
- csc.szModule = MOD_NAME;
- csc.szSetting = DB_CCN_NOTIFY;
- csc.StateNum = 4;
- csc.DefState = 3;
- CSCONTROLSTATE States[] = {CSCONTROLSTATE(LPGENT("Never, ignore client changes for this contact"), (BYTE)NOTIFY_IGNORE), CSCONTROLSTATE(LPGENT("Always except when client change notifications are disabled globally"), (BYTE)NOTIFY_ALMOST_ALWAYS), CSCONTROLSTATE(LPGENT("Always, even when client change notifications are disabled globally"), (BYTE)NOTIFY_ALWAYS), CSCONTROLSTATE(LPGENT("Use global settings (default)"), (BYTE)NOTIFY_USEGLOBAL)};
- csc.pStates = States;
- CallService(MS_CONTACTSETTINGS_ADDCONTROL, wParam, (LPARAM)&csc);
- }
- }
- return 0;
-}
-
static INT_PTR srvTogglePopups(WPARAM wParam, LPARAM lParam)
{
g_PopupOptPage.SetDBValueCopy(IDC_POPUPOPTDLG_POPUPNOTIFY, !g_PopupOptPage.GetDBValueCopy(IDC_POPUPOPTDLG_POPUPNOTIFY));
@@ -385,7 +330,6 @@ int MirandaLoaded(WPARAM wParam, LPARAM lParam) HookEvent(ME_SYSTEM_MODULELOAD, ModuleLoad);
HookEvent(ME_SYSTEM_MODULEUNLOAD, ModuleLoad);
HookEvent(ME_DB_CONTACT_SETTINGCHANGED, ContactSettingChanged);
- HookEvent(ME_CONTACTSETTINGS_INITIALISE, ContactSettingsInit);
SkinAddNewSoundEx(CLIENTCHANGED_SOUND, NULL, LPGEN("ClientChangeNotify: Client changed"));
if (bPopupExists) {
@@ -408,7 +352,6 @@ int MirandaLoaded(WPARAM wParam, LPARAM lParam) if (!bFingerprintExists && !db_get_b(NULL, MOD_NAME, DB_NO_FINGERPRINT_ERROR, 0))
CreateDialog(g_hInstance, MAKEINTRESOURCE(IDD_CCN_ERROR), NULL, CCNErrorDlgProc);
- logservice_register(LOG_ID, LPGENT("ClientChangeNotify"), _T("ClientChangeNotify?puts(p,?dbsetting(%subject%,Protocol,p))?if2(_?dbsetting(,?get(p),?pinfo(?get(p),uidsetting)),).log"), TranslateT("`[`!cdate()-!ctime()`]` ?cinfo(%subject%,display) (?cinfo(%subject%,ID)) changed client to %extratext%"));
return 0;
}
diff --git a/plugins/ClientChangeNotify/src/Common.h b/plugins/ClientChangeNotify/src/Common.h index d29080795b..2dbe3efbfd 100644 --- a/plugins/ClientChangeNotify/src/Common.h +++ b/plugins/ClientChangeNotify/src/Common.h @@ -38,7 +38,6 @@ #include "m_langpack.h"
#include "m_options.h"
#include "m_clist.h"
-#include "m_LogService.h"
#include "m_system.h"
#include "m_message.h"
#include "m_userinfo.h"
@@ -51,7 +50,6 @@ #include "m_fingerprint.h"
#include "m_metacontacts.h"
-#include "m_ContactSettings.h"
#include "CommonLibs\TMyArray.h"
#include "CommonLibs\Options.h"
@@ -68,7 +66,6 @@ #define PCA_OPENDETAILS 2 // open contact details window
#define PCA_OPENMENU 3 // open contact menu
#define PCA_OPENHISTORY 4 // open contact history
-#define PCA_OPENLOG 5 // open log file
#define PCA_DONOTHING 6 // do nothing
#define POPUP_DEF_LCLICKACTION PCA_OPENMESSAGEWND
diff --git a/plugins/ClientChangeNotify/src/OptDlg.cpp b/plugins/ClientChangeNotify/src/OptDlg.cpp index 96a96ccc20..711ba11a39 100644 --- a/plugins/ClientChangeNotify/src/OptDlg.cpp +++ b/plugins/ClientChangeNotify/src/OptDlg.cpp @@ -78,7 +78,6 @@ PopupActions[] = LPGENT("Open contact details window"), PCA_OPENDETAILS,
LPGENT("Open contact menu"), PCA_OPENMENU,
LPGENT("Open contact history"), PCA_OPENHISTORY,
- LPGENT("Open log file"), PCA_OPENLOG,
LPGENT("Do nothing"), PCA_DONOTHING
};
|