diff options
author | George Hazan <george.hazan@gmail.com> | 2025-04-10 16:45:33 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2025-04-10 16:45:33 +0300 |
commit | 35d5b1cc47ac444524c087615033d5856f8a5dc3 (patch) | |
tree | ea04d67f9254db682e5418ccad43bad873068ea9 /protocols/Twitter/src | |
parent | a5e4a0de5bfa544de0e77ce3bf5443386530d43f (diff) |
no need to declare the same template in each protocol
Diffstat (limited to 'protocols/Twitter/src')
-rw-r--r-- | protocols/Twitter/src/main.cpp | 2 | ||||
-rw-r--r-- | protocols/Twitter/src/proto.h | 1 | ||||
-rw-r--r-- | protocols/Twitter/src/theme.cpp | 9 | ||||
-rw-r--r-- | protocols/Twitter/src/theme.h | 1 |
4 files changed, 3 insertions, 10 deletions
diff --git a/protocols/Twitter/src/main.cpp b/protocols/Twitter/src/main.cpp index ddfca4e698..cbbbb3ae14 100644 --- a/protocols/Twitter/src/main.cpp +++ b/protocols/Twitter/src/main.cpp @@ -54,7 +54,7 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOC int CMPlugin::Load()
{
InitIcons();
- InitContactMenus();
+ CTwitterProto::InitContactMenus();
TwitterInitSounds();
return 0;
}
diff --git a/protocols/Twitter/src/proto.h b/protocols/Twitter/src/proto.h index 0b91476259..0945761c82 100644 --- a/protocols/Twitter/src/proto.h +++ b/protocols/Twitter/src/proto.h @@ -189,6 +189,7 @@ public: void OnModulesLoaded() override;
void UpdateSettings();
+ static void InitContactMenus(void);
//////////////////////////////////////////////////////////////////////////////////////
// Services
diff --git a/protocols/Twitter/src/theme.cpp b/protocols/Twitter/src/theme.cpp index 378e57447e..7470ea1a38 100644 --- a/protocols/Twitter/src/theme.cpp +++ b/protocols/Twitter/src/theme.cpp @@ -55,13 +55,6 @@ static HGENMENU g_hMenuItems[2]; // Helper functions
-template<INT_PTR(__cdecl CTwitterProto::*Fcn)(WPARAM, LPARAM)>
-INT_PTR GlobalService(WPARAM hContact, LPARAM lParam)
-{
- CTwitterProto *proto = CMPlugin::getInstance(MCONTACT(hContact));
- return proto ? (proto->*Fcn)(hContact, lParam) : 0;
-}
-
static int PrebuildContactMenu(WPARAM hContact, LPARAM lParam)
{
ShowContactMenus(false);
@@ -70,7 +63,7 @@ static int PrebuildContactMenu(WPARAM hContact, LPARAM lParam) return proto ? proto->OnPrebuildContactMenu(hContact, lParam) : 0;
}
-void InitContactMenus()
+void CTwitterProto::InitContactMenus()
{
HookEvent(ME_CLIST_PREBUILDCONTACTMENU, PrebuildContactMenu);
diff --git a/protocols/Twitter/src/theme.h b/protocols/Twitter/src/theme.h index 6bd91241fd..5aed016764 100644 --- a/protocols/Twitter/src/theme.h +++ b/protocols/Twitter/src/theme.h @@ -21,6 +21,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. void InitIcons(void);
HANDLE GetIconHandle(const char *name);
-void InitContactMenus(void);
void ShowContactMenus(bool show);
void TwitterInitSounds(void);
\ No newline at end of file |