From e58823d961a630eb62e60d2ccb443761ba5f1704 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 14 Jun 2012 15:51:34 +0000 Subject: - all MS_CLIST_ADD*ITEM services replaced with Menu_Add*Item stubs. - massive cleanup of the menu-related code git-svn-id: http://svn.miranda-ng.org/main/trunk@410 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/CyrTranslit/MirandaContact.cpp | 6 +----- plugins/CyrTranslit/main.cpp | 26 ++++++++------------------ plugins/CyrTranslit/plugin.h | 2 +- 3 files changed, 10 insertions(+), 24 deletions(-) (limited to 'plugins/CyrTranslit') diff --git a/plugins/CyrTranslit/MirandaContact.cpp b/plugins/CyrTranslit/MirandaContact.cpp index 0906db3769..1a0f149ef8 100644 --- a/plugins/CyrTranslit/MirandaContact.cpp +++ b/plugins/CyrTranslit/MirandaContact.cpp @@ -120,11 +120,7 @@ void MirandaContact::generateMenuItemsForAllContacts() { CLISTMENUITEM mi; fillInMenuItem(mi); - - int hItem = CallService( - MS_CLIST_ADDCONTACTMENUITEM, 0, reinterpret_cast(&mi)); - - hTransliterateCmdMenuItem = reinterpret_cast(hItem); + hTransliterateCmdMenuItem = Menu_AddContactMenuItem(&mi); } //------------------------------------------------------------------------------ diff --git a/plugins/CyrTranslit/main.cpp b/plugins/CyrTranslit/main.cpp index dc675ff654..4d07deb714 100644 --- a/plugins/CyrTranslit/main.cpp +++ b/plugins/CyrTranslit/main.cpp @@ -20,21 +20,21 @@ #include "plugin.h" #include "MirandaContact.h" - HINSTANCE hInst; PLUGINLINK *pluginLink; struct UTF8_INTERFACE utfi; struct MM_INTERFACE mmi; +int hLangpack = 0; PLUGININFOEX pluginInfoEx={ sizeof(PLUGININFOEX), - PLG_SHORTNAME, + PLG_SHORTNAME, PLG_VERSION, PLG_DESCRIPTION, - PLG_AUTHOR, - PLG_AUTHOREMAIL, - PLG_COPYRIGHT, - PLG_HOMEPAGE, + PLG_AUTHOR, + PLG_AUTHOREMAIL, + PLG_COPYRIGHT, + PLG_HOMEPAGE, PLG_FLAGS, PLG_REPLACESDEFMODULE, MIID_V_CYRTRANSLIT, @@ -59,32 +59,22 @@ static const MUUID interfaces[] = {MIID_V_CYRTRANSLIT, MIID_LAST}; extern "C" __declspec(dllexport) const MUUID* MirandaPluginInterfaces(void) { - //#if defined (_UNICODE) - pluginInfoEx.flags = 1; // dynamic UNICODE_AWARE - //#endif return interfaces; } - //------------------------------------------------------------------------------ extern "C" __declspec(dllexport) int Load(PLUGINLINK *link) { //system inits: pluginLink = link; - - memset(&utfi, 0, sizeof(utfi)); mir_getUTFI(&utfi); - - memset(&mmi, 0, sizeof(mmi)); mir_getMMI(&mmi); - + mir_getLP(&pluginInfoEx); //plugin inits: PLACE IT ONLY AFTER THIS LINE - CyrTranslit::MirandaContact::initialize(); - - + CyrTranslit::MirandaContact::initialize(); return 0; } diff --git a/plugins/CyrTranslit/plugin.h b/plugins/CyrTranslit/plugin.h index fd76b71391..48310a1a3a 100644 --- a/plugins/CyrTranslit/plugin.h +++ b/plugins/CyrTranslit/plugin.h @@ -41,7 +41,7 @@ #include "m_protosvc.h" #include "m_system.h" #include "m_clist.h" - +#include "m_langpack.h" /****** PLUGIN DEFINES *******************************************************/ -- cgit v1.2.3