diff options
author | George Hazan <ghazan@miranda.im> | 2019-12-04 16:08:03 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-12-04 16:08:03 +0300 |
commit | 3bb16e798cb51d5764aacbefd4edf26f52d8c4f0 (patch) | |
tree | 59dbb53fc9496d660ec2ef2846a4eab0f1720b88 /plugins/XSoundNotify | |
parent | 3216d8df5cb355f34c82ed10b7e40bab7525b697 (diff) |
GetContactProto: useless duplicate function replaced with standard Proto_GetBaseAccountName
Diffstat (limited to 'plugins/XSoundNotify')
-rw-r--r-- | plugins/XSoundNotify/src/dialog.cpp | 2 | ||||
-rw-r--r-- | plugins/XSoundNotify/src/xsn_main.cpp | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/plugins/XSoundNotify/src/dialog.cpp b/plugins/XSoundNotify/src/dialog.cpp index 92da7e0041..39db3a53c7 100644 --- a/plugins/XSoundNotify/src/dialog.cpp +++ b/plugins/XSoundNotify/src/dialog.cpp @@ -22,7 +22,7 @@ static INT_PTR CALLBACK DlgProcContactsOptions(HWND hwndDlg, UINT msg, WPARAM wP SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam);
WindowList_Add(hChangeSoundDlgList, hwndDlg, hContact);
Utils_RestoreWindowPositionNoSize(hwndDlg, hContact, MODULENAME, "ChangeSoundDlg");
- char* szProto = GetContactProto(hContact);
+ char* szProto = Proto_GetBaseAccountName(hContact);
PROTOACCOUNT *pa = Proto_GetAccount(szProto);
const char* szUniqueId = Proto_GetUniqueId(pa->szModuleName);
if (szUniqueId != nullptr) {
diff --git a/plugins/XSoundNotify/src/xsn_main.cpp b/plugins/XSoundNotify/src/xsn_main.cpp index 3437461d9f..8f3396823f 100644 --- a/plugins/XSoundNotify/src/xsn_main.cpp +++ b/plugins/XSoundNotify/src/xsn_main.cpp @@ -114,7 +114,7 @@ static int ProcessEvent(WPARAM hContact, LPARAM lParam) return 0;
}
- char *szProto = GetContactProto(hContact);
+ char *szProto = Proto_GetBaseAccountName(hContact);
PROTOACCOUNT *pa = Proto_GetAccount(szProto);
size_t value_max_len = mir_strlen(pa->szModuleName) + 8;
char *value = (char *)mir_alloc(sizeof(char) * value_max_len);
@@ -159,7 +159,7 @@ static int ProcessChatEvent(WPARAM, LPARAM lParam) isOwnSound = 1;
return 0;
}
- char *szProto = GetContactProto(hContact);
+ char *szProto = Proto_GetBaseAccountName(hContact);
PROTOACCOUNT *pa = Proto_GetAccount(szProto);
size_t value_max_len = mir_strlen(pa->szModuleName) + 8;
char *value = (char *)mir_alloc(sizeof(char) * value_max_len);
@@ -217,7 +217,7 @@ static int PrebuildContactMenu(WPARAM wParam, LPARAM) {
MCONTACT hContact = wParam;
if (hContact) {
- char *szProto = GetContactProto(hContact);
+ char *szProto = Proto_GetBaseAccountName(hContact);
PROTOACCOUNT *pa = Proto_GetAccount(szProto);
Menu_ShowItem(hChangeSound, IsSuitableProto(pa));
}
|