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/TipperYM | |
parent | c5bf7d6123dd1c3b82ccb8fdb1b068077e9d56d4 (diff) |
CMPlugin to receive a reference to PLUGININFOEX
Diffstat (limited to 'plugins/TipperYM')
-rw-r--r-- | plugins/TipperYM/src/message_pump.cpp | 4 | ||||
-rw-r--r-- | plugins/TipperYM/src/options.cpp | 264 | ||||
-rw-r--r-- | plugins/TipperYM/src/popwin.cpp | 10 | ||||
-rw-r--r-- | plugins/TipperYM/src/popwin.h | 2 | ||||
-rw-r--r-- | plugins/TipperYM/src/skin_parser.cpp | 8 | ||||
-rw-r--r-- | plugins/TipperYM/src/stdafx.h | 6 | ||||
-rw-r--r-- | plugins/TipperYM/src/subst.cpp | 20 | ||||
-rw-r--r-- | plugins/TipperYM/src/tipper.cpp | 32 |
8 files changed, 174 insertions, 172 deletions
diff --git a/plugins/TipperYM/src/message_pump.cpp b/plugins/TipperYM/src/message_pump.cpp index 5eb1182f15..ac94a7b7f8 100644 --- a/plugins/TipperYM/src/message_pump.cpp +++ b/plugins/TipperYM/src/message_pump.cpp @@ -56,7 +56,7 @@ bool NeedWaitForContent(CLCINFOTIPEX *clcitex) if (opt.bWaitForStatusMsg && !bStatusMsgReady)
{
- db_unset(hContact, MODULE, "TempStatusMsg");
+ db_unset(hContact, MODULENAME, "TempStatusMsg");
if (CanRetrieveStatusMsg(hContact, szProto) && ProtoChainSend(hContact, PSS_GETAWAYMSG, 0, 0))
{
if (WaitForContentTimerID)
@@ -161,7 +161,7 @@ unsigned int CALLBACK MessagePumpThread(void*) }
if (swzMsg) {
- db_set_ws((DWORD_PTR)clcitex->hItem, MODULE, "TempStatusMsg", swzMsg);
+ db_set_ws((DWORD_PTR)clcitex->hItem, MODULENAME, "TempStatusMsg", swzMsg);
mir_free(swzMsg);
}
diff --git a/plugins/TipperYM/src/options.cpp b/plugins/TipperYM/src/options.cpp index 3e920bb3d4..0f62a94f93 100644 --- a/plugins/TipperYM/src/options.cpp +++ b/plugins/TipperYM/src/options.cpp @@ -36,7 +36,7 @@ extern int IsTrayProto(const wchar_t *swzProto, BOOL bExtendedTip) DBVARIANT dbv;
int result = 1;
- if (!db_get_ws(NULL, MODULE, szSetting, &dbv)) {
+ if (!db_get_ws(NULL, MODULENAME, szSetting, &dbv)) {
result = wcsstr(dbv.ptszVal, swzProto) ? 1 : 0;
db_free(&dbv);
}
@@ -219,43 +219,43 @@ void SaveDI(DISPLAYITEM *di, int index) void SaveOptions()
{
- db_set_dw(0, MODULE, "MaxWidth", opt.iWinWidth);
- db_set_dw(0, MODULE, "MaxHeight", opt.iWinMaxHeight);
- db_set_b(0, MODULE, "AvatarOpacity", (BYTE)opt.iAvatarOpacity);
- db_set_b(0, MODULE, "AvatarRoundCorners", (opt.bAvatarRound ? 1 : 0));
- db_set_b(0, MODULE, "TitleIconLayout", (BYTE)opt.titleIconLayout);
- db_set_b(0, MODULE, "TitleShow", (opt.bShowTitle ? 1 : 0));
+ db_set_dw(0, MODULENAME, "MaxWidth", opt.iWinWidth);
+ db_set_dw(0, MODULENAME, "MaxHeight", opt.iWinMaxHeight);
+ db_set_b(0, MODULENAME, "AvatarOpacity", (BYTE)opt.iAvatarOpacity);
+ db_set_b(0, MODULENAME, "AvatarRoundCorners", (opt.bAvatarRound ? 1 : 0));
+ db_set_b(0, MODULENAME, "TitleIconLayout", (BYTE)opt.titleIconLayout);
+ db_set_b(0, MODULENAME, "TitleShow", (opt.bShowTitle ? 1 : 0));
if (ServiceExists(MS_AV_DRAWAVATAR))
- db_set_b(0, MODULE, "AVLayout", (BYTE)opt.avatarLayout);
+ db_set_b(0, MODULENAME, "AVLayout", (BYTE)opt.avatarLayout);
opt.bWaitForAvatar = (opt.avatarLayout == PAV_NONE) ? false : true;
- db_set_dw(0, MODULE, "AVSize", opt.iAvatarSize);
- db_set_dw(0, MODULE, "TextIndent", opt.iTextIndent);
- db_set_dw(0, MODULE, "TitleIndent", opt.iTitleIndent);
- db_set_dw(0, MODULE, "ValueIndent", opt.iValueIndent);
- db_set_b(0, MODULE, "ShowNoFocus", (opt.bShowNoFocus ? 1 : 0));
+ db_set_dw(0, MODULENAME, "AVSize", opt.iAvatarSize);
+ db_set_dw(0, MODULENAME, "TextIndent", opt.iTextIndent);
+ db_set_dw(0, MODULENAME, "TitleIndent", opt.iTitleIndent);
+ db_set_dw(0, MODULENAME, "ValueIndent", opt.iValueIndent);
+ db_set_b(0, MODULENAME, "ShowNoFocus", (opt.bShowNoFocus ? 1 : 0));
- db_set_w(0, MODULE, "TimeIn", opt.iTimeIn);
+ db_set_w(0, MODULENAME, "TimeIn", opt.iTimeIn);
CallService(MS_CLC_SETINFOTIPHOVERTIME, opt.iTimeIn, 0);
- db_set_w(0, MODULE, "Padding", opt.iPadding);
- db_set_w(0, MODULE, "OuterAvatarPadding", opt.iOuterAvatarPadding);
- db_set_w(0, MODULE, "InnerAvatarPadding", opt.iInnerAvatarPadding);
- db_set_w(0, MODULE, "TextPadding", opt.iTextPadding);
- db_set_b(0, MODULE, "Position", (BYTE)opt.pos);
- db_set_dw(0, MODULE, "MinWidth", (DWORD)opt.iMinWidth);
- db_set_dw(0, MODULE, "MinHeight", (DWORD)opt.iMinHeight);
- db_set_dw(0, MODULE, "SidebarWidth", (DWORD)opt.iSidebarWidth);
- db_set_b(0, MODULE, "MouseTollerance", (BYTE)opt.iMouseTollerance);
- db_set_b(0, MODULE, "SBarTips", (opt.bStatusBarTips ? 1 : 0));
-
- db_set_w(0, MODULE, "LabelVAlign", opt.iLabelValign);
- db_set_w(0, MODULE, "LabelHAlign", opt.iLabelHalign);
- db_set_w(0, MODULE, "ValueVAlign", opt.iValueValign);
- db_set_w(0, MODULE, "ValueHAlign", opt.iValueHalign);
-
- db_set_b(0, MODULE, "OriginalAvSize", (opt.bOriginalAvatarSize ? 1 : 0));
- db_set_b(0, MODULE, "AvatarBorder", (opt.bAvatarBorder ? 1 : 0));
+ db_set_w(0, MODULENAME, "Padding", opt.iPadding);
+ db_set_w(0, MODULENAME, "OuterAvatarPadding", opt.iOuterAvatarPadding);
+ db_set_w(0, MODULENAME, "InnerAvatarPadding", opt.iInnerAvatarPadding);
+ db_set_w(0, MODULENAME, "TextPadding", opt.iTextPadding);
+ db_set_b(0, MODULENAME, "Position", (BYTE)opt.pos);
+ db_set_dw(0, MODULENAME, "MinWidth", (DWORD)opt.iMinWidth);
+ db_set_dw(0, MODULENAME, "MinHeight", (DWORD)opt.iMinHeight);
+ db_set_dw(0, MODULENAME, "SidebarWidth", (DWORD)opt.iSidebarWidth);
+ db_set_b(0, MODULENAME, "MouseTollerance", (BYTE)opt.iMouseTollerance);
+ db_set_b(0, MODULENAME, "SBarTips", (opt.bStatusBarTips ? 1 : 0));
+
+ db_set_w(0, MODULENAME, "LabelVAlign", opt.iLabelValign);
+ db_set_w(0, MODULENAME, "LabelHAlign", opt.iLabelHalign);
+ db_set_w(0, MODULENAME, "ValueVAlign", opt.iValueValign);
+ db_set_w(0, MODULENAME, "ValueHAlign", opt.iValueHalign);
+
+ db_set_b(0, MODULENAME, "OriginalAvSize", (opt.bOriginalAvatarSize ? 1 : 0));
+ db_set_b(0, MODULENAME, "AvatarBorder", (opt.bAvatarBorder ? 1 : 0));
}
void SaveItems()
@@ -286,16 +286,16 @@ void SaveItems() void SaveSkinOptions()
{
- db_set_b(0, MODULE, "Border", (opt.bBorder ? 1 : 0));
- db_set_b(0, MODULE, "DropShadow", (opt.bDropShadow ? 1 : 0));
- db_set_b(0, MODULE, "RoundCorners", (opt.bRound ? 1 : 0));
- db_set_b(0, MODULE, "AeroGlass", (opt.bAeroGlass ? 1 : 0));
- db_set_b(0, MODULE, "Opacity", (BYTE)opt.iOpacity);
- db_set_b(0, MODULE, "ShowEffect", (BYTE)opt.showEffect);
- db_set_b(0, MODULE, "ShowEffectSpeed", (BYTE)opt.iAnimateSpeed);
- db_set_b(0, MODULE, "LoadFonts", (opt.bLoadFonts ? 1 : 0));
- db_set_b(0, MODULE, "LoadProportions", (opt.bLoadProportions ? 1 : 0));
- db_set_dw(0, MODULE, "EnableColoring", opt.iEnableColoring);
+ db_set_b(0, MODULENAME, "Border", (opt.bBorder ? 1 : 0));
+ db_set_b(0, MODULENAME, "DropShadow", (opt.bDropShadow ? 1 : 0));
+ db_set_b(0, MODULENAME, "RoundCorners", (opt.bRound ? 1 : 0));
+ db_set_b(0, MODULENAME, "AeroGlass", (opt.bAeroGlass ? 1 : 0));
+ db_set_b(0, MODULENAME, "Opacity", (BYTE)opt.iOpacity);
+ db_set_b(0, MODULENAME, "ShowEffect", (BYTE)opt.showEffect);
+ db_set_b(0, MODULENAME, "ShowEffectSpeed", (BYTE)opt.iAnimateSpeed);
+ db_set_b(0, MODULENAME, "LoadFonts", (opt.bLoadFonts ? 1 : 0));
+ db_set_b(0, MODULENAME, "LoadProportions", (opt.bLoadProportions ? 1 : 0));
+ db_set_dw(0, MODULENAME, "EnableColoring", opt.iEnableColoring);
}
void LoadObsoleteSkinSetting()
@@ -305,15 +305,15 @@ void LoadObsoleteSkinSetting() for (int i = 0; i < SKIN_ITEMS_COUNT; i++) {
mir_snprintf(setting, "SPaintMode%d", i);
- opt.transfMode[i] = (TransformationMode)db_get_b(0, MODULE, setting, 0);
+ opt.transfMode[i] = (TransformationMode)db_get_b(0, MODULENAME, setting, 0);
mir_snprintf(setting, "SImgFile%d", i);
- if (!db_get_ws(NULL, MODULE, setting, &dbv)) {
+ if (!db_get_ws(NULL, MODULENAME, setting, &dbv)) {
opt.szImgFile[i] = mir_wstrdup(dbv.ptszVal);
db_free(&dbv);
}
mir_snprintf(setting, "SGlyphMargins%d", i);
- DWORD margins = db_get_dw(NULL, MODULE, setting, 0);
+ DWORD margins = db_get_dw(NULL, MODULENAME, setting, 0);
opt.margins[i].top = LOBYTE(LOWORD(margins));
opt.margins[i].right = HIBYTE(LOWORD(margins));
opt.margins[i].bottom = LOBYTE(HIWORD(margins));
@@ -323,25 +323,25 @@ void LoadObsoleteSkinSetting() void LoadOptions()
{
- opt.iWinWidth = db_get_dw(0, MODULE, "MaxWidth", 420);
- opt.iWinMaxHeight = db_get_dw(0, MODULE, "MaxHeight", 400);
- opt.iAvatarOpacity = db_get_b(0, MODULE, "AvatarOpacity", 100);
+ opt.iWinWidth = db_get_dw(0, MODULENAME, "MaxWidth", 420);
+ opt.iWinMaxHeight = db_get_dw(0, MODULENAME, "MaxHeight", 400);
+ opt.iAvatarOpacity = db_get_b(0, MODULENAME, "AvatarOpacity", 100);
if (opt.iAvatarOpacity > 100) opt.iAvatarOpacity = 100;
- opt.bAvatarRound = (db_get_b(0, MODULE, "AvatarRoundCorners", opt.bRound ? 1 : 0) == 1);
- opt.titleIconLayout = (PopupIconTitleLayout)db_get_b(0, MODULE, "TitleIconLayout", (BYTE)PTL_LEFTICON);
- opt.bShowTitle = (db_get_b(0, MODULE, "TitleShow", 1) == 1);
+ opt.bAvatarRound = (db_get_b(0, MODULENAME, "AvatarRoundCorners", opt.bRound ? 1 : 0) == 1);
+ opt.titleIconLayout = (PopupIconTitleLayout)db_get_b(0, MODULENAME, "TitleIconLayout", (BYTE)PTL_LEFTICON);
+ opt.bShowTitle = (db_get_b(0, MODULENAME, "TitleShow", 1) == 1);
if (ServiceExists(MS_AV_DRAWAVATAR))
- opt.avatarLayout = (PopupAvLayout)db_get_b(0, MODULE, "AVLayout", PAV_RIGHT);
+ opt.avatarLayout = (PopupAvLayout)db_get_b(0, MODULENAME, "AVLayout", PAV_RIGHT);
else
opt.avatarLayout = PAV_NONE;
opt.bWaitForAvatar = (opt.avatarLayout == PAV_NONE) ? false : true;
- opt.iAvatarSize = db_get_dw(0, MODULE, "AVSize", 60); //tweety
- opt.iTextIndent = db_get_dw(0, MODULE, "TextIndent", 22);
- opt.iTitleIndent = db_get_dw(0, MODULE, "TitleIndent", 22);
- opt.iValueIndent = db_get_dw(0, MODULE, "ValueIndent", 10);
- opt.iSidebarWidth = db_get_dw(0, MODULE, "SidebarWidth", 22);
- opt.bShowNoFocus = (db_get_b(0, MODULE, "ShowNoFocus", 1) == 1);
+ opt.iAvatarSize = db_get_dw(0, MODULENAME, "AVSize", 60); //tweety
+ opt.iTextIndent = db_get_dw(0, MODULENAME, "TextIndent", 22);
+ opt.iTitleIndent = db_get_dw(0, MODULENAME, "TitleIndent", 22);
+ opt.iValueIndent = db_get_dw(0, MODULENAME, "ValueIndent", 10);
+ opt.iSidebarWidth = db_get_dw(0, MODULENAME, "SidebarWidth", 22);
+ opt.bShowNoFocus = (db_get_b(0, MODULENAME, "ShowNoFocus", 1) == 1);
int i, real_count = 0;
opt.dsList = nullptr;
@@ -378,21 +378,21 @@ void LoadOptions() }
opt.iDiCount = real_count;
- opt.iTimeIn = db_get_w(0, MODULE, "TimeIn", 750);
- opt.iPadding = db_get_w(0, MODULE, "Padding", 4);
- opt.iOuterAvatarPadding = db_get_w(0, MODULE, "OuterAvatarPadding", 6);
- opt.iInnerAvatarPadding = db_get_w(0, MODULE, "InnerAvatarPadding", 10);
- opt.iTextPadding = db_get_w(0, MODULE, "TextPadding", 4);
- opt.pos = (PopupPosition)db_get_b(0, MODULE, "Position", (BYTE)PP_BOTTOMRIGHT);
- opt.iMinWidth = db_get_dw(0, MODULE, "MinWidth", 0);
- opt.iMinHeight = db_get_dw(0, MODULE, "MinHeight", 0);
+ opt.iTimeIn = db_get_w(0, MODULENAME, "TimeIn", 750);
+ opt.iPadding = db_get_w(0, MODULENAME, "Padding", 4);
+ opt.iOuterAvatarPadding = db_get_w(0, MODULENAME, "OuterAvatarPadding", 6);
+ opt.iInnerAvatarPadding = db_get_w(0, MODULENAME, "InnerAvatarPadding", 10);
+ opt.iTextPadding = db_get_w(0, MODULENAME, "TextPadding", 4);
+ opt.pos = (PopupPosition)db_get_b(0, MODULENAME, "Position", (BYTE)PP_BOTTOMRIGHT);
+ opt.iMinWidth = db_get_dw(0, MODULENAME, "MinWidth", 0);
+ opt.iMinHeight = db_get_dw(0, MODULENAME, "MinHeight", 0);
- opt.iMouseTollerance = db_get_b(0, MODULE, "MouseTollerance", (BYTE)GetSystemMetrics(SM_CXSMICON));
- opt.bStatusBarTips = (db_get_b(0, MODULE, "SBarTips", 1) == 1);
+ opt.iMouseTollerance = db_get_b(0, MODULENAME, "MouseTollerance", (BYTE)GetSystemMetrics(SM_CXSMICON));
+ opt.bStatusBarTips = (db_get_b(0, MODULENAME, "SBarTips", 1) == 1);
// convert defunct last message and status message options to new 'sys' items, and remove the old settings
- if (db_get_b(0, MODULE, "ShowLastMessage", 0)) {
- db_unset(0, MODULE, "ShowLastMessage");
+ if (db_get_b(0, MODULENAME, "ShowLastMessage", 0)) {
+ db_unset(0, MODULENAME, "ShowLastMessage");
// find end of list
di_node = opt.diList;
@@ -416,8 +416,8 @@ void LoadOptions() opt.iDiCount++;
}
- if (db_get_b(0, MODULE, "ShowStatusMessage", 0)) {
- db_unset(0, MODULE, "ShowStatusMessage");
+ if (db_get_b(0, MODULENAME, "ShowStatusMessage", 0)) {
+ db_unset(0, MODULENAME, "ShowStatusMessage");
// find end of list
di_node = opt.diList;
@@ -441,31 +441,31 @@ void LoadOptions() opt.iDiCount++;
}
- opt.iLabelValign = db_get_w(0, MODULE, "LabelVAlign", DT_TOP /*DT_VCENTER*/);
- opt.iLabelHalign = db_get_w(0, MODULE, "LabelHAlign", DT_LEFT);
- opt.iValueValign = db_get_w(0, MODULE, "ValueVAlign", DT_TOP /*DT_VCENTER*/);
- opt.iValueHalign = db_get_w(0, MODULE, "ValueHAlign", DT_LEFT);
+ opt.iLabelValign = db_get_w(0, MODULENAME, "LabelVAlign", DT_TOP /*DT_VCENTER*/);
+ opt.iLabelHalign = db_get_w(0, MODULENAME, "LabelHAlign", DT_LEFT);
+ opt.iValueValign = db_get_w(0, MODULENAME, "ValueVAlign", DT_TOP /*DT_VCENTER*/);
+ opt.iValueHalign = db_get_w(0, MODULENAME, "ValueHAlign", DT_LEFT);
// tray tooltip
- opt.bTraytip = db_get_b(0, MODULE, "TrayTip", 1) ? true : false;
- opt.bHandleByTipper = db_get_b(0, MODULE, "ExtendedTrayTip", 1) ? true : false;
- opt.bExpandTraytip = db_get_b(0, MODULE, "ExpandTrayTip", 1) ? true : false;
- opt.bHideOffline = db_get_b(0, MODULE, "HideOffline", 0) ? true : false;
- opt.iExpandTime = db_get_dw(0, MODULE, "ExpandTime", 1000);
- opt.iFirstItems = db_get_dw(0, MODULE, "TrayTipItems", TRAYTIP_NUMCONTACTS | TRAYTIP_LOGON | TRAYTIP_STATUS | TRAYTIP_CLIST_EVENT);
- opt.iSecondItems = db_get_dw(0, MODULE, "TrayTipItemsEx", TRAYTIP_NUMCONTACTS | TRAYTIP_LOGON | TRAYTIP_STATUS | TRAYTIP_STATUS_MSG | TRAYTIP_EXTRA_STATUS | TRAYTIP_MIRANDA_UPTIME | TRAYTIP_CLIST_EVENT);
- opt.iFavoriteContFlags = db_get_dw(0, MODULE, "FavContFlags", FAVCONT_APPEND_PROTO);
+ opt.bTraytip = db_get_b(0, MODULENAME, "TrayTip", 1) ? true : false;
+ opt.bHandleByTipper = db_get_b(0, MODULENAME, "ExtendedTrayTip", 1) ? true : false;
+ opt.bExpandTraytip = db_get_b(0, MODULENAME, "ExpandTrayTip", 1) ? true : false;
+ opt.bHideOffline = db_get_b(0, MODULENAME, "HideOffline", 0) ? true : false;
+ opt.iExpandTime = db_get_dw(0, MODULENAME, "ExpandTime", 1000);
+ opt.iFirstItems = db_get_dw(0, MODULENAME, "TrayTipItems", TRAYTIP_NUMCONTACTS | TRAYTIP_LOGON | TRAYTIP_STATUS | TRAYTIP_CLIST_EVENT);
+ opt.iSecondItems = db_get_dw(0, MODULENAME, "TrayTipItemsEx", TRAYTIP_NUMCONTACTS | TRAYTIP_LOGON | TRAYTIP_STATUS | TRAYTIP_STATUS_MSG | TRAYTIP_EXTRA_STATUS | TRAYTIP_MIRANDA_UPTIME | TRAYTIP_CLIST_EVENT);
+ opt.iFavoriteContFlags = db_get_dw(0, MODULENAME, "FavContFlags", FAVCONT_APPEND_PROTO);
// extra setting
- opt.bWaitForContent = db_get_b(0, MODULE, "WaitForContent", 0) ? true : false;
- opt.bGetNewStatusMsg = db_get_b(0, MODULE, "GetNewStatusMsg", 0) ? true : false;
- opt.bDisableIfInvisible = db_get_b(0, MODULE, "DisableInvisible", 1) ? true : false;
- opt.bRetrieveXstatus = db_get_b(0, MODULE, "RetrieveXStatus", 0) ? true : false;
- opt.bOriginalAvatarSize = db_get_b(0, MODULE, "OriginalAvSize", 0) ? true : false;
- opt.bAvatarBorder = db_get_b(0, MODULE, "AvatarBorder", 0) ? true : false;
- opt.bLimitMsg = db_get_b(0, MODULE, "LimitMsg", 0) ? true : false;
- opt.iLimitCharCount = db_get_b(0, MODULE, "LimitCharCount", 64);
- opt.iSmileyAddFlags = db_get_dw(0, MODULE, "SmileyAddFlags", SMILEYADD_ENABLE);
+ opt.bWaitForContent = db_get_b(0, MODULENAME, "WaitForContent", 0) ? true : false;
+ opt.bGetNewStatusMsg = db_get_b(0, MODULENAME, "GetNewStatusMsg", 0) ? true : false;
+ opt.bDisableIfInvisible = db_get_b(0, MODULENAME, "DisableInvisible", 1) ? true : false;
+ opt.bRetrieveXstatus = db_get_b(0, MODULENAME, "RetrieveXStatus", 0) ? true : false;
+ opt.bOriginalAvatarSize = db_get_b(0, MODULENAME, "OriginalAvSize", 0) ? true : false;
+ opt.bAvatarBorder = db_get_b(0, MODULENAME, "AvatarBorder", 0) ? true : false;
+ opt.bLimitMsg = db_get_b(0, MODULENAME, "LimitMsg", 0) ? true : false;
+ opt.iLimitCharCount = db_get_b(0, MODULENAME, "LimitCharCount", 64);
+ opt.iSmileyAddFlags = db_get_dw(0, MODULENAME, "SmileyAddFlags", SMILEYADD_ENABLE);
DBVARIANT dbv;
// Load the icons order
@@ -474,12 +474,12 @@ void LoadOptions() opt.exIconsVis[i] = 1;
}
- if (!db_get(NULL, MODULE, "IconOrder", &dbv)) {
+ if (!db_get(NULL, MODULENAME, "IconOrder", &dbv)) {
memcpy(opt.exIconsOrder, dbv.pbVal, dbv.cpbVal);
db_free(&dbv);
}
- if (!db_get(NULL, MODULE, "icons_vis", &dbv)) {
+ if (!db_get(NULL, MODULENAME, "icons_vis", &dbv)) {
memcpy(opt.exIconsVis, dbv.pbVal, dbv.cpbVal);
db_free(&dbv);
}
@@ -489,31 +489,31 @@ void LoadOptions() exIcons[i].vis = opt.exIconsVis[i];
}
- opt.iOpacity = db_get_b(0, MODULE, "Opacity", 75);
- opt.bBorder = db_get_b(0, MODULE, "Border", 1) ? true : false;
- opt.bDropShadow = db_get_b(0, MODULE, "DropShadow", 1) ? true : false;
- opt.bRound = db_get_b(0, MODULE, "RoundCorners", 1) ? true : false;
- opt.bAeroGlass = db_get_b(0, MODULE, "AeroGlass", 0) ? true : false;
- opt.showEffect = (PopupShowEffect)db_get_b(0, MODULE, "ShowEffect", (BYTE)PSE_FADE);
- opt.iAnimateSpeed = db_get_b(0, MODULE, "ShowEffectSpeed", 12);
+ opt.iOpacity = db_get_b(0, MODULENAME, "Opacity", 75);
+ opt.bBorder = db_get_b(0, MODULENAME, "Border", 1) ? true : false;
+ opt.bDropShadow = db_get_b(0, MODULENAME, "DropShadow", 1) ? true : false;
+ opt.bRound = db_get_b(0, MODULENAME, "RoundCorners", 1) ? true : false;
+ opt.bAeroGlass = db_get_b(0, MODULENAME, "AeroGlass", 0) ? true : false;
+ opt.showEffect = (PopupShowEffect)db_get_b(0, MODULENAME, "ShowEffect", (BYTE)PSE_FADE);
+ opt.iAnimateSpeed = db_get_b(0, MODULENAME, "ShowEffectSpeed", 12);
if (opt.iAnimateSpeed < 1)
opt.iAnimateSpeed = 1;
else if (opt.iAnimateSpeed > 20)
opt.iAnimateSpeed = 20;
- int iBgImg = db_get_b(0, MODULE, "SBgImage", 0);
- opt.skinMode = (SkinMode)db_get_b(0, MODULE, "SkinEngine", iBgImg ? SM_OBSOLOTE : SM_COLORFILL);
- opt.bLoadFonts = db_get_b(0, MODULE, "LoadFonts", 1) ? true : false;
- opt.bLoadProportions = db_get_b(0, MODULE, "LoadProportions", 1) ? true : false;
- opt.iEnableColoring = db_get_dw(0, MODULE, "EnableColoring", 0);
+ int iBgImg = db_get_b(0, MODULENAME, "SBgImage", 0);
+ opt.skinMode = (SkinMode)db_get_b(0, MODULENAME, "SkinEngine", iBgImg ? SM_OBSOLOTE : SM_COLORFILL);
+ opt.bLoadFonts = db_get_b(0, MODULENAME, "LoadFonts", 1) ? true : false;
+ opt.bLoadProportions = db_get_b(0, MODULENAME, "LoadProportions", 1) ? true : false;
+ opt.iEnableColoring = db_get_dw(0, MODULENAME, "EnableColoring", 0);
opt.szSkinName[0] = 0;
if (opt.skinMode == SM_OBSOLOTE) {
LoadObsoleteSkinSetting();
}
else if (opt.skinMode == SM_IMAGE) {
- if (!db_get_ws(NULL, MODULE, "SkinName", &dbv)) {
+ if (!db_get_ws(NULL, MODULENAME, "SkinName", &dbv)) {
wcsncpy(opt.szSkinName, dbv.ptszVal, _countof(opt.szSkinName) - 1);
db_free(&dbv);
}
@@ -1500,8 +1500,8 @@ INT_PTR CALLBACK DlgProcOptsExtra(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM item.hItem = TreeView_GetNextSibling(GetDlgItem(hwndDlg, IDC_TREE_EXTRAICONS), item.hItem);
i++;
}
- db_set_blob(NULL, MODULE, "IconOrder", opt.exIconsOrder, _countof(opt.exIconsOrder));
- db_set_blob(NULL, MODULE, "icons_vis", opt.exIconsVis, _countof(opt.exIconsVis));
+ db_set_blob(NULL, MODULENAME, "IconOrder", opt.exIconsOrder, _countof(opt.exIconsOrder));
+ db_set_blob(NULL, MODULENAME, "icons_vis", opt.exIconsVis, _countof(opt.exIconsVis));
opt.iSmileyAddFlags = 0;
opt.iSmileyAddFlags |= (IsDlgButtonChecked(hwndDlg, IDC_CHK_ENABLESMILEYS) ? SMILEYADD_ENABLE : 0)
@@ -1516,13 +1516,13 @@ INT_PTR CALLBACK DlgProcOptsExtra(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM opt.bLimitMsg = IsDlgButtonChecked(hwndDlg, IDC_CHK_LIMITMSG) ? true : false;
opt.iLimitCharCount = GetDlgItemInt(hwndDlg, IDC_ED_CHARCOUNT, nullptr, FALSE);
- db_set_dw(0, MODULE, "SmileyAddFlags", opt.iSmileyAddFlags);
- db_set_b(0, MODULE, "WaitForContent", opt.bWaitForContent ? 1 : 0);
- db_set_b(0, MODULE, "GetNewStatusMsg", opt.bGetNewStatusMsg ? 1 : 0);
- db_set_b(0, MODULE, "DisableInvisible", opt.bDisableIfInvisible ? 1 : 0);
- db_set_b(0, MODULE, "RetrieveXStatus", opt.bRetrieveXstatus ? 1 : 0);
- db_set_b(0, MODULE, "LimitMsg", opt.bLimitMsg ? 1 : 0);
- db_set_b(0, MODULE, "LimitCharCount", opt.iLimitCharCount);
+ db_set_dw(0, MODULENAME, "SmileyAddFlags", opt.iSmileyAddFlags);
+ db_set_b(0, MODULENAME, "WaitForContent", opt.bWaitForContent ? 1 : 0);
+ db_set_b(0, MODULENAME, "GetNewStatusMsg", opt.bGetNewStatusMsg ? 1 : 0);
+ db_set_b(0, MODULENAME, "DisableInvisible", opt.bDisableIfInvisible ? 1 : 0);
+ db_set_b(0, MODULENAME, "RetrieveXStatus", opt.bRetrieveXstatus ? 1 : 0);
+ db_set_b(0, MODULENAME, "LimitMsg", opt.bLimitMsg ? 1 : 0);
+ db_set_b(0, MODULENAME, "LimitCharCount", opt.iLimitCharCount);
return TRUE;
}
@@ -1785,8 +1785,8 @@ INT_PTR CALLBACK DlgProcOptsSkin(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l }
}
- db_set_b(0, MODULE, "SkinEngine", opt.skinMode);
- db_set_ws(0, MODULE, "SkinName", opt.szSkinName);
+ db_set_b(0, MODULENAME, "SkinEngine", opt.skinMode);
+ db_set_ws(0, MODULENAME, "SkinName", opt.szSkinName);
DestroySkinBitmap();
SetDlgItemInt(hwndDlg, IDC_ED_TRANS, opt.iOpacity, FALSE);
@@ -1844,7 +1844,7 @@ INT_PTR CALLBACK DlgProcFavouriteContacts(HWND hwndDlg, UINT msg, WPARAM wParam, for (auto &hContact : Contacts()) {
HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, hContact, 0);
- if (hItem && db_get_b(hContact, MODULE, "FavouriteContact", 0))
+ if (hItem && db_get_b(hContact, MODULENAME, "FavouriteContact", 0))
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETCHECKMARK, (WPARAM)hItem, 1);
}
@@ -1863,18 +1863,18 @@ INT_PTR CALLBACK DlgProcFavouriteContacts(HWND hwndDlg, UINT msg, WPARAM wParam, HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, hContact, 0);
if (hItem) {
isChecked = (BYTE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM)hItem, 0);
- db_set_b(hContact, MODULE, "FavouriteContact", isChecked);
+ db_set_b(hContact, MODULENAME, "FavouriteContact", isChecked);
if (isChecked)
count++;
}
}
- db_set_dw(0, MODULE, "FavouriteContactsCount", count);
+ db_set_dw(0, MODULENAME, "FavouriteContactsCount", count);
opt.iFavoriteContFlags = 0;
opt.iFavoriteContFlags |= IsDlgButtonChecked(hwndDlg, IDC_CHK_HIDEOFFLINE) ? FAVCONT_HIDE_OFFLINE : 0
| IsDlgButtonChecked(hwndDlg, IDC_CHK_APPENDPROTO) ? FAVCONT_APPEND_PROTO : 0;
- db_set_dw(0, MODULE, "FavContFlags", opt.iFavoriteContFlags);
+ db_set_dw(0, MODULENAME, "FavContFlags", opt.iFavoriteContFlags);
}
__fallthrough;
@@ -1997,7 +1997,7 @@ INT_PTR CALLBACK DlgProcOptsTraytip(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA item.hItem = TreeView_GetNextSibling(GetDlgItem(hwndDlg, IDC_TREE_FIRST_PROTOS), item.hItem);
}
- db_set_ws(0, MODULE, "TrayProtocols", swzProtos);
+ db_set_ws(0, MODULENAME, "TrayProtocols", swzProtos);
swzProtos[0] = 0;
item.hItem = TreeView_GetRoot(GetDlgItem(hwndDlg, IDC_TREE_SECOND_PROTOS));
@@ -2012,7 +2012,7 @@ INT_PTR CALLBACK DlgProcOptsTraytip(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA item.hItem = TreeView_GetNextSibling(GetDlgItem(hwndDlg, IDC_TREE_SECOND_PROTOS), item.hItem);
}
- db_set_ws(0, MODULE, "TrayProtocolsEx", swzProtos);
+ db_set_ws(0, MODULENAME, "TrayProtocolsEx", swzProtos);
int count = 0;
opt.iFirstItems = 0;
@@ -2046,13 +2046,13 @@ INT_PTR CALLBACK DlgProcOptsTraytip(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA opt.bHideOffline = IsDlgButtonChecked(hwndDlg, IDC_CHK_HIDEOFFLINE) ? true : false;
opt.iExpandTime = max(min(GetDlgItemInt(hwndDlg, IDC_ED_EXPANDTIME, nullptr, FALSE), 5000), 10);
- db_set_b(0, MODULE, "TrayTip", (opt.bTraytip ? 1 : 0));
- db_set_b(0, MODULE, "ExtendedTrayTip", (opt.bHandleByTipper ? 1 : 0));
- db_set_b(0, MODULE, "ExpandTrayTip", (opt.bExpandTraytip ? 1 : 0));
- db_set_b(0, MODULE, "HideOffline", (opt.bHideOffline ? 1 : 0));
- db_set_dw(0, MODULE, "ExpandTime", opt.iExpandTime);
- db_set_dw(0, MODULE, "TrayTipItems", opt.iFirstItems);
- db_set_dw(0, MODULE, "TrayTipItemsEx", opt.iSecondItems);
+ db_set_b(0, MODULENAME, "TrayTip", (opt.bTraytip ? 1 : 0));
+ db_set_b(0, MODULENAME, "ExtendedTrayTip", (opt.bHandleByTipper ? 1 : 0));
+ db_set_b(0, MODULENAME, "ExpandTrayTip", (opt.bExpandTraytip ? 1 : 0));
+ db_set_b(0, MODULENAME, "HideOffline", (opt.bHideOffline ? 1 : 0));
+ db_set_dw(0, MODULENAME, "ExpandTime", opt.iExpandTime);
+ db_set_dw(0, MODULENAME, "TrayTipItems", opt.iFirstItems);
+ db_set_dw(0, MODULENAME, "TrayTipItemsEx", opt.iSecondItems);
return TRUE;
}
break;
diff --git a/plugins/TipperYM/src/popwin.cpp b/plugins/TipperYM/src/popwin.cpp index 59730218ce..716d0098b7 100644 --- a/plugins/TipperYM/src/popwin.cpp +++ b/plugins/TipperYM/src/popwin.cpp @@ -302,7 +302,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa // don't use stored status message if (!opt.bWaitForContent) - db_unset(pwd->hContact, MODULE, "TempStatusMsg"); + db_unset(pwd->hContact, MODULENAME, "TempStatusMsg"); wcsncpy_s(pwd->swzTitle, Clist_GetContactDisplayName(pwd->hContact), _TRUNCATE); @@ -954,7 +954,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa case PUM_SETSTATUSTEXT: if (pwd && wParam == pwd->hContact) { - db_set_ws(pwd->hContact, MODULE, "TempStatusMsg", (wchar_t *)lParam); + db_set_ws(pwd->hContact, MODULENAME, "TempStatusMsg", (wchar_t *)lParam); pwd->bIsPainted = false; pwd->bNeedRefresh = true; SendMessage(hwnd, PUM_REFRESH_VALUES, TRUE, 0); @@ -1579,14 +1579,14 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa } if (dwItems & TRAYTIP_FAVCONTACTS) { - if (db_get_dw(0, MODULE, "FavouriteContactsCount", 0)) { + if (db_get_dw(0, MODULENAME, "FavouriteContactsCount", 0)) { wchar_t swzName[256]; wchar_t swzStatus[256]; bool bTitlePainted = false; int iCount = 0, iCountOnline = 0; for (auto &hContact : Contacts()) { - if (db_get_b(hContact, MODULE, "FavouriteContact", 0)) { + if (db_get_b(hContact, MODULENAME, "FavouriteContact", 0)) { char *proto = GetContactProto(hContact); if (proto == nullptr) continue; @@ -1633,7 +1633,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa } if (dwItems & TRAYTIP_MIRANDA_UPTIME) { - if (TimestampToTimeDifference(NULL, MODULE, "MirandaStartTS", buff, 64)) { + if (TimestampToTimeDifference(NULL, MODULENAME, "MirandaStartTS", buff, 64)) { AddRow(pwd, TranslateT("Other"), L"", nullptr, false, false, !bFirstItem, true, nullptr); AddRow(pwd, TranslateT("Miranda uptime:"), buff, nullptr, false, false, false); } diff --git a/plugins/TipperYM/src/popwin.h b/plugins/TipperYM/src/popwin.h index d63ca07b33..1721111b16 100644 --- a/plugins/TipperYM/src/popwin.h +++ b/plugins/TipperYM/src/popwin.h @@ -21,7 +21,7 @@ Boston, MA 02111-1307, USA. #ifndef _POPWIN_INC
#define _POPWIN_INC
-#define POP_WIN_CLASS _T(MODULE) L"MimTTClass"
+#define POP_WIN_CLASS _T(MODULENAME) L"MimTTClass"
#define PUM_GETHEIGHT (WM_USER + 0x020)
#define PUM_CALCPOS (WM_USER + 0x021)
diff --git a/plugins/TipperYM/src/skin_parser.cpp b/plugins/TipperYM/src/skin_parser.cpp index 403ae81ac7..485a46609e 100644 --- a/plugins/TipperYM/src/skin_parser.cpp +++ b/plugins/TipperYM/src/skin_parser.cpp @@ -209,7 +209,7 @@ void ParseFontPart(FILE *fp, wchar_t *buff) if (mir_wstrlen(pch) > 32)
pch[32] = 0;
- db_set_ws(0, MODULE, szSetting, pch);
+ db_set_ws(0, MODULENAME, szSetting, pch);
}
}
else if (wcsstr(buff, L"color"))
@@ -226,7 +226,7 @@ void ParseFontPart(FILE *fp, wchar_t *buff) {
BYTE b = _wtoi(pch);
COLORREF color = RGB(r, g ,b);
- db_set_dw(0, MODULE, szSetting, color);
+ db_set_dw(0, MODULENAME, szSetting, color);
}
}
}
@@ -237,7 +237,7 @@ void ParseFontPart(FILE *fp, wchar_t *buff) {
HDC hdc = GetDC(nullptr);
int size = -MulDiv(_wtoi(pch), GetDeviceCaps(hdc, LOGPIXELSY), 72);
- db_set_b(0, MODULE, szSetting, (BYTE)size);
+ db_set_b(0, MODULENAME, szSetting, (BYTE)size);
ReleaseDC(nullptr, hdc);
}
}
@@ -253,7 +253,7 @@ void ParseFontPart(FILE *fp, wchar_t *buff) if (wcsstr(pch, L"font_underline"))
effect |= DBFONTF_UNDERLINE;
- db_set_b(0, MODULE, szSetting, effect);
+ db_set_b(0, MODULENAME, szSetting, effect);
}
}
}
diff --git a/plugins/TipperYM/src/stdafx.h b/plugins/TipperYM/src/stdafx.h index d338ff81cc..68817c16cf 100644 --- a/plugins/TipperYM/src/stdafx.h +++ b/plugins/TipperYM/src/stdafx.h @@ -69,15 +69,13 @@ Boston, MA 02111-1307, USA. #include "preset_items.h"
#include "translations.h"
-#define MODULE "Tipper"
+#define MODULENAME "Tipper"
#define MODULE_ITEMS "Tipper_Items"
#define DEFAULT_SKIN_FOLDER L"Skins\\Tipper"
struct CMPlugin : public PLUGIN<CMPlugin>
{
- CMPlugin() :
- PLUGIN<CMPlugin>(MODULE)
- {}
+ CMPlugin();
};
extern HFONT hFontTitle, hFontLabels, hFontValues, hFontTrayTitle;
diff --git a/plugins/TipperYM/src/subst.cpp b/plugins/TipperYM/src/subst.cpp index c2be17ac88..2e6fd15826 100644 --- a/plugins/TipperYM/src/subst.cpp +++ b/plugins/TipperYM/src/subst.cpp @@ -78,7 +78,7 @@ bool CheckContactType(MCONTACT hContact, const DISPLAYITEM &di) void StripBBCodesInPlace(wchar_t *ptszText) { - if (!db_get_b(0, MODULE, "StripBBCodes", 1)) + if (!db_get_b(0, MODULENAME, "StripBBCodes", 1)) return; if (ptszText == nullptr) @@ -220,7 +220,7 @@ wchar_t* GetStatusMessageText(MCONTACT hContact) if (wStatus == ID_STATUS_OFFLINE) return nullptr; - if (!db_get_ws(hContact, MODULE, "TempStatusMsg", &dbv)) { + if (!db_get_ws(hContact, MODULENAME, "TempStatusMsg", &dbv)) { if (mir_wstrlen(dbv.ptszVal) != 0) swzMsg = mir_wstrdup(dbv.ptszVal); db_free(&dbv); @@ -365,17 +365,17 @@ bool GetSysSubstText(MCONTACT hContact, wchar_t *swzRawSpec, wchar_t *buff, int for (int i = 0; i < iNumber; i++) { if (i > 0) hTmpContact = db_mc_getSub(hContact, i); - dwRecountTs = db_get_dw(hTmpContact, MODULE, "LastCountTS", 0); + dwRecountTs = db_get_dw(hTmpContact, MODULENAME, "LastCountTS", 0); dwTime = (DWORD)time(0); dwDiff = (dwTime - dwRecountTs); if (dwDiff > (60 * 60 * 24 * 3)) { - db_set_dw(hTmpContact, MODULE, "LastCountTS", dwTime); + db_set_dw(hTmpContact, MODULENAME, "LastCountTS", dwTime); dwCountOut = dwCountIn = dwLastTs = 0; } else { - dwCountOut = db_get_dw(hTmpContact, MODULE, "MsgCountOut", 0); - dwCountIn = db_get_dw(hTmpContact, MODULE, "MsgCountIn", 0); - dwLastTs = db_get_dw(hTmpContact, MODULE, "LastMsgTS", 0); + dwCountOut = db_get_dw(hTmpContact, MODULENAME, "MsgCountOut", 0); + dwCountIn = db_get_dw(hTmpContact, MODULENAME, "MsgCountIn", 0); + dwLastTs = db_get_dw(hTmpContact, MODULENAME, "LastMsgTS", 0); } dwNewTs = dwLastTs; @@ -397,9 +397,9 @@ bool GetSysSubstText(MCONTACT hContact, wchar_t *swzRawSpec, wchar_t *buff, int } if (dwNewTs > dwLastTs) { - db_set_dw(hTmpContact, MODULE, "MsgCountOut", dwCountOut); - db_set_dw(hTmpContact, MODULE, "MsgCountIn", dwCountIn); - db_set_dw(hTmpContact, MODULE, "LastMsgTS", dwNewTs); + db_set_dw(hTmpContact, MODULENAME, "MsgCountOut", dwCountOut); + db_set_dw(hTmpContact, MODULENAME, "MsgCountIn", dwCountIn); + db_set_dw(hTmpContact, MODULENAME, "LastMsgTS", dwNewTs); } dwMetaCountOut += dwCountOut; diff --git a/plugins/TipperYM/src/tipper.cpp b/plugins/TipperYM/src/tipper.cpp index 75f0282409..380b4879e2 100644 --- a/plugins/TipperYM/src/tipper.cpp +++ b/plugins/TipperYM/src/tipper.cpp @@ -52,6 +52,10 @@ PLUGININFOEX pluginInfoEx = {0x8392df1d, 0x9090, 0x4f8e, {0x9d, 0xf6, 0x2f, 0xe0, 0x58, 0xed, 0xd8, 0x00}}
};
+CMPlugin::CMPlugin() :
+ PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
+{}
+
extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
{
return &pluginInfoEx;
@@ -106,7 +110,7 @@ static int EventDeleted(WPARAM wParam, LPARAM lParam) DBEVENTINFO dbei = {};
if (!db_event_get(lParam, &dbei))
if (dbei.eventType == EVENTTYPE_MESSAGE)
- db_unset(wParam, MODULE, "LastCountTS");
+ db_unset(wParam, MODULENAME, "LastCountTS");
return 0;
}
@@ -122,7 +126,7 @@ static void InitFonts() colourBg.cbSize = sizeof(ColourIDW);
mir_wstrcpy(colourBg.group, LPGENW("Tooltips"));
mir_wstrcpy(colourBg.name, LPGENW("Background"));
- mir_strcpy(colourBg.dbSettingsGroup, MODULE);
+ mir_strcpy(colourBg.dbSettingsGroup, MODULENAME);
mir_strcpy(colourBg.setting, "ColourBg");
colourBg.defcolour = RGB(219, 219, 219);
colourBg.order = 0;
@@ -131,7 +135,7 @@ static void InitFonts() colourBorder.cbSize = sizeof(ColourIDW);
mir_wstrcpy(colourBorder.group, LPGENW("Tooltips"));
mir_wstrcpy(colourBorder.name, LPGENW("Border"));
- mir_strcpy(colourBorder.dbSettingsGroup, MODULE);
+ mir_strcpy(colourBorder.dbSettingsGroup, MODULENAME);
mir_strcpy(colourBorder.setting, "BorderCol");
colourBorder.defcolour = 0;
colourBorder.order = 0;
@@ -140,7 +144,7 @@ static void InitFonts() colourAvatarBorder.cbSize = sizeof(ColourIDW);
mir_wstrcpy(colourAvatarBorder.group, LPGENW("Tooltips"));
mir_wstrcpy(colourAvatarBorder.name, LPGENW("Avatar border"));
- mir_strcpy(colourAvatarBorder.dbSettingsGroup, MODULE);
+ mir_strcpy(colourAvatarBorder.dbSettingsGroup, MODULENAME);
mir_strcpy(colourAvatarBorder.setting, "AvBorderCol");
colourAvatarBorder.defcolour = 0;
colourAvatarBorder.order = 0;
@@ -149,7 +153,7 @@ static void InitFonts() colourDivider.cbSize = sizeof(ColourIDW);
mir_wstrcpy(colourDivider.group, LPGENW("Tooltips"));
mir_wstrcpy(colourDivider.name, LPGENW("Dividers"));
- mir_strcpy(colourDivider.dbSettingsGroup, MODULE);
+ mir_strcpy(colourDivider.dbSettingsGroup, MODULENAME);
mir_strcpy(colourDivider.setting, "DividerCol");
colourDivider.defcolour = 0;
colourDivider.order = 0;
@@ -158,7 +162,7 @@ static void InitFonts() colourSidebar.cbSize = sizeof(ColourIDW);
mir_wstrcpy(colourSidebar.group, LPGENW("Tooltips"));
mir_wstrcpy(colourSidebar.name, LPGENW("Sidebar"));
- mir_strcpy(colourSidebar.dbSettingsGroup, MODULE);
+ mir_strcpy(colourSidebar.dbSettingsGroup, MODULENAME);
mir_strcpy(colourSidebar.setting, "SidebarCol");
colourSidebar.defcolour = RGB(192, 192, 192);
colourSidebar.order = 0;
@@ -168,7 +172,7 @@ static void InitFonts() fontTitle.flags = FIDF_ALLOWEFFECTS;
mir_wstrcpy(fontTitle.group, LPGENW("Tooltips"));
mir_wstrcpy(fontTitle.name, LPGENW("Title"));
- mir_strcpy(fontTitle.dbSettingsGroup, MODULE);
+ mir_strcpy(fontTitle.dbSettingsGroup, MODULENAME);
mir_strcpy(fontTitle.prefix, "FontFirst");
mir_wstrcpy(fontTitle.backgroundGroup, LPGENW("Tooltips"));
mir_wstrcpy(fontTitle.backgroundName, LPGENW("Background"));
@@ -184,7 +188,7 @@ static void InitFonts() fontLabels.flags = FIDF_ALLOWEFFECTS;
mir_wstrcpy(fontLabels.group, LPGENW("Tooltips"));
mir_wstrcpy(fontLabels.name, LPGENW("Labels"));
- mir_strcpy(fontLabels.dbSettingsGroup, MODULE);
+ mir_strcpy(fontLabels.dbSettingsGroup, MODULENAME);
mir_strcpy(fontLabels.prefix, "FontLabels");
mir_wstrcpy(fontLabels.backgroundGroup, LPGENW("Tooltips"));
mir_wstrcpy(fontLabels.backgroundName, LPGENW("Background"));
@@ -200,7 +204,7 @@ static void InitFonts() fontValues.flags = FIDF_ALLOWEFFECTS;
mir_wstrcpy(fontValues.group, LPGENW("Tooltips"));
mir_wstrcpy(fontValues.name, LPGENW("Values"));
- mir_strcpy(fontValues.dbSettingsGroup, MODULE);
+ mir_strcpy(fontValues.dbSettingsGroup, MODULENAME);
mir_strcpy(fontValues.prefix, "FontValues");
mir_wstrcpy(fontValues.backgroundGroup, LPGENW("Tooltips"));
mir_wstrcpy(fontValues.backgroundName, LPGENW("Background"));
@@ -216,7 +220,7 @@ static void InitFonts() fontTrayTitle.flags = FIDF_ALLOWEFFECTS;
mir_wstrcpy(fontTrayTitle.group, LPGENW("Tooltips"));
mir_wstrcpy(fontTrayTitle.name, LPGENW("Tray title"));
- mir_strcpy(fontTrayTitle.dbSettingsGroup, MODULE);
+ mir_strcpy(fontTrayTitle.dbSettingsGroup, MODULENAME);
mir_strcpy(fontTrayTitle.prefix, "FontTrayTitle");
mir_wstrcpy(fontTrayTitle.backgroundGroup, LPGENW("Tooltips"));
mir_wstrcpy(fontTrayTitle.backgroundName, LPGENW("Background"));
@@ -262,7 +266,7 @@ static int ModulesLoaded(WPARAM, LPARAM) CallService(MS_CLC_SETINFOTIPHOVERTIME, opt.iTimeIn, 0);
// set Miranda start timestamp
- db_set_dw(0, MODULE, "MirandaStartTS", (DWORD)time(0));
+ db_set_dw(0, MODULENAME, "MirandaStartTS", (DWORD)time(0));
return 0;
}
@@ -295,8 +299,8 @@ static INT_PTR ReloadSkin(WPARAM wParam, LPARAM lParam) ReloadFont(0, 0);
SaveOptions();
- db_set_b(0, MODULE, "SkinEngine", opt.skinMode);
- db_set_ws(0, MODULE, "SkinName", opt.szSkinName);
+ db_set_b(0, MODULENAME, "SkinEngine", opt.skinMode);
+ db_set_ws(0, MODULENAME, "SkinName", opt.szSkinName);
DestroySkinBitmap();
@@ -323,7 +327,7 @@ extern "C" int __declspec(dllexport) Load(void) iCodePage = Langpack_GetDefaultCodePage();
- g_plugin.registerIcon(MODULE, iconList, MODULE);
+ g_plugin.registerIcon(MODULENAME, iconList, MODULENAME);
InitTranslations();
InitMessagePump();
|