diff options
author | George Hazan <george.hazan@gmail.com> | 2024-01-24 13:38:10 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2024-01-24 13:38:10 +0300 |
commit | 0fa39189ae1eea51681d472db38a290bc4df1cfe (patch) | |
tree | c4c5c8f5970947ed6c62418fd86106166db485a2 /src/mir_app | |
parent | 60fec7a89a7870d52ebd76315193b105973b1219 (diff) |
PS_GETNAME: another old atavism removed
Diffstat (limited to 'src/mir_app')
-rw-r--r-- | src/mir_app/src/clui.cpp | 2 | ||||
-rw-r--r-- | src/mir_app/src/menu_clist.cpp | 3 | ||||
-rw-r--r-- | src/mir_app/src/meta_services.cpp | 16 | ||||
-rw-r--r-- | src/mir_app/src/metacontacts.h | 1 | ||||
-rw-r--r-- | src/mir_app/src/protocols.cpp | 3 |
5 files changed, 2 insertions, 23 deletions
diff --git a/src/mir_app/src/clui.cpp b/src/mir_app/src/clui.cpp index 7efc4404be..b942e43469 100644 --- a/src/mir_app/src/clui.cpp +++ b/src/mir_app/src/clui.cpp @@ -146,7 +146,7 @@ public: {
szProto = Proto_GetBaseAccountName(hContact);
bDelContact = (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_SERVERCLIST) != 0;
- bDelHistory = (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_4, 0) & PF4_SERVERMSGID) != 0;
+ bDelHistory = ProtoServiceExists(szProto, PS_GETCAPS);
bForEveryone = (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_4, 0) & PF4_DELETEFORALL) != 0;
}
diff --git a/src/mir_app/src/menu_clist.cpp b/src/mir_app/src/menu_clist.cpp index 49b7e3a074..74abd6075a 100644 --- a/src/mir_app/src/menu_clist.cpp +++ b/src/mir_app/src/menu_clist.cpp @@ -512,13 +512,10 @@ static INT_PTR StatusMenuExecService(WPARAM wParam, LPARAM) if (smep->status == 0 && smep->pimi != nullptr && smep->szProto != nullptr) {
char *prot = smep->szProto;
- char szHumanName[64] = { 0 };
PROTOACCOUNT *acc = Proto_GetAccount(smep->szProto);
acc->bIsLocked = !acc->bIsLocked;
db_set_b(0, prot, "LockMainStatus", acc->bIsLocked);
- CallProtoService(smep->szProto, PS_GETNAME, _countof(szHumanName), (LPARAM)szHumanName);
-
TMO_IntMenuItem *pimi = MO_GetIntMenuItem(smep->pimi);
if (pimi == nullptr)
return 0;
diff --git a/src/mir_app/src/meta_services.cpp b/src/mir_app/src/meta_services.cpp index 54ebf95f07..108fae7414 100644 --- a/src/mir_app/src/meta_services.cpp +++ b/src/mir_app/src/meta_services.cpp @@ -76,21 +76,6 @@ INT_PTR Meta_GetCaps(WPARAM wParam, LPARAM) return 0;
}
-/** Copy the name of the protocole into lParam
-* @param wParam : max size of the name
-* @param lParam : reference to a char *, which will hold the name
-*/
-
-INT_PTR Meta_GetName(WPARAM wParam, LPARAM lParam)
-{
- char *name = (char *)Translate(META_PROTO);
- size_t size = min(mir_strlen(name), wParam - 1); // copy only the first size bytes.
- if (strncpy((char *)lParam, name, size) == nullptr)
- return 1;
- ((char *)lParam)[size] = '\0';
- return 0;
-}
-
/** Loads the icon corresponding to the status
* Called by the CList when the status changes.
* @param wParam : icon type
@@ -815,7 +800,6 @@ void Meta_InitServices() }
CreateProtoServiceFunction(META_PROTO, PS_GETCAPS, Meta_GetCaps);
- CreateProtoServiceFunction(META_PROTO, PS_GETNAME, Meta_GetName);
CreateProtoServiceFunction(META_PROTO, PS_LOADICON, Meta_LoadIcon);
CreateProtoServiceFunction(META_PROTO, PS_SETSTATUS, Meta_SetStatus);
diff --git a/src/mir_app/src/metacontacts.h b/src/mir_app/src/metacontacts.h index e6edd3d205..c5545b4e12 100644 --- a/src/mir_app/src/metacontacts.h +++ b/src/mir_app/src/metacontacts.h @@ -67,7 +67,6 @@ DBCachedContact* CheckMeta(MCONTACT hMeta); void Meta_FixStatus(DBCachedContact *ccMeta);
INT_PTR Meta_GetCaps(WPARAM wParam, LPARAM lParam);
-INT_PTR Meta_GetName(WPARAM wParam, LPARAM lParam);
INT_PTR Meta_LoadIcon(WPARAM wParam, LPARAM lParam);
INT_PTR Meta_SetStatus(WPARAM wParam, LPARAM lParam);
INT_PTR Meta_GetStatus(WPARAM wParam, LPARAM lParam);
diff --git a/src/mir_app/src/protocols.cpp b/src/mir_app/src/protocols.cpp index 509f1bbedb..f9553396db 100644 --- a/src/mir_app/src/protocols.cpp +++ b/src/mir_app/src/protocols.cpp @@ -71,8 +71,7 @@ static TServiceListItem serviceItems[] = { PS_GETAWAYMSG, 28 },
{ PS_SETAWAYMSG, 29 },
{ PSS_USERISTYPING, 30 },
- { PS_GETNAME, 31 },
- { PS_GETSTATUS, 32 },
+ { PS_GETSTATUS, 31 },
};
//------------------------------------------------------------------------------------
|