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/CSList | |
parent | c5bf7d6123dd1c3b82ccb8fdb1b068077e9d56d4 (diff) |
CMPlugin to receive a reference to PLUGININFOEX
Diffstat (limited to 'plugins/CSList')
-rw-r--r-- | plugins/CSList/src/cslist.cpp | 18 | ||||
-rw-r--r-- | plugins/CSList/src/stdafx.h | 22 |
2 files changed, 21 insertions, 19 deletions
diff --git a/plugins/CSList/src/cslist.cpp b/plugins/CSList/src/cslist.cpp index 1b72774fe9..ef6d3f19c6 100644 --- a/plugins/CSList/src/cslist.cpp +++ b/plugins/CSList/src/cslist.cpp @@ -33,7 +33,9 @@ int &hLangpack(g_plugin.m_hLang); static LIST<CSWindow> arWindows(3, HandleKeySortT); -PLUGININFOEX pluginInfoEx = +//====[ PLUGIN INFO ]======================================================== + +static PLUGININFOEX pluginInfoEx = { sizeof(PLUGININFOEX), __PLUGIN_NAME, @@ -47,14 +49,16 @@ PLUGININFOEX pluginInfoEx = { 0xc8cc7414, 0x6507, 0x4af6, { 0x92, 0x5a, 0x83, 0xc1, 0xd2, 0xf7, 0xbe, 0x8c } } }; -// ====[ PLUGIN INFO ]======================================================== +CMPlugin::CMPlugin() : + PLUGIN<CMPlugin>(MODNAME, pluginInfoEx) +{} extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) { return &pluginInfoEx; } -// ====[ LOADER ]============================================================= +//====[ LOADER ]============================================================= static int OnDbChanged(WPARAM hContact, LPARAM lparam) { @@ -139,14 +143,14 @@ extern "C" __declspec(dllexport) int Load() return 0; } -// ====[ UNLOADER ]=========================================================== +//====[ UNLOADER ]=========================================================== extern "C" __declspec(dllexport) int Unload() { return 0; } -// ====[ FUN ]================================================================ +//====[ FUN ]================================================================ void RegisterHotkeys(char buf[200], wchar_t* accName, int Number) { @@ -671,7 +675,7 @@ void CSListView::setFullFocusedSelection(int selection) SetFocus(m_handle); } -// ====[ LIST MANAGEMENT ]==================================================== +//====[ LIST MANAGEMENT ]==================================================== CSItemsList::CSItemsList(char *protoName) { @@ -791,7 +795,7 @@ void CSItemsList::saveItems(char *protoName) } -// ====[ PROCEDURES ]========================================================= +//====[ PROCEDURES ]========================================================= INT_PTR CALLBACK CSWindowProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam) { diff --git a/plugins/CSList/src/stdafx.h b/plugins/CSList/src/stdafx.h index 810409e9fa..c78a18e600 100644 --- a/plugins/CSList/src/stdafx.h +++ b/plugins/CSList/src/stdafx.h @@ -28,7 +28,7 @@ Offers List of your Custom Statuses. ============================================================================
-// ====[ INCLUDES AND DEFINITIONS ]======================================== */
+//====[ INCLUDES AND DEFINITIONS ]======================================== */
#ifndef __CSLIST_H
#define __CSLIST_H 1
@@ -52,24 +52,22 @@ Offers List of your Custom Statuses. #include "resource.h"
#include "version.h"
-// ====[ BASIC DEFINITIONS ]==================================================
+//====[ BASIC DEFINITIONS ]==================================================
#define MODULENAME LPGENW("Custom Status List")
#define MODNAME "CSList"
struct CMPlugin : public PLUGIN<CMPlugin>
{
- CMPlugin() :
- PLUGIN<CMPlugin>(MODNAME)
- {}
+ CMPlugin();
};
-// ====[ LIMITS ]=============================================================
+//====[ LIMITS ]=============================================================
#define EXTRASTATUS_TITLE_LIMIT 64 // limit of chars for extra status title
#define EXTRASTATUS_MESSAGE_LIMIT 2048 // limit of chars for extra status message
-// ====[ DEFAULT DB VALUES ]==================================================
+//====[ DEFAULT DB VALUES ]==================================================
#define DEFAULT_ICQ_XSTATUS_ENABLED 1
#define DEFAULT_PLUGIN_SHOW_RELNOTES 0
@@ -83,7 +81,7 @@ struct CMPlugin : public PLUGIN<CMPlugin> #define DEFAULT_REMEMBER_WINDOW_POSITION 1
-// ====[ FUNCTION MACROS ]====================================================
+//====[ FUNCTION MACROS ]====================================================
// set which row is selected (cannot be only focused, but fully selected - second param ;))
#define ListView_GetSelectedItemMacro( hwnd ) ListView_GetNextItem( hwnd, -1, LVNI_FOCUSED | LVNI_SELECTED );
@@ -105,7 +103,7 @@ struct CMPlugin : public PLUGIN<CMPlugin> typedef void(__cdecl *pForAllProtosFunc)(char*, void *);
-// ====[ STRUCTURES ]=========================================================
+//====[ STRUCTURES ]=========================================================
struct StatusItem // list item structure
{
@@ -158,7 +156,7 @@ static struct CSForm { // icons + buttons { IDOK, LPGENW("Set custom status to selected one and close"), LPGENW("Set"), "apply", IDI_APPLY }
};
-// ====[ MY BITCHY LIST IMPLEMENTATION x)) ]==================================
+//====[ MY BITCHY LIST IMPLEMENTATION x)) ]==================================
// TODO: Optimize it all x))
template< class T > struct ListItem
@@ -307,7 +305,7 @@ public: };
-// ====[ CLASSING -- FUNNY STUFF :) ]=========================================
+//====[ CLASSING -- FUNNY STUFF :) ]=========================================
struct CSWindow;
struct CSAMWindow;
@@ -404,7 +402,7 @@ void addProtoStatusMenuItem(char *protoName); void RegisterHotkeys(char buf[200], wchar_t* accName, int Number);
void SetStatus(WORD code, StatusItem* item, char *protoName);
-// ====[ PROCEDURES ]=========================================================
+//====[ PROCEDURES ]=========================================================
INT_PTR CALLBACK CSWindowProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam);
INT_PTR CALLBACK CSAMWindowProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam);
|