diff options
Diffstat (limited to 'src/modules/fonts')
-rw-r--r-- | src/modules/fonts/FontOptions.cpp | 10 | ||||
-rw-r--r-- | src/modules/fonts/services.cpp | 22 |
2 files changed, 16 insertions, 16 deletions
diff --git a/src/modules/fonts/FontOptions.cpp b/src/modules/fonts/FontOptions.cpp index c0fe7ab0e2..efa1bb2382 100644 --- a/src/modules/fonts/FontOptions.cpp +++ b/src/modules/fonts/FontOptions.cpp @@ -392,7 +392,7 @@ static void sttFsuiCreateSettingsTreeNode(HWND hwndTree, const TCHAR *groupName, ZeroMemory(&tvis.item, sizeof(tvis.item));
tvis.item.hItem = hItem;
tvis.item.mask = TVIF_HANDLE|TVIF_STATE;
- tvis.item.state = tvis.item.stateMask = DBGetContactSettingByte(NULL, "FontServiceUI", treeItem->paramName, TVIS_EXPANDED);
+ tvis.item.state = tvis.item.stateMask = db_get_b(NULL, "FontServiceUI", treeItem->paramName, TVIS_EXPANDED);
TreeView_SetItem(hwndTree, &tvis.item);
} }
@@ -570,7 +570,7 @@ static void sttSaveFontData(HWND hwndDlg, FontInternal &F) mir_snprintf(str, SIZEOF(str), "%sSet", F.prefix);
DBWriteContactSettingByte(NULL, F.dbSettingsGroup, str, F.value.charset);
mir_snprintf(str, SIZEOF(str), "%sCol", F.prefix);
- DBWriteContactSettingDword(NULL, F.dbSettingsGroup, str, F.value.colour);
+ db_set_dw(NULL, F.dbSettingsGroup, str, F.value.colour);
if (F.flags & FIDF_NOAS) {
mir_snprintf(str, SIZEOF(str), "%sAs", F.prefix);
DBWriteContactSettingWord(NULL, F.dbSettingsGroup, str, (WORD)0x00FF);
@@ -1197,7 +1197,7 @@ static INT_PTR CALLBACK DlgProcLogOptions(HWND hwndDlg, UINT msg, WPARAM wParam, ColourInternal& C = colour_id_list_w2[i];
mir_snprintf(str, SIZEOF(str), "%s", C.setting);
- DBWriteContactSettingDword(NULL, C.dbSettingsGroup, str, C.value);
+ db_set_dw(NULL, C.dbSettingsGroup, str, C.value);
}
for (i=0; i < effect_id_list_w2.getCount(); i++) {
@@ -1207,10 +1207,10 @@ static INT_PTR CALLBACK DlgProcLogOptions(HWND hwndDlg, UINT msg, WPARAM wParam, DBWriteContactSettingByte(NULL, E.dbSettingsGroup, str, E.value.effectIndex);
mir_snprintf(str, SIZEOF(str), "%sEffectCol1", E.setting);
- DBWriteContactSettingDword(NULL, E.dbSettingsGroup, str, E.value.baseColour);
+ db_set_dw(NULL, E.dbSettingsGroup, str, E.value.baseColour);
mir_snprintf(str, SIZEOF(str), "%sEffectCol2", E.setting);
- DBWriteContactSettingDword(NULL, E.dbSettingsGroup, str, E.value.secondaryColour);
+ db_set_dw(NULL, E.dbSettingsGroup, str, E.value.secondaryColour);
}
OptionsChanged();
diff --git a/src/modules/fonts/services.cpp b/src/modules/fonts/services.cpp index 5a7c9696ab..35f5c5a321 100644 --- a/src/modules/fonts/services.cpp +++ b/src/modules/fonts/services.cpp @@ -152,22 +152,22 @@ int GetFontSettingFromDB(char *settings_group, char *prefix, LOGFONT* lf, COLORR if (colour) {
mir_snprintf(idstr, SIZEOF(idstr), "%sCol", prefix);
- *colour = DBGetContactSettingDword(NULL, settings_group, idstr, *colour);
+ *colour = db_get_dw(NULL, settings_group, idstr, *colour);
}
mir_snprintf(idstr, SIZEOF(idstr), "%sSize", prefix);
- lf->lfHeight = (char)DBGetContactSettingByte(NULL, settings_group, idstr, lf->lfHeight);
+ lf->lfHeight = (char)db_get_b(NULL, settings_group, idstr, lf->lfHeight);
//wsprintf(idstr, "%sFlags", prefix);
- //if (DBGetContactSettingDword(NULL, settings_group, idstr, 0) & FIDF_SAVEACTUALHEIGHT) {
+ //if (db_get_dw(NULL, settings_group, idstr, 0) & FIDF_SAVEACTUALHEIGHT) {
// HDC hdc = GetDC(0);
// lf->lfHeight = -lf->lfHeight;
// ReleaseDC(0, hdc);
//}
mir_snprintf(idstr, SIZEOF(idstr), "%sSty", prefix);
- style = (BYTE) DBGetContactSettingByte(NULL, settings_group, idstr,
+ style = (BYTE) db_get_b(NULL, settings_group, idstr,
(lf->lfWeight == FW_NORMAL ? 0 : DBFONTF_BOLD) | (lf->lfItalic ? DBFONTF_ITALIC : 0) | (lf->lfUnderline ? DBFONTF_UNDERLINE : 0) | lf->lfStrikeOut ? DBFONTF_STRIKEOUT : 0);
lf->lfWidth = lf->lfEscapement = lf->lfOrientation = 0;
@@ -177,7 +177,7 @@ int GetFontSettingFromDB(char *settings_group, char *prefix, LOGFONT* lf, COLORR lf->lfStrikeOut = (style & DBFONTF_STRIKEOUT) != 0;
mir_snprintf(idstr, SIZEOF(idstr), "%sSet", prefix);
- lf->lfCharSet = DBGetContactSettingByte(NULL, settings_group, idstr, lf->lfCharSet);
+ lf->lfCharSet = db_get_b(NULL, settings_group, idstr, lf->lfCharSet);
lf->lfOutPrecision = OUT_DEFAULT_PRECIS;
lf->lfClipPrecision = CLIP_DEFAULT_PRECIS;
@@ -296,7 +296,7 @@ static int sttRegisterFontWorker(FontIDW* font_id, int hLangpack) char idstr[256];
mir_snprintf(idstr, SIZEOF(idstr), "%sFlags", font_id->prefix);
- DBWriteContactSettingDword(0, font_id->dbSettingsGroup, idstr, font_id->flags);
+ db_set_dw(0, font_id->dbSettingsGroup, idstr, font_id->flags);
FontInternal* newItem = new FontInternal;
memset(newItem, 0, sizeof(FontInternal));
@@ -382,7 +382,7 @@ void KillModuleFonts(int hLangpack) void UpdateColourSettings(ColourIDW* colour_id, COLORREF *colour)
{
- *colour = (COLORREF)DBGetContactSettingDword(NULL, colour_id->dbSettingsGroup, colour_id->setting, GetColorFromDefault(colour_id->defcolour));
+ *colour = (COLORREF)db_get_dw(NULL, colour_id->dbSettingsGroup, colour_id->setting, GetColorFromDefault(colour_id->defcolour));
}
static INT_PTR sttRegisterColourWorker(ColourIDW* colour_id, int hLangpack)
@@ -425,7 +425,7 @@ static INT_PTR sttGetColourWorker(ColourIDW* colour_id) for (int i=0; i < colour_id_list.getCount(); i++) {
ColourInternal& C = colour_id_list[i];
if ( !_tcscmp(C.group, colour_id->group) && !_tcscmp(C.name, colour_id->name))
- return DBGetContactSettingDword(NULL, C.dbSettingsGroup, C.setting, GetColorFromDefault(C.defcolour));
+ return db_get_dw(NULL, C.dbSettingsGroup, C.setting, GetColorFromDefault(C.defcolour));
}
return -1;
@@ -459,13 +459,13 @@ void UpdateEffectSettings(EffectIDW* effect_id, FONTEFFECT* effectsettings) {
char str[256];
mir_snprintf(str, SIZEOF(str), "%sEffect", effect_id->setting);
- effectsettings->effectIndex = DBGetContactSettingByte(NULL, effect_id->dbSettingsGroup, str, effect_id->defeffect.effectIndex);
+ effectsettings->effectIndex = db_get_b(NULL, effect_id->dbSettingsGroup, str, effect_id->defeffect.effectIndex);
mir_snprintf(str, SIZEOF(str), "%sEffectCol1", effect_id->setting);
- effectsettings->baseColour = DBGetContactSettingDword(NULL, effect_id->dbSettingsGroup, str, effect_id->defeffect.baseColour);
+ effectsettings->baseColour = db_get_dw(NULL, effect_id->dbSettingsGroup, str, effect_id->defeffect.baseColour);
mir_snprintf(str, SIZEOF(str), "%sEffectCol2", effect_id->setting);
- effectsettings->secondaryColour = DBGetContactSettingDword(NULL, effect_id->dbSettingsGroup, str, effect_id->defeffect.secondaryColour);
+ effectsettings->secondaryColour = db_get_dw(NULL, effect_id->dbSettingsGroup, str, effect_id->defeffect.secondaryColour);
}
/////////////////////////////////////////////////////////////////////////////////////////
|