summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2020-06-29 18:03:10 +0300
committerGeorge Hazan <ghazan@miranda.im>2020-06-29 18:03:10 +0300
commit8b654ebcea0e70b228513b45bedfda08042cfb7b (patch)
tree4a4cfa3ea1d819694f359cd058a83320ed7e2dcd /protocols/SkypeWeb
parentee16115cdef84af098a62a6ce46515af6a109d12 (diff)
"Load server history" menu items gathered in one stub not to create zillions of duplicate menu items
Diffstat (limited to 'protocols/SkypeWeb')
-rw-r--r--protocols/SkypeWeb/res/Icons/sync_history.icobin5430 -> 0 bytes
-rw-r--r--protocols/SkypeWeb/res/resource.rc1
-rw-r--r--protocols/SkypeWeb/src/resource.h1
-rw-r--r--protocols/SkypeWeb/src/skype_icons.cpp1
-rw-r--r--protocols/SkypeWeb/src/skype_menus.cpp9
-rw-r--r--protocols/SkypeWeb/src/skype_menus.h1
-rw-r--r--protocols/SkypeWeb/src/skype_proto.cpp1
7 files changed, 1 insertions, 13 deletions
diff --git a/protocols/SkypeWeb/res/Icons/sync_history.ico b/protocols/SkypeWeb/res/Icons/sync_history.ico
deleted file mode 100644
index d6ac6546f2..0000000000
--- a/protocols/SkypeWeb/res/Icons/sync_history.ico
+++ /dev/null
Binary files differ
diff --git a/protocols/SkypeWeb/res/resource.rc b/protocols/SkypeWeb/res/resource.rc
index bfd65f1872..97dd7297eb 100644
--- a/protocols/SkypeWeb/res/resource.rc
+++ b/protocols/SkypeWeb/res/resource.rc
@@ -28,7 +28,6 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_DEFAULT
// remains consistent on all systems.
IDI_SKYPE ICON "Icons\\skype.ico"
IDI_CONFERENCE ICON "Icons\\conference.ico"
-IDI_SYNCHISTORY ICON "Icons\\sync_history.ico"
IDI_BLOCKUSER ICON "Icons\\user_block.ico"
IDI_UNBLOCKUSER ICON "Icons\\user_unblock.ico"
IDI_CALL ICON "Icons\\call.ico"
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 <http://www.gnu.org/licenses/>.
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);