diff options
Diffstat (limited to 'src/modules/fonts')
-rw-r--r-- | src/modules/fonts/FontOptions.cpp | 14 | ||||
-rw-r--r-- | src/modules/fonts/FontService.h | 6 | ||||
-rw-r--r-- | src/modules/fonts/services.cpp | 38 |
3 files changed, 29 insertions, 29 deletions
diff --git a/src/modules/fonts/FontOptions.cpp b/src/modules/fonts/FontOptions.cpp index c026e26d72..8c82f5ac91 100644 --- a/src/modules/fonts/FontOptions.cpp +++ b/src/modules/fonts/FontOptions.cpp @@ -371,7 +371,7 @@ static void sttFsuiCreateSettingsTreeNode(HWND hwndTree, const TCHAR *groupName, if (sectionName = _tcschr(sectionName, '/'))
*sectionName = 0;
- pItemName = LangPackTranslateStringT(hLangpack, pItemName);
+ pItemName = TranslateTH(hLangpack, pItemName);
hItem = sttFindNamedTreeItemAt(hwndTree, hSection, pItemName);
if ( !sectionName || !hItem) {
@@ -528,7 +528,7 @@ static INT_PTR CALLBACK ChooseEffectDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wPar static BOOL ChooseEffectDialog(HWND hwndParent, FONTEFFECT * es)
{
- return (DialogBoxParam(hMirandaInst, MAKEINTRESOURCE(IDD_CHOOSE_FONT_EFFECT), hwndParent, ChooseEffectDlgProc, (LPARAM) es) == IDOK);
+ return (DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_CHOOSE_FONT_EFFECT), hwndParent, ChooseEffectDlgProc, (LPARAM) es) == IDOK);
}
static void sttSaveFontData(HWND hwndDlg, FontInternal &F)
@@ -1014,14 +1014,14 @@ static INT_PTR CALLBACK DlgProcLogOptions(HWND hwndDlg, UINT msg, WPARAM wParam, {
cf.Flags = CF_FORCEFONTEXIST | CF_INITTOLOGFONTSTRUCT | CF_SCREENFONTS | CF_EFFECTS | CF_ENABLETEMPLATE | CF_ENABLEHOOK;
// use custom font dialog to disable colour selection
- cf.hInstance = hMirandaInst;
+ cf.hInstance = hInst;
cf.lpTemplateName = MAKEINTRESOURCE(IDD_CUSTOM_FONT);
cf.lpfnHook = CFHookProc;
}
else if (F.flags & FIDF_DISABLESTYLES) { // no style selection, mutually exclusive with FIDF_ALLOWEFFECTS
cf.Flags = CF_FORCEFONTEXIST | CF_INITTOLOGFONTSTRUCT | CF_SCREENFONTS | CF_ENABLETEMPLATE | CF_ENABLEHOOK | CF_TTONLY | CF_NOOEMFONTS;
cf.lCustData = F.flags;
- cf.hInstance = hMirandaInst;
+ cf.hInstance = hInst;
cf.lpTemplateName = MAKEINTRESOURCE(IDD_CUSTOM_FONT);
cf.lpfnHook = CFHookProc;
lf.lfWeight = FW_NORMAL;
@@ -1284,7 +1284,7 @@ int OptInit(WPARAM wParam, LPARAM) OPTIONSDIALOGPAGE odp = {0};
odp.cbSize = sizeof(odp);
odp.position = -790000000;
- odp.hInstance = hMirandaInst;;
+ odp.hInstance = hInst;;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_FONTS);
odp.pszTitle = LPGEN("Fonts & Colors");
odp.pszGroup = LPGEN("Customize");
@@ -1390,7 +1390,7 @@ static INT_PTR CALLBACK DlgProcModernOptions(HWND hwndDlg, UINT msg, WPARAM wPar if (pf->flags & FIDF_ALLOWEFFECTS) {
cf.Flags |= CF_EFFECTS | CF_ENABLETEMPLATE | CF_ENABLEHOOK;
// use custom font dialog to disable colour selection
- cf.hInstance = hMirandaInst;
+ cf.hInstance = hInst;
cf.lpTemplateName = MAKEINTRESOURCE(IDD_CUSTOM_FONT);
cf.lpfnHook = CFHookProc;
}
@@ -1452,7 +1452,7 @@ int FontsModernOptInit(WPARAM wParam, LPARAM lParam) obj.cbSize = sizeof(obj);
obj.dwFlags = MODEROPT_FLG_TCHAR|MODEROPT_FLG_NORESIZE;
obj.hIcon = LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
- obj.hInstance = hMirandaInst;
+ obj.hInstance = hInst;
obj.iSection = MODERNOPT_PAGE_SKINS;
obj.iType = MODERNOPT_TYPE_SUBSECTIONPAGE;
obj.iBoldControls = iBoldControls;
diff --git a/src/modules/fonts/FontService.h b/src/modules/fonts/FontService.h index 8042d668bf..578649f13b 100644 --- a/src/modules/fonts/FontService.h +++ b/src/modules/fonts/FontService.h @@ -30,7 +30,7 @@ struct FontInternal : public FontIDT FontSettingsT value;
int hLangpack;
- __inline TCHAR* getName() const { return LangPackTranslateStringT(hLangpack, name); }
+ __inline TCHAR* getName() const { return TranslateTH(hLangpack, name); }
__inline bool isHeader() const
{
@@ -46,7 +46,7 @@ struct FontInternal : public FontIDT struct ColourInternal : public ColourIDT
{
- __inline TCHAR* getName() const { return LangPackTranslateStringT(hLangpack, name); }
+ __inline TCHAR* getName() const { return TranslateTH(hLangpack, name); }
COLORREF value;
int hLangpack;
@@ -54,7 +54,7 @@ struct ColourInternal : public ColourIDT struct EffectInternal : public EffectIDT
{
- __inline TCHAR* getName() const { return LangPackTranslateStringT(hLangpack, name); }
+ __inline TCHAR* getName() const { return TranslateTH(hLangpack, name); }
int hLangpack;
};
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);
|