From 8b654ebcea0e70b228513b45bedfda08042cfb7b Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 29 Jun 2020 18:03:10 +0300 Subject: "Load server history" menu items gathered in one stub not to create zillions of duplicate menu items --- protocols/SkypeWeb/src/resource.h | 1 - protocols/SkypeWeb/src/skype_icons.cpp | 1 - protocols/SkypeWeb/src/skype_menus.cpp | 9 --------- protocols/SkypeWeb/src/skype_menus.h | 1 - protocols/SkypeWeb/src/skype_proto.cpp | 1 + 5 files changed, 1 insertion(+), 12 deletions(-) (limited to 'protocols/SkypeWeb/src') diff --git a/protocols/SkypeWeb/src/resource.h b/protocols/SkypeWeb/src/resource.h index 194e0275f5..031daa51b0 100644 --- a/protocols/SkypeWeb/src/resource.h +++ b/protocols/SkypeWeb/src/resource.h @@ -13,7 +13,6 @@ #define IDD_GC_CREATE 111 #define IDD_GC_INVITE 112 #define IDI_CONFERENCE 114 -#define IDI_SYNCHISTORY 117 #define IDI_BLOCKUSER 118 #define IDI_UNBLOCKUSER 119 #define IDI_CALL 120 diff --git a/protocols/SkypeWeb/src/skype_icons.cpp b/protocols/SkypeWeb/src/skype_icons.cpp index ded5516548..b99a12baa3 100644 --- a/protocols/SkypeWeb/src/skype_icons.cpp +++ b/protocols/SkypeWeb/src/skype_icons.cpp @@ -21,7 +21,6 @@ static IconItem iconList[] = { { LPGEN("Protocol icon"), "main", IDI_SKYPE }, { LPGEN("Create new chat icon"), "conference", IDI_CONFERENCE }, - { LPGEN("Sync history icon"), "synchistory", IDI_SYNCHISTORY }, { LPGEN("Block user icon"), "user_block", IDI_BLOCKUSER }, { LPGEN("Unblock user icon"), "user_unblock", IDI_UNBLOCKUSER }, { LPGEN("Incoming call icon"), "inc_call", IDI_CALL }, diff --git a/protocols/SkypeWeb/src/skype_menus.cpp b/protocols/SkypeWeb/src/skype_menus.cpp index 31fffc92f6..a0d96be1ca 100644 --- a/protocols/SkypeWeb/src/skype_menus.cpp +++ b/protocols/SkypeWeb/src/skype_menus.cpp @@ -40,7 +40,6 @@ int CSkypeProto::OnPrebuildContactMenu(WPARAM hContact, LPARAM) Menu_ShowItem(ContactMenuItems[CMI_BLOCK], true); Menu_ShowItem(ContactMenuItems[CMI_UNBLOCK], isCtrlPressed || isBlocked); - Menu_ShowItem(ContactMenuItems[CMI_GETSERVERHISTORY], true); return 0; } @@ -61,14 +60,6 @@ void CSkypeProto::InitMenus() CMenuItem mi(&g_plugin); mi.flags = CMIF_UNICODE; - mi.pszService = MODULE"/GetHistory"; - mi.name.w = LPGENW("Get server history"); - mi.position = CMI_POSITION + CMI_GETSERVERHISTORY; - mi.hIcolibItem = g_plugin.getIconHandle(IDI_SYNCHISTORY); - SET_UID(mi, 0xc9a64e98, 0x9257, 0x4b52, 0x98, 0xdd, 0x7f, 0x56, 0xb3, 0x90, 0xe3, 0xde); - ContactMenuItems[CMI_GETSERVERHISTORY] = Menu_AddContactMenuItem(&mi); - CreateServiceFunction(mi.pszService, GlobalService<&CSkypeProto::GetContactHistory>); - mi.pszService = MODULE"/BlockContact"; mi.name.w = LPGENW("Block contact"); mi.position = CMI_POSITION + CMI_BLOCK; diff --git a/protocols/SkypeWeb/src/skype_menus.h b/protocols/SkypeWeb/src/skype_menus.h index 61f4560e49..a6d1e9449a 100644 --- a/protocols/SkypeWeb/src/skype_menus.h +++ b/protocols/SkypeWeb/src/skype_menus.h @@ -22,7 +22,6 @@ along with this program. If not, see . enum { - CMI_GETSERVERHISTORY, CMI_BLOCK, CMI_UNBLOCK, CMI_MAX // this item shall be the last one diff --git a/protocols/SkypeWeb/src/skype_proto.cpp b/protocols/SkypeWeb/src/skype_proto.cpp index e590729a4e..3a423559ef 100644 --- a/protocols/SkypeWeb/src/skype_proto.cpp +++ b/protocols/SkypeWeb/src/skype_proto.cpp @@ -38,6 +38,7 @@ CSkypeProto::CSkypeProto(const char* protoName, const wchar_t* userName) : CreateProtoService(PS_MENU_REQAUTH, &CSkypeProto::OnRequestAuth); CreateProtoService(PS_MENU_GRANTAUTH, &CSkypeProto::OnGrantAuth); + CreateProtoService(PS_MENU_LOADHISTORY, &CSkypeProto::GetContactHistory); HookProtoEvent(ME_OPT_INITIALISE, &CSkypeProto::OnOptionsInit); HookProtoEvent(ME_DB_EVENT_MARKED_READ, &CSkypeProto::OnDbEventRead); -- cgit v1.2.3