From 8a74e7495ce5ad39de4f5c25121a84d35df90c36 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 20 May 2018 15:08:48 +0300 Subject: CMPlugin to receive a reference to PLUGININFOEX --- plugins/mTextControl/src/main.cpp | 4 ++++ plugins/mTextControl/src/stdafx.h | 6 ++---- plugins/mTextControl/src/textusers.cpp | 8 ++++---- 3 files changed, 10 insertions(+), 8 deletions(-) (limited to 'plugins/mTextControl') diff --git a/plugins/mTextControl/src/main.cpp b/plugins/mTextControl/src/main.cpp index 1430085f31..7b2e4664f8 100644 --- a/plugins/mTextControl/src/main.cpp +++ b/plugins/mTextControl/src/main.cpp @@ -45,6 +45,10 @@ PLUGININFOEX pluginInfoEx = { 0x69b9443b, 0xdc58, 0x4876, { 0xad, 0x39, 0xe3, 0xf4, 0x18, 0xa1, 0x33, 0xc5 } } }; +CMPlugin::CMPlugin() : + PLUGIN(MODULENAME, pluginInfoEx) +{} + extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) { return &pluginInfoEx; diff --git a/plugins/mTextControl/src/stdafx.h b/plugins/mTextControl/src/stdafx.h index d669ffbc57..b9ddc388dc 100644 --- a/plugins/mTextControl/src/stdafx.h +++ b/plugins/mTextControl/src/stdafx.h @@ -47,7 +47,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include "fancy_rtf.h" #include "textcontrol.h" -#define MODULNAME "MTextControl" // DB module for this plugin +#define MODULENAME "MTextControl" // DB module for this plugin #define MODULNAMEW L"MTextControl" // DB module for this plugin #define MODULTITLE "Text Display" @@ -56,9 +56,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA struct CMPlugin : public PLUGIN { - CMPlugin() : - PLUGIN(MODULNAME) - {} + CMPlugin(); }; #endif // __headers_h__ diff --git a/plugins/mTextControl/src/textusers.cpp b/plugins/mTextControl/src/textusers.cpp index b9a16a3d21..b0d27d16e4 100644 --- a/plugins/mTextControl/src/textusers.cpp +++ b/plugins/mTextControl/src/textusers.cpp @@ -45,8 +45,8 @@ HANDLE DLL_CALLCONV MTI_TextUserAdd(const char *userTitle, DWORD options) textUserNew->name = new char[mir_strlen(userTitle) + 1]; mir_strcpy(textUserNew->name, userTitle); textUserNew->options = - (db_get_dw(0, MODULNAME, userTitle, options)&MTEXT_FANCY_MASK) | (textUserNew->options&MTEXT_SYSTEM_MASK); - db_set_dw(0, MODULNAME, userTitle, textUserNew->options); + (db_get_dw(0, MODULENAME, userTitle, options)&MTEXT_FANCY_MASK) | (textUserNew->options&MTEXT_SYSTEM_MASK); + db_set_dw(0, MODULENAME, userTitle, textUserNew->options); textUserNew->prev = textUserLast; textUserNew->next = nullptr; if (textUserLast) { @@ -73,12 +73,12 @@ void TextUserSetOptions(HANDLE userHandle, DWORD options) void TextUsersSave() { for (TextUser *textUser = textUserFirst; textUser; textUser = textUser->next) - db_set_dw(0, MODULNAME, textUser->name, textUser->options); + db_set_dw(0, MODULENAME, textUser->name, textUser->options); } void TextUsersReset() { for (TextUser *textUser = textUserFirst; textUser; textUser = textUser->next) textUser->options = - (db_get_dw(0, MODULNAME, textUser->name, 0)&MTEXT_FANCY_MASK) | (textUser->options&MTEXT_SYSTEM_MASK); + (db_get_dw(0, MODULENAME, textUser->name, 0)&MTEXT_FANCY_MASK) | (textUser->options&MTEXT_SYSTEM_MASK); } -- cgit v1.2.3