diff options
author | George Hazan <george.hazan@gmail.com> | 2012-06-26 16:50:14 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-06-26 16:50:14 +0000 |
commit | c992cb2fdc11f1cac4bc5cbce26e8e2bb3b57da0 (patch) | |
tree | 697bdbf38a8a1f6b828a8bfbd08a478e19a82c6b /src/modules/fonts/services.cpp | |
parent | f616294363c642d138f9dc0ef6eceae639e2434c (diff) |
- microkernel addded;
- version bumped to 0.92.2
git-svn-id: http://svn.miranda-ng.org/main/trunk@641 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/fonts/services.cpp')
-rw-r--r-- | src/modules/fonts/services.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/src/modules/fonts/services.cpp b/src/modules/fonts/services.cpp index 09ac106fb5..adc5d216f2 100644 --- a/src/modules/fonts/services.cpp +++ b/src/modules/fonts/services.cpp @@ -297,22 +297,21 @@ 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);
- {
- FontInternal* newItem = new FontInternal;
- memset(newItem, 0, sizeof(FontIDW));
- memcpy(newItem, font_id, font_id->cbSize);
-
- if ( !lstrcmp(newItem->deffontsettings.szFace, _T("MS Shell Dlg"))) {
- LOGFONT lf;
- SystemParametersInfo(SPI_GETICONTITLELOGFONT, sizeof(LOGFONT), &lf, FALSE);
- lstrcpyn(newItem->deffontsettings.szFace, lf.lfFaceName, SIZEOF(newItem->deffontsettings.szFace));
- if ( !newItem->deffontsettings.size)
- newItem->deffontsettings.size = lf.lfHeight;
- }
-
- UpdateFontSettings(font_id, &newItem->value);
- font_id_list.insert(newItem);
+
+ FontInternal* newItem = new FontInternal;
+ memset(newItem, 0, sizeof(FontIDW));
+ memcpy(newItem, font_id, font_id->cbSize);
+
+ if ( !lstrcmp(newItem->deffontsettings.szFace, _T("MS Shell Dlg"))) {
+ LOGFONT lf;
+ SystemParametersInfo(SPI_GETICONTITLELOGFONT, sizeof(LOGFONT), &lf, FALSE);
+ lstrcpyn(newItem->deffontsettings.szFace, lf.lfFaceName, SIZEOF(newItem->deffontsettings.szFace));
+ if ( !newItem->deffontsettings.size)
+ newItem->deffontsettings.size = lf.lfHeight;
}
+
+ UpdateFontSettings(font_id, &newItem->value);
+ font_id_list.insert(newItem);
return 0;
}
@@ -344,7 +343,8 @@ static INT_PTR sttGetFontWorker(FontIDW* font_id, LOGFONT* lf) }
return colour;
- } }
+ }
+ }
GetDefaultFontSetting(lf, &colour);
return colour;
@@ -358,9 +358,10 @@ INT_PTR GetFontW(WPARAM wParam, LPARAM lParam) INT_PTR GetFont(WPARAM wParam, LPARAM lParam)
{
FontIDW temp;
- LOGFONT lftemp;
- if ( !ConvertFontID((FontID*)wParam, &temp)) return -1;
+ if ( !ConvertFontID((FontID*)wParam, &temp))
+ return -1;
+ LOGFONT lftemp;
int ret = sttGetFontWorker(&temp, &lftemp);
ConvertLOGFONT(&lftemp, (LOGFONTA*)lParam);
return ret;
@@ -436,7 +437,6 @@ INT_PTR GetColour(WPARAM wParam, LPARAM) 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);
|