diff options
author | George Hazan <ghazan@miranda.im> | 2018-05-20 15:08:48 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-05-20 15:08:48 +0300 |
commit | 8a74e7495ce5ad39de4f5c25121a84d35df90c36 (patch) | |
tree | 03e5b4870f09a3163306740c2eebee47bc15b042 /plugins/mTextControl | |
parent | c5bf7d6123dd1c3b82ccb8fdb1b068077e9d56d4 (diff) |
CMPlugin to receive a reference to PLUGININFOEX
Diffstat (limited to 'plugins/mTextControl')
-rw-r--r-- | plugins/mTextControl/src/main.cpp | 4 | ||||
-rw-r--r-- | plugins/mTextControl/src/stdafx.h | 6 | ||||
-rw-r--r-- | plugins/mTextControl/src/textusers.cpp | 8 |
3 files changed, 10 insertions, 8 deletions
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<CMPlugin>(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>
{
- CMPlugin() :
- PLUGIN<CMPlugin>(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);
}
|