From 9c6ffd1f25e7a5b23be5fbc719e29af54d75a5b7 Mon Sep 17 00:00:00 2001 From: sje Date: Mon, 19 Mar 2007 01:28:47 +0000 Subject: added GUID's git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@128 4f64403b-2f21-0410-a795-97e2b3489a10 --- otr/dllmain.cpp | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'otr/dllmain.cpp') diff --git a/otr/dllmain.cpp b/otr/dllmain.cpp index 4f19e47..68fbf4b 100644 --- a/otr/dllmain.cpp +++ b/otr/dllmain.cpp @@ -32,8 +32,8 @@ char private_key_filename[MAX_PATH]; OtrlUserState otr_user_state = 0; // plugin stuff -PLUGININFO pluginInfo={ - sizeof(PLUGININFO), +PLUGININFOEX pluginInfo={ + sizeof(PLUGININFOEX), MODULE, PLUGIN_MAKE_VERSION(VER_MAJOR, VER_MINOR, VER_RELEASE, VER_BUILD), DESC_STRING, @@ -42,7 +42,8 @@ PLUGININFO pluginInfo={ "© 2005 Scott Ellis", "http://www.scottellis.com.au/", 0, //not transient - 0 //doesn't replace anything built-in + 0, //doesn't replace anything built-in + { 0x1b5b5c1b, 0x93a, 0x4765, { 0xa1, 0xfa, 0x4c, 0xc1, 0xda, 0x44, 0x52, 0x87 } } // {1B5B5C1B-093A-4765-A1FA-4CC1DA445287} }; extern "C" BOOL APIENTRY DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved) { @@ -50,7 +51,12 @@ extern "C" BOOL APIENTRY DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvRe return TRUE; } -extern "C" DLLIMPORT PLUGININFO* MirandaPluginInfo(DWORD mirandaVersion) { +static const MUUID interfaces[] = {MIID_OTR, MIID_LAST}; +extern "C" __declspec(dllexport) const MUUID* MirandaPluginInterfaces(void) { + return interfaces; +} + +extern "C" DLLIMPORT PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion) { return &pluginInfo; } @@ -267,8 +273,8 @@ extern "C" void otr_gui_inject_message(void *opdata, const char *accountname, co * protocol / username conversation. */ extern "C" void otr_gui_notify(void *opdata, OtrlNotifyLevel level, const char *accountname, const char *protocol, const char *username, const char *title, const char *primary, const char *secondary) { char buff1[512], buff2[512]; - mir_snprintf(buff1, 512, "%s: %s", username, title); - mir_snprintf(buff2, 512, "%s\n%s", primary, secondary); + mir_snprintf(buff1, 512, "%s: %s", username, Translate(title)); + mir_snprintf(buff2, 512, "%s\n%s", Translate(primary), Translate(secondary)); ShowPopup(buff1, buff2, 0); } @@ -288,7 +294,7 @@ extern "C" int otr_gui_display_otr_message(void *opdata, const char *accountname */ //return 1; - ShowMessageInline((HANDLE)opdata, msg); + ShowMessageInline((HANDLE)opdata, Translate(msg)); return 0; } -- cgit v1.2.3