summaryrefslogtreecommitdiff
path: root/plugins/Popup
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Popup')
-rw-r--r--plugins/Popup/src/actions.cpp8
-rw-r--r--plugins/Popup/src/common.h2
-rw-r--r--plugins/Popup/src/config.cpp2
-rw-r--r--plugins/Popup/src/font.cpp4
-rw-r--r--plugins/Popup/src/headers.h2
-rw-r--r--plugins/Popup/src/history.cpp2
-rw-r--r--plugins/Popup/src/main.cpp6
-rw-r--r--plugins/Popup/src/notifications.cpp16
-rw-r--r--plugins/Popup/src/opt_adv.cpp38
-rw-r--r--plugins/Popup/src/opt_class.cpp16
-rw-r--r--plugins/Popup/src/opt_gen.cpp30
-rw-r--r--plugins/Popup/src/opt_skins.cpp4
-rw-r--r--plugins/Popup/src/services.cpp8
-rw-r--r--plugins/Popup/src/skin.cpp2
14 files changed, 70 insertions, 70 deletions
diff --git a/plugins/Popup/src/actions.cpp b/plugins/Popup/src/actions.cpp
index 1affca7df3..09f8b3d6fd 100644
--- a/plugins/Popup/src/actions.cpp
+++ b/plugins/Popup/src/actions.cpp
@@ -148,13 +148,13 @@ DWORD MouseOverride(HWND hCombo, int number)
void LoadOption_Actions() {
- PopUpOptions.actions = DBGetContactSettingDword(NULL, MODULNAME, "Actions",
+ PopUpOptions.actions = db_get_dw(NULL, MODULNAME, "Actions",
ACT_ENABLE|ACT_RIGHTICONS|ACT_DEF_KEEPWND|ACT_DEF_IMONLY|
ACT_DEF_NOGLOBAL|ACT_DEF_MESSAGE|ACT_DEF_DETAILS|ACT_DEF_MENU|
ACT_DEF_ADD|ACT_DEF_DISMISS|ACT_DEF_PIN);
- PopUpOptions.overrideLeft = DBGetContactSettingDword(NULL,MODULNAME, "OverrideLeft", 0);
- PopUpOptions.overrideMiddle = DBGetContactSettingDword(NULL,MODULNAME, "OverrideMiddle", 0);
- PopUpOptions.overrideRight = DBGetContactSettingDword(NULL,MODULNAME, "OverrideRight", 0);
+ PopUpOptions.overrideLeft = db_get_dw(NULL,MODULNAME, "OverrideLeft", 0);
+ PopUpOptions.overrideMiddle = db_get_dw(NULL,MODULNAME, "OverrideMiddle", 0);
+ PopUpOptions.overrideRight = db_get_dw(NULL,MODULNAME, "OverrideRight", 0);
}
static UINT controls[] =
diff --git a/plugins/Popup/src/common.h b/plugins/Popup/src/common.h
index 3bce58077f..6ad87ea594 100644
--- a/plugins/Popup/src/common.h
+++ b/plugins/Popup/src/common.h
@@ -51,7 +51,7 @@ inline int Byte2Percentile(int vByte) { return (vByte*100)/255; }
inline int Percentile2Byte(int vPerc) { return (vPerc*255)/100; }
//===== Strings & MirandaDB ==================
-inline char *DBGetContactSettingString(HANDLE hContact, const char *ModuleName, const char *SettingName, const char *Default)
+inline char *db_get_s(HANDLE hContact, const char *ModuleName, const char *SettingName, const char *Default)
{
DBVARIANT dbv;
DBCONTACTGETSETTING dbcgs;
diff --git a/plugins/Popup/src/config.cpp b/plugins/Popup/src/config.cpp
index d4c88ff200..811bead19a 100644
--- a/plugins/Popup/src/config.cpp
+++ b/plugins/Popup/src/config.cpp
@@ -108,7 +108,7 @@ void PopUpPreview()
for (HANDLE hContact = db_find_first(); hContact;
hContact = db_find_next(hContact))
{
- if (DBGetContactSettingDword(hContact, "ICQ", "UIN", 0) == 256771455)
+ if (db_get_dw(hContact, "ICQ", "UIN", 0) == 256771455)
{
ppd.lchContact = hContact;
break;
diff --git a/plugins/Popup/src/font.cpp b/plugins/Popup/src/font.cpp
index 723c3f29bd..fca4c1cf12 100644
--- a/plugins/Popup/src/font.cpp
+++ b/plugins/Popup/src/font.cpp
@@ -136,10 +136,10 @@ void ReloadFonts()
if (gTreeData[i]->typ == 2) {
mir_snprintf(setting, 256, "%s/TextCol", gTreeData[i]->pupClass.pszName);
gTreeData[i]->colorText = gTreeData[i]->pupClass.colorText =
- (COLORREF)DBGetContactSettingDword(0, PU_MODULCLASS, setting, (DWORD)fonts.clText);
+ (COLORREF)db_get_dw(0, PU_MODULCLASS, setting, (DWORD)fonts.clText);
mir_snprintf(setting, 256, "%s/BgCol", gTreeData[i]->pupClass.pszName);
gTreeData[i]->colorBack = gTreeData[i]->pupClass.colorBack =
- (COLORREF)DBGetContactSettingDword(0, PU_MODULCLASS, setting, (DWORD)fonts.clBack/*pc->colorBack*/);
+ (COLORREF)db_get_dw(0, PU_MODULCLASS, setting, (DWORD)fonts.clBack/*pc->colorBack*/);
}
}
}
diff --git a/plugins/Popup/src/headers.h b/plugins/Popup/src/headers.h
index 593389b765..d10e2cd9ca 100644
--- a/plugins/Popup/src/headers.h
+++ b/plugins/Popup/src/headers.h
@@ -69,7 +69,7 @@ http://miranda-ng.org/distr/
#include <m_skin.h>
#include <m_langpack.h>
#include <m_database.h>
-#undef DBGetContactSettingString
+#undef db_get_s
#include <m_protosvc.h>
#include <m_button.h>
#include <m_message.h>
diff --git a/plugins/Popup/src/history.cpp b/plugins/Popup/src/history.cpp
index b5620c99d3..a44af22401 100644
--- a/plugins/Popup/src/history.cpp
+++ b/plugins/Popup/src/history.cpp
@@ -57,7 +57,7 @@ void PopupHistoryResize()
void PopupHistoryLoad()
{
InitializeCriticalSection(&csPopupHistory);
- popupHistoryBuffer = DBGetContactSettingWord(NULL, MODULNAME, "HistorySize", SETTING_HISTORYSIZE_DEFAULT);
+ popupHistoryBuffer = db_get_w(NULL, MODULNAME, "HistorySize", SETTING_HISTORYSIZE_DEFAULT);
}
void PopupHistoryUnload()
diff --git a/plugins/Popup/src/main.cpp b/plugins/Popup/src/main.cpp
index 2c5e60743b..5ccb4ac13d 100644
--- a/plugins/Popup/src/main.cpp
+++ b/plugins/Popup/src/main.cpp
@@ -370,9 +370,9 @@ MIRAPI int Load(void)
// Register in DBEditor++
DBVARIANT dbv;
- if (DBGetContactSetting(NULL, "KnownModules", MODULNAME, &dbv))
- DBWriteContactSettingString(NULL, "KnownModules", pluginInfoEx.shortName, MODULNAME);
- DBFreeVariant(&dbv);
+ if (db_get(NULL, "KnownModules", MODULNAME, &dbv))
+ db_set_s(NULL, "KnownModules", pluginInfoEx.shortName, MODULNAME);
+ db_free(&dbv);
HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded);
HookEvent(ME_OPT_INITIALISE, OptionsInitialize);
diff --git a/plugins/Popup/src/notifications.cpp b/plugins/Popup/src/notifications.cpp
index 40b971e160..e9c70d8c79 100644
--- a/plugins/Popup/src/notifications.cpp
+++ b/plugins/Popup/src/notifications.cpp
@@ -97,7 +97,7 @@ void SaveNotificationSettings(POPUPTREEDATA *ptd, char* szModul)
mir_snprintf(setting, sizeof(setting), "{%s/%s}Timeout",
ptd->notification.lpzGroup,
ptd->notification.lpzName);
- DBWriteContactSettingWord(NULL, szModul, setting, ptd->notification.iSeconds);
+ db_set_w(NULL, szModul, setting, ptd->notification.iSeconds);
mir_snprintf(setting, sizeof(setting), "{%s/%s}enabled",
ptd->notification.lpzGroup,
@@ -107,7 +107,7 @@ void SaveNotificationSettings(POPUPTREEDATA *ptd, char* szModul)
mir_snprintf(setting, sizeof(setting), "{%s/%s}TimeoutVal",
ptd->notification.lpzGroup,
ptd->notification.lpzName);
- DBWriteContactSettingWord(NULL, szModul, setting, ptd->timeoutValue);
+ db_set_w(NULL, szModul, setting, ptd->timeoutValue);
mir_snprintf(setting, sizeof(setting), "{%s/%s}disableWhen",
ptd->notification.lpzGroup,
@@ -117,12 +117,12 @@ void SaveNotificationSettings(POPUPTREEDATA *ptd, char* szModul)
mir_snprintf(setting, sizeof(setting), "{%s/%s}leftAction",
ptd->notification.lpzGroup,
ptd->notification.lpzName);
- DBWriteContactSettingString(NULL, szModul, setting, ptd->leftAction);
+ db_set_s(NULL, szModul, setting, ptd->leftAction);
mir_snprintf(setting, sizeof(setting), "{%s/%s}rightAction",
ptd->notification.lpzGroup,
ptd->notification.lpzName);
- DBWriteContactSettingString(NULL, szModul, setting, ptd->rightAction);
+ db_set_s(NULL, szModul, setting, ptd->rightAction);
for (int i=0; i < ptd->notification.actionCount; ++i)
{
@@ -158,11 +158,11 @@ void LoadNotificationSettings(POPUPTREEDATA *ptd, char* szModul)
mir_snprintf(setting, sizeof(setting), "{%s/%s}Timeout", ptd->notification.lpzGroup, ptd->notification.lpzName);
ptd->notification.iSeconds =
- (signed char)DBGetContactSettingWord(NULL, szModul, setting, ptd->notification.iSeconds);
+ (signed char)db_get_w(NULL, szModul, setting, ptd->notification.iSeconds);
mir_snprintf(setting, sizeof(setting), "{%s/%s}TimeoutVal", ptd->notification.lpzGroup, ptd->notification.lpzName);
ptd->timeoutValue =
- (signed char)DBGetContactSettingWord(NULL, szModul, setting,
+ (signed char)db_get_w(NULL, szModul, setting,
ptd->notification.iSeconds ? ptd->notification.iSeconds : 0);
mir_snprintf(setting, sizeof(setting), "{%s/%s}disableWhen", ptd->notification.lpzGroup, ptd->notification.lpzName);
@@ -170,12 +170,12 @@ void LoadNotificationSettings(POPUPTREEDATA *ptd, char* szModul)
db_get_b(NULL, szModul, setting, 0);
mir_snprintf(setting, sizeof(setting), "{%s/%s}leftAction", ptd->notification.lpzGroup, ptd->notification.lpzName);
- szTmp = DBGetContactSettingString(NULL, szModul, setting, ptd->notification.lpzLAction);
+ szTmp = db_get_s(NULL, szModul, setting, ptd->notification.lpzLAction);
lstrcpynA(ptd->leftAction, szTmp, sizeof(ptd->leftAction));
mir_free(szTmp); szTmp = NULL;
mir_snprintf(setting, sizeof(setting), "{%s/%s}rightAction", ptd->notification.lpzGroup, ptd->notification.lpzName);
- szTmp = DBGetContactSettingString(NULL, szModul, setting, ptd->notification.lpzRAction);
+ szTmp = db_get_s(NULL, szModul, setting, ptd->notification.lpzRAction);
lstrcpynA(ptd->rightAction, szTmp, sizeof(ptd->rightAction));
mir_free(szTmp); szTmp = NULL;
}
diff --git a/plugins/Popup/src/opt_adv.cpp b/plugins/Popup/src/opt_adv.cpp
index bc2c5db587..3c7e4ce579 100644
--- a/plugins/Popup/src/opt_adv.cpp
+++ b/plugins/Popup/src/opt_adv.cpp
@@ -44,13 +44,13 @@ void OptAdv_UnregisterVfx() {
void LoadOption_AdvOpts() {
//History
PopUpOptions.EnableHistory = db_get_b (NULL,MODULNAME, "EnableHistory", TRUE);
- PopUpOptions.HistorySize = DBGetContactSettingWord (NULL,MODULNAME, "HistorySize", SETTING_HISTORYSIZE_DEFAULT);
+ PopUpOptions.HistorySize = db_get_w (NULL,MODULNAME, "HistorySize", SETTING_HISTORYSIZE_DEFAULT);
PopUpOptions.UseHppHistoryLog = db_get_b (NULL,MODULNAME, "UseHppHistoryLog", TRUE);
//Avatars
PopUpOptions.avatarBorders = db_get_b (NULL,MODULNAME, "AvatarBorders", TRUE);
PopUpOptions.avatarPNGBorders = db_get_b (NULL,MODULNAME, "AvatarPNGBorders", FALSE);
PopUpOptions.avatarRadius = db_get_b (NULL,MODULNAME, "AvatarRadius", 2);
- PopUpOptions.avatarSize = DBGetContactSettingWord (NULL,MODULNAME, "AvatarSize", SETTING_AVTSIZE_DEFAULT);
+ PopUpOptions.avatarSize = db_get_w (NULL,MODULNAME, "AvatarSize", SETTING_AVTSIZE_DEFAULT);
PopUpOptions.EnableAvatarUpdates = db_get_b (NULL,MODULNAME, "EnableAvatarUpdates", FALSE);
//Monitor
PopUpOptions.Monitor = db_get_b (NULL,MODULNAME, "Monitor", SETTING_MONITOR_DEFAULT);
@@ -63,10 +63,10 @@ void LoadOption_AdvOpts() {
PopUpOptions.UseAnimations = db_get_b (NULL,MODULNAME, "UseAnimations", TRUE);
PopUpOptions.UseEffect = db_get_b (NULL,MODULNAME, "Fade", TRUE);
PopUpOptions.Effect = (LPTSTR)DBGetContactSettingStringX(NULL,MODULNAME, "Effect", "", DBVT_TCHAR);
- PopUpOptions.FadeIn = DBGetContactSettingDword(NULL,MODULNAME, "FadeInTime", SETTING_FADEINTIME_DEFAULT);
- PopUpOptions.FadeOut = DBGetContactSettingDword(NULL,MODULNAME, "FadeOutTime",SETTING_FADEOUTTIME_DEFAULT);
+ PopUpOptions.FadeIn = db_get_dw(NULL,MODULNAME, "FadeInTime", SETTING_FADEINTIME_DEFAULT);
+ PopUpOptions.FadeOut = db_get_dw(NULL,MODULNAME, "FadeOutTime",SETTING_FADEOUTTIME_DEFAULT);
//other old stuff
- PopUpOptions.MaxPopups = DBGetContactSettingWord (NULL,MODULNAME, "MaxPopups", 20);
+ PopUpOptions.MaxPopups = db_get_w (NULL,MODULNAME, "MaxPopups", 20);
}
INT_PTR CALLBACK DlgProcPopUpAdvOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) {
@@ -527,31 +527,31 @@ INT_PTR CALLBACK DlgProcPopUpAdvOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
{
//History
db_set_b (NULL,MODULNAME, "EnableHistory", (BYTE)PopUpOptions.EnableHistory);
- DBWriteContactSettingWord (NULL,MODULNAME, "HistorySize", PopUpOptions.HistorySize);
+ db_set_w(NULL,MODULNAME, "HistorySize", PopUpOptions.HistorySize);
PopupHistoryResize();
- db_set_b (NULL,MODULNAME, "UseHppHistoryLog", PopUpOptions.UseHppHistoryLog);
+ db_set_b(NULL,MODULNAME, "UseHppHistoryLog", PopUpOptions.UseHppHistoryLog);
//Avatars
- db_set_b (NULL,MODULNAME, "AvatarBorders", PopUpOptions.avatarBorders);
- db_set_b (NULL,MODULNAME, "AvatarPNGBorders", PopUpOptions.avatarPNGBorders);
- db_set_b (NULL,MODULNAME, "AvatarRadius", PopUpOptions.avatarRadius);
- DBWriteContactSettingWord (NULL,MODULNAME, "AvatarSize", PopUpOptions.avatarSize);
- db_set_b (NULL,MODULNAME, "EnableAvatarUpdates", PopUpOptions.EnableAvatarUpdates);
+ db_set_b(NULL,MODULNAME, "AvatarBorders", PopUpOptions.avatarBorders);
+ db_set_b(NULL,MODULNAME, "AvatarPNGBorders", PopUpOptions.avatarPNGBorders);
+ db_set_b(NULL,MODULNAME, "AvatarRadius", PopUpOptions.avatarRadius);
+ db_set_w(NULL,MODULNAME, "AvatarSize", PopUpOptions.avatarSize);
+ db_set_b(NULL,MODULNAME, "EnableAvatarUpdates", PopUpOptions.EnableAvatarUpdates);
//Monitor
- db_set_b (NULL,MODULNAME, "Monitor", PopUpOptions.Monitor);
+ db_set_b(NULL,MODULNAME, "Monitor", PopUpOptions.Monitor);
//Transparency
- db_set_b (NULL,MODULNAME, "EnableRegionTransparency", PopUpOptions.Enable9xTransparency);
- db_set_b (NULL,MODULNAME, "UseTransparency", PopUpOptions.UseTransparency);
- db_set_b (NULL,MODULNAME, "Alpha", PopUpOptions.Alpha);
- db_set_b (NULL,MODULNAME, "OpaqueOnHover", PopUpOptions.OpaqueOnHover);
+ db_set_b(NULL,MODULNAME, "EnableRegionTransparency", PopUpOptions.Enable9xTransparency);
+ db_set_b(NULL,MODULNAME, "UseTransparency", PopUpOptions.UseTransparency);
+ db_set_b(NULL,MODULNAME, "Alpha", PopUpOptions.Alpha);
+ db_set_b(NULL,MODULNAME, "OpaqueOnHover", PopUpOptions.OpaqueOnHover);
//Effects
db_set_b (NULL,MODULNAME, "UseAnimations", PopUpOptions.UseAnimations);
db_set_b (NULL,MODULNAME, "Fade", PopUpOptions.UseEffect);
- DBWriteContactSettingTString(NULL, MODULNAME, "Effect", PopUpOptions.Effect);
+ db_set_ts(NULL, MODULNAME, "Effect", PopUpOptions.Effect);
db_set_dw(NULL,MODULNAME, "FadeInTime", PopUpOptions.FadeIn);
db_set_dw(NULL,MODULNAME, "FadeOutTime", PopUpOptions.FadeOut);
//other old stuff
- DBWriteContactSettingWord (NULL,MODULNAME, "MaxPopups", (BYTE)PopUpOptions.MaxPopups);
+ db_set_w(NULL,MODULNAME, "MaxPopups", (BYTE)PopUpOptions.MaxPopups);
}
return TRUE;
default:
diff --git a/plugins/Popup/src/opt_class.cpp b/plugins/Popup/src/opt_class.cpp
index eb4978b1d6..d39877f8b8 100644
--- a/plugins/Popup/src/opt_class.cpp
+++ b/plugins/Popup/src/opt_class.cpp
@@ -504,20 +504,20 @@ void LoadClassSettings(POPUPTREEDATA *ptd, char* szModul)
mir_snprintf(setting, sizeof(setting), "%s/Timeout", ptd->pupClass.pszName);
ptd->pupClass.iSeconds =
- (signed char)DBGetContactSettingWord(NULL, szModul, setting, 0);
+ (signed char)db_get_w(NULL, szModul, setting, 0);
mir_snprintf(setting, sizeof(setting), "%s/TimeoutVal", ptd->pupClass.pszName);
ptd->timeoutValue =
- (signed char)DBGetContactSettingWord(NULL, szModul, setting,
+ (signed char)db_get_w(NULL, szModul, setting,
ptd->pupClass.iSeconds ? ptd->pupClass.iSeconds : PopUpOptions.Seconds);
mir_snprintf(setting, sizeof(setting), "%s/leftAction", ptd->pupClass.pszName);
- szTmp = DBGetContactSettingString(NULL, szModul, setting, POPUP_ACTION_NOTHING); //standart ??
+ szTmp = db_get_s(NULL, szModul, setting, POPUP_ACTION_NOTHING); //standart ??
lstrcpynA(ptd->leftAction, szTmp, sizeof(ptd->leftAction));
mir_free(szTmp); szTmp = NULL;
mir_snprintf(setting, sizeof(setting), "%s/rightAction", ptd->pupClass.pszName);
- szTmp = DBGetContactSettingString(NULL, szModul, setting, POPUP_ACTION_DISMISS); //standart ??
+ szTmp = db_get_s(NULL, szModul, setting, POPUP_ACTION_DISMISS); //standart ??
lstrcpynA(ptd->rightAction, szTmp, sizeof(ptd->rightAction));
mir_free(szTmp); szTmp = NULL;
@@ -530,14 +530,14 @@ void SaveClassSettings(POPUPTREEDATA *ptd, char* szModul)
db_set_b(NULL, szModul, setting, ptd->enabled);
mir_snprintf(setting, sizeof(setting), "%s/Timeout", ptd->pupClass.pszName);
- DBWriteContactSettingWord(NULL, szModul, setting, ptd->pupClass.iSeconds);
+ db_set_w(NULL, szModul, setting, ptd->pupClass.iSeconds);
mir_snprintf(setting, sizeof(setting), "%s/TimeoutVal",ptd->pupClass.pszName);
- DBWriteContactSettingWord(NULL, szModul, setting, ptd->timeoutValue);
+ db_set_w(NULL, szModul, setting, ptd->timeoutValue);
mir_snprintf(setting, sizeof(setting), "%s/leftAction",ptd->pupClass.pszName);
- DBWriteContactSettingString(NULL, szModul, setting, ptd->leftAction);
+ db_set_s(NULL, szModul, setting, ptd->leftAction);
mir_snprintf(setting, sizeof(setting), "%s/rightAction",ptd->pupClass.pszName);
- DBWriteContactSettingString(NULL, szModul, setting, ptd->rightAction);
+ db_set_s(NULL, szModul, setting, ptd->rightAction);
}
diff --git a/plugins/Popup/src/opt_gen.cpp b/plugins/Popup/src/opt_gen.cpp
index 9fc6001e8e..21716c3d33 100644
--- a/plugins/Popup/src/opt_gen.cpp
+++ b/plugins/Popup/src/opt_gen.cpp
@@ -94,18 +94,18 @@ void LoadOption_General() {
//Dynamic Resize
PopUpOptions.DynamicResize = db_get_b(NULL, MODULNAME, "DynamicResize", FALSE);
PopUpOptions.UseMinimumWidth = db_get_b(NULL, MODULNAME, "UseMinimumWidth", TRUE);
- PopUpOptions.MinimumWidth = DBGetContactSettingWord(NULL, MODULNAME, "MinimumWidth", 160);
+ PopUpOptions.MinimumWidth = db_get_w(NULL, MODULNAME, "MinimumWidth", 160);
PopUpOptions.UseMaximumWidth = db_get_b(NULL, MODULNAME, "UseMaximumWidth", TRUE);
- PopUpOptions.MaximumWidth = DBGetContactSettingWord(NULL, MODULNAME, "MaximumWidth", 300);
+ PopUpOptions.MaximumWidth = db_get_w(NULL, MODULNAME, "MaximumWidth", 300);
//Position
PopUpOptions.Position = DBGetContactSettingRangedByte(NULL, MODULNAME, "Position",
POS_LOWERRIGHT, POS_MINVALUE, POS_MAXVALUE);
//Configure popup area
- PopUpOptions.gapTop = DBGetContactSettingWord(NULL, MODULNAME, "gapTop", 5);
- PopUpOptions.gapBottom = DBGetContactSettingWord(NULL, MODULNAME, "gapBottom", 5);
- PopUpOptions.gapLeft = DBGetContactSettingWord(NULL, MODULNAME, "gapLeft", 5);
- PopUpOptions.gapRight = DBGetContactSettingWord(NULL, MODULNAME, "gapRight", 5);
- PopUpOptions.spacing = DBGetContactSettingWord(NULL, MODULNAME, "spacing", 5);
+ PopUpOptions.gapTop = db_get_w(NULL, MODULNAME, "gapTop", 5);
+ PopUpOptions.gapBottom = db_get_w(NULL, MODULNAME, "gapBottom", 5);
+ PopUpOptions.gapLeft = db_get_w(NULL, MODULNAME, "gapLeft", 5);
+ PopUpOptions.gapRight = db_get_w(NULL, MODULNAME, "gapRight", 5);
+ PopUpOptions.spacing = db_get_w(NULL, MODULNAME, "spacing", 5);
//Spreading
PopUpOptions.Spreading = DBGetContactSettingRangedByte(NULL, MODULNAME, "Spreading",
SPREADING_VERTICAL, SPREADING_MINVALUE, SPREADING_MAXVALUE);
@@ -514,22 +514,22 @@ INT_PTR CALLBACK DlgProcPopUpGeneral(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
case PSN_APPLY: {
//Seconds
db_set_b(NULL, MODULNAME, "InfiniteDelay", PopUpOptions.InfiniteDelay);
- DBWriteContactSettingWord(NULL, MODULNAME, "Seconds", (WORD)PopUpOptions.Seconds);
+ db_set_w(NULL, MODULNAME, "Seconds", (WORD)PopUpOptions.Seconds);
db_set_b(NULL, MODULNAME, "LeaveHovered", PopUpOptions.LeaveHovered);
//Dynamic Resize
db_set_b(NULL, MODULNAME, "DynamicResize", PopUpOptions.DynamicResize);
db_set_b(NULL, MODULNAME, "UseMinimumWidth", PopUpOptions.UseMinimumWidth);
- DBWriteContactSettingWord(NULL, MODULNAME, "MinimumWidth", PopUpOptions.MinimumWidth);
+ db_set_w(NULL, MODULNAME, "MinimumWidth", PopUpOptions.MinimumWidth);
db_set_b(NULL, MODULNAME, "UseMaximumWidth", PopUpOptions.UseMaximumWidth);
- DBWriteContactSettingWord(NULL, MODULNAME, "MaximumWidth", PopUpOptions.MaximumWidth);
+ db_set_w(NULL, MODULNAME, "MaximumWidth", PopUpOptions.MaximumWidth);
//Position
db_set_b(NULL, MODULNAME, "Position", (BYTE)PopUpOptions.Position);
//Configure popup area
- DBWriteContactSettingWord(NULL, MODULNAME, "gapTop", (WORD)PopUpOptions.gapTop);
- DBWriteContactSettingWord(NULL, MODULNAME, "gapBottom", (WORD)PopUpOptions.gapBottom);
- DBWriteContactSettingWord(NULL, MODULNAME, "gapLeft", (WORD)PopUpOptions.gapLeft);
- DBWriteContactSettingWord(NULL, MODULNAME, "gapRight", (WORD)PopUpOptions.gapRight);
- DBWriteContactSettingWord(NULL, MODULNAME, "spacing", (WORD)PopUpOptions.spacing);
+ db_set_w(NULL, MODULNAME, "gapTop", (WORD)PopUpOptions.gapTop);
+ db_set_w(NULL, MODULNAME, "gapBottom", (WORD)PopUpOptions.gapBottom);
+ db_set_w(NULL, MODULNAME, "gapLeft", (WORD)PopUpOptions.gapLeft);
+ db_set_w(NULL, MODULNAME, "gapRight", (WORD)PopUpOptions.gapRight);
+ db_set_w(NULL, MODULNAME, "spacing", (WORD)PopUpOptions.spacing);
//Spreading
db_set_b(NULL, MODULNAME, "Spreading", (BYTE)PopUpOptions.Spreading);
//miscellaneous
diff --git a/plugins/Popup/src/opt_skins.cpp b/plugins/Popup/src/opt_skins.cpp
index ab8e518835..faca667577 100644
--- a/plugins/Popup/src/opt_skins.cpp
+++ b/plugins/Popup/src/opt_skins.cpp
@@ -286,7 +286,7 @@ bool SkinOptionList_Update (OPTTREE_OPTION* &options, int *OptionsCount, HWND hw
char prefix[128];
mir_snprintf(prefix, sizeof(prefix),"skin.%S", PopUpOptions.SkinPack);
OptTree_SetOptions(hwndDlg, IDC_SKIN_LIST_OPT, options, *OptionsCount,
- DBGetContactSettingDword(NULL, MODULNAME, prefix, dwSkinOptions), _T("Skin options"));
+ db_get_dw(NULL, MODULNAME, prefix, dwSkinOptions), _T("Skin options"));
//check "Global Settings"
OptTree_SetOptions(hwndDlg, IDC_SKIN_LIST_OPT, options, *OptionsCount,
@@ -492,7 +492,7 @@ INT_PTR CALLBACK DlgProcPopSkinsOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
case PSN_APPLY:
{
//skin pack
- DBWriteContactSettingTString(NULL, MODULNAME, "SkinPack", PopUpOptions.SkinPack);
+ db_set_ts(NULL, MODULNAME, "SkinPack", PopUpOptions.SkinPack);
//skin options
const PopupSkin *skin = 0;
if (skin = skins.getSkin(PopUpOptions.SkinPack))
diff --git a/plugins/Popup/src/services.cpp b/plugins/Popup/src/services.cpp
index befd0638a1..b1f2dde562 100644
--- a/plugins/Popup/src/services.cpp
+++ b/plugins/Popup/src/services.cpp
@@ -203,7 +203,7 @@ INT_PTR PopUp_AddPopUp2(WPARAM wParam, LPARAM lParam)
if (PopUpOptions.DisableWhenFullscreen && (bShowMode != PU_SHOWMODE_FULLSCREEN) && isFullScreen())
return -1;
- if (DBGetContactSettingDword(NULL, MODULNAME, LPGEN("Global Status"), 0) &
+ if (db_get_dw(NULL, MODULNAME, LPGEN("Global Status"), 0) &
Proto_Status2Flag_My(CallService(MS_CLIST_GETSTATUSMODE, 0, 0)))
return -1;
@@ -214,7 +214,7 @@ INT_PTR PopUp_AddPopUp2(WPARAM wParam, LPARAM lParam)
{
char prefix[128];
mir_snprintf(prefix, sizeof(prefix), LPGEN("Protocol Status") "/%s", GetContactProto(ppd->lchContact));
- if (DBGetContactSettingDword(NULL, MODULNAME, prefix, 0) &
+ if (db_get_dw(NULL, MODULNAME, prefix, 0) &
Proto_Status2Flag_My(CallProtoService(proto, PS_GETSTATUS, 0, 0)))
return -1;
if (((disableWhen >> 16) & 0xFFFF0000) & Proto_Status2Flag_My(CallProtoService(proto, PS_GETSTATUS, 0, 0)))
@@ -480,7 +480,7 @@ INT_PTR PopUp_RegisterPopupClass(WPARAM wParam, LPARAM lParam)
//we ignore pc->colorText and use fonts.text as default (if no setting found in DB)
mir_snprintf(setting, 256, "%s/TextCol", ptd->pupClass.pszName);
- ptd->pupClass.colorText = (COLORREF)DBGetContactSettingDword(NULL, PU_MODULCLASS, setting, fonts.clText/*pc->colorText*/);
+ ptd->pupClass.colorText = (COLORREF)db_get_dw(NULL, PU_MODULCLASS, setting, fonts.clText/*pc->colorText*/);
FontID fid = {0};
fid.cbSize = sizeof(FontID);
mir_snprintf(fid.group, sizeof(fid.group), "%s/%s", PU_FNT_AND_COLOR, ptd->pupClass.pszName);
@@ -498,7 +498,7 @@ INT_PTR PopUp_RegisterPopupClass(WPARAM wParam, LPARAM lParam)
//we ignore pc->colorBack and use fonts.clBack as default (if no setting found in DB)
mir_snprintf(setting, 256, "%s/BgCol", ptd->pupClass.pszName);
- ptd->pupClass.colorBack = (COLORREF)DBGetContactSettingDword(NULL, PU_MODULCLASS, setting, (DWORD)fonts.clBack/*pc->colorBack*/);
+ ptd->pupClass.colorBack = (COLORREF)db_get_dw(NULL, PU_MODULCLASS, setting, (DWORD)fonts.clBack/*pc->colorBack*/);
ColourID cid = {0};
cid.cbSize = sizeof(ColourID);
mir_snprintf(cid.group, sizeof(cid.group), "%s/%s", PU_FNT_AND_COLOR, ptd->pupClass.pszName);
diff --git a/plugins/Popup/src/skin.cpp b/plugins/Popup/src/skin.cpp
index cee1bfe592..864d6c4c59 100644
--- a/plugins/Popup/src/skin.cpp
+++ b/plugins/Popup/src/skin.cpp
@@ -1278,7 +1278,7 @@ void PopupSkin::loadOpts() const
mir_snprintf(buf, sizeof(buf), "skin.%.120S", m_name);
- m_flags = DBGetContactSettingDword(NULL, MODULNAME, buf, m_flags);
+ m_flags = db_get_dw(NULL, MODULNAME, buf, m_flags);
}
// Skins