summaryrefslogtreecommitdiff
path: root/plugins/New_GPG
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-03-10 07:14:27 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-03-10 07:14:27 +0000
commita105d0705b4831de7212737072c8cb80f90530ff (patch)
treef08b0729bb9bbe872518316a12062fa9446221ca /plugins/New_GPG
parent3d3a3c6963cad50dbc055af02bce66b77e812d7b (diff)
unneeded helpers removed
git-svn-id: http://svn.miranda-ng.org/main/trunk@8541 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/New_GPG')
-rw-r--r--plugins/New_GPG/src/icons.cpp8
-rwxr-xr-xplugins/New_GPG/src/messages.cpp18
-rw-r--r--plugins/New_GPG/src/metacontacts.cpp14
-rw-r--r--plugins/New_GPG/src/metacontacts.h1
-rwxr-xr-xplugins/New_GPG/src/options.cpp2
-rw-r--r--plugins/New_GPG/src/srmm.cpp2
6 files changed, 15 insertions, 30 deletions
diff --git a/plugins/New_GPG/src/icons.cpp b/plugins/New_GPG/src/icons.cpp
index 2770d28b64..dffaad03bd 100644
--- a/plugins/New_GPG/src/icons.cpp
+++ b/plugins/New_GPG/src/icons.cpp
@@ -50,9 +50,9 @@ void setClistIcon(MCONTACT hContact)
extern HANDLE g_hCLIcon;
MCONTACT hMC = hContact;
if(db_mc_isSub(hContact))
- hMC = metaGetContact(hContact);
+ hMC = db_mc_getMeta(hContact);
else if(metaIsProtoMetaContacts(hContact))
- hMC = metaGetContact(hContact);
+ hMC = db_mc_getMeta(hContact);
const char *szIconId = (enabled) ? "secured" : NULL;
ExtraIcon_SetIcon(g_hCLIcon, hContact, szIconId);
if(hMC)
@@ -65,9 +65,9 @@ void setSrmmIcon(MCONTACT h)
bool enabled = isContactSecured(hContact);
MCONTACT hMC = NULL;
if(db_mc_isSub(hContact))
- hMC = metaGetContact(hContact);
+ hMC = db_mc_getMeta(hContact);
else if(metaIsProtoMetaContacts(hContact))
- hMC = metaGetContact(hContact);
+ hMC = db_mc_getMeta(hContact);
StatusIconData sid = { sizeof(sid) };
sid.szModule = szGPGModuleName;
diff --git a/plugins/New_GPG/src/messages.cpp b/plugins/New_GPG/src/messages.cpp
index cada448160..dd05955bf6 100755
--- a/plugins/New_GPG/src/messages.cpp
+++ b/plugins/New_GPG/src/messages.cpp
@@ -323,7 +323,7 @@ void RecvMsgSvc_func(MCONTACT hContact, std::wstring str, char *msg, DWORD flags
{
char *msg = mir_strdup(toUTF8(str).c_str());
HistoryLog(hContact, db_event(msg, timestamp, 0, dbflags|DBEF_READ));
- HistoryLog(metaGetContact(hContact), db_event(msg, timestamp, 0, dbflags));
+ HistoryLog(db_mc_getMeta(hContact), db_event(msg, timestamp, 0, dbflags));
mir_free(msg);
return;
}
@@ -341,7 +341,7 @@ void RecvMsgSvc_func(MCONTACT hContact, std::wstring str, char *msg, DWORD flags
if(db_mc_isSub(hContact))
{
HistoryLog(hContact, db_event(msg, timestamp, 0, dbflags|DBEF_READ));
- HistoryLog(metaGetContact(hContact), db_event(msg, timestamp, 0, dbflags));
+ HistoryLog(db_mc_getMeta(hContact), db_event(msg, timestamp, 0, dbflags));
return;
}
HistoryLog(hContact, db_event(msg, timestamp, 0, dbflags|DBEF_READ));
@@ -489,9 +489,9 @@ INT_PTR RecvMsgSvc(WPARAM w, LPARAM l)
setClistIcon(ccs->hContact);
if(db_mc_isSub(ccs->hContact))
{
- setSrmmIcon(metaGetContact(ccs->hContact));
- setClistIcon(metaGetContact(ccs->hContact));
- HistoryLog(metaGetContact(ccs->hContact), "PGP Encryption turned on by key autoexchange feature");
+ setSrmmIcon(db_mc_getMeta(ccs->hContact));
+ setClistIcon(db_mc_getMeta(ccs->hContact));
+ HistoryLog(db_mc_getMeta(ccs->hContact), "PGP Encryption turned on by key autoexchange feature");
}
HistoryLog(ccs->hContact, "PGP Encryption turned on by key autoexchange feature");
}
@@ -769,13 +769,13 @@ void SendMsgSvc_func(MCONTACT hContact, char *msg, DWORD flags)
}
/*if(db_mc_isSub(hContact))
{
- hcontact_data[metaGetContact(hContact)].msgs_to_pass.push_back(str_event);
+ hcontact_data[db_mc_getMeta(hContact)].msgs_to_pass.push_back(str_event);
if(bDebugLog)
{
- debuglog<<std::string(time_str() + toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR)) +"is subcontact of" + toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)metaGetContact(hContact), GCDNF_TCHAR)));
- debuglog<<std::string(time_str()+": adding event to metacontact: "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)metaGetContact(hContact), GCDNF_TCHAR))+" on send message.");
+ debuglog<<std::string(time_str() + toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR)) +"is subcontact of" + toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)db_mc_getMeta(hContact), GCDNF_TCHAR)));
+ debuglog<<std::string(time_str()+": adding event to metacontact: "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)db_mc_getMeta(hContact), GCDNF_TCHAR))+" on send message.");
}
- HistoryLog(metaGetContact(hContact), db_event((char*)str_event.c_str(), 0,0, DBEF_SENT|dbflags));
+ HistoryLog(db_mc_getMeta(hContact), db_event((char*)str_event.c_str(), 0,0, DBEF_SENT|dbflags));
}*/ //unneeded ?
// hcontact_data[hContact].msgs_to_pass.push_back(str_event);
if(bDebugLog)
diff --git a/plugins/New_GPG/src/metacontacts.cpp b/plugins/New_GPG/src/metacontacts.cpp
index d730dae4b0..42d2050f75 100644
--- a/plugins/New_GPG/src/metacontacts.cpp
+++ b/plugins/New_GPG/src/metacontacts.cpp
@@ -30,23 +30,9 @@ bool metaIsDefaultSubContact(MCONTACT hContact)
return db_mc_getDefault(db_mc_getMeta(hContact)) == hContact;
}
-MCONTACT metaGetContact(MCONTACT hContact)
-{
- if(db_mc_isSub(hContact))
- return db_mc_getMeta(hContact);
- return NULL;
-}
-
MCONTACT metaGetMostOnline(MCONTACT hContact)
{
if(metaIsProtoMetaContacts(hContact))
return (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT,hContact,0);
return NULL;
}
-
-MCONTACT db_mc_getDefault(MCONTACT hContact)
-{
- if(metaIsProtoMetaContacts(hContact))
- return db_mc_getDefault(hContact);
- return NULL;
-}
diff --git a/plugins/New_GPG/src/metacontacts.h b/plugins/New_GPG/src/metacontacts.h
index 0819239f01..4e43860c57 100644
--- a/plugins/New_GPG/src/metacontacts.h
+++ b/plugins/New_GPG/src/metacontacts.h
@@ -16,6 +16,5 @@
bool metaIsProtoMetaContacts(MCONTACT hContact);
bool metaIsDefaultSubContact(MCONTACT hContact) ;
-MCONTACT metaGetContact(MCONTACT hContact);
MCONTACT metaGetMostOnline(MCONTACT hContact);
diff --git a/plugins/New_GPG/src/options.cpp b/plugins/New_GPG/src/options.cpp
index dcedbd4b4e..8094e54b25 100755
--- a/plugins/New_GPG/src/options.cpp
+++ b/plugins/New_GPG/src/options.cpp
@@ -208,7 +208,7 @@ static INT_PTR CALLBACK DlgProcGpgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP
hContact = metaGetMostOnline(hContact);
ismetacontact = true;
}
- else if((meta = metaGetContact(user_data[item_num+1])) != NULL)
+ else if((meta = db_mc_getMeta(user_data[item_num+1])) != NULL)
{
hContact = metaGetMostOnline(meta);
ismetacontact = true;
diff --git a/plugins/New_GPG/src/srmm.cpp b/plugins/New_GPG/src/srmm.cpp
index 24c00fd878..63ff84ff0f 100644
--- a/plugins/New_GPG/src/srmm.cpp
+++ b/plugins/New_GPG/src/srmm.cpp
@@ -42,7 +42,7 @@ int __cdecl onIconPressed(WPARAM wParam, LPARAM lParam)
hContact = metaGetMostOnline(hContact); // возьмем тот, через который пойдет сообщение
}
else if(db_mc_isSub(hContact))
- hMeta = metaGetContact(hContact);
+ hMeta = db_mc_getMeta(hContact);
StatusIconClickData *sicd = (StatusIconClickData *)lParam;
if(strcmp(sicd->szModule, szGPGModuleName))
return 0; // not our event