diff options
author | George Hazan <ghazan@miranda.im> | 2018-07-25 23:10:36 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-07-25 23:10:36 +0300 |
commit | a411a7391bb879db8da398f067245a13c7fa7aee (patch) | |
tree | 4b2c76ca8bc0b43b1084b8234746810c3ef6c446 /protocols | |
parent | 942c498d6e8901f751b088c0adfcb8f3fc67576c (diff) |
major code cleaning of all font-related structures
Diffstat (limited to 'protocols')
-rwxr-xr-x | protocols/JabberG/src/jabber.cpp | 11 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_menu.cpp | 2 |
2 files changed, 5 insertions, 8 deletions
diff --git a/protocols/JabberG/src/jabber.cpp b/protocols/JabberG/src/jabber.cpp index 5f57a3bedd..06d7fec2b4 100755 --- a/protocols/JabberG/src/jabber.cpp +++ b/protocols/JabberG/src/jabber.cpp @@ -108,8 +108,7 @@ static int OnModulesLoaded(WPARAM, LPARAM) }
// init fontservice for info frame
- FontIDW fontid = { 0 };
- fontid.cbSize = sizeof(fontid);
+ FontIDW fontid = {};
wcsncpy_s(fontid.group, LPGENW("Jabber"), _TRUNCATE);
strncpy_s(fontid.dbSettingsGroup, GLOBAL_SETTING_MODULE, _TRUNCATE);
wcsncpy_s(fontid.backgroundGroup, L"Jabber", _TRUNCATE);
@@ -123,17 +122,16 @@ static int OnModulesLoaded(WPARAM, LPARAM) fontid.deffontsettings.style = 0;
wcsncpy_s(fontid.name, LPGENW("Frame title"), _TRUNCATE);
- strncpy_s(fontid.prefix, "fntFrameTitle", _TRUNCATE);
+ strncpy_s(fontid.setting, "fntFrameTitle", _TRUNCATE);
fontid.deffontsettings.style = DBFONTF_BOLD;
g_plugin.addFont(&fontid);
wcsncpy_s(fontid.name, LPGENW("Frame text"), _TRUNCATE);
- strncpy_s(fontid.prefix, "fntFrameClock", _TRUNCATE);
+ strncpy_s(fontid.setting, "fntFrameClock", _TRUNCATE);
fontid.deffontsettings.style = 0;
g_plugin.addFont(&fontid);
- ColourIDW colourid = {0};
- colourid.cbSize = sizeof(colourid);
+ ColourIDW colourid = {};
wcsncpy_s(colourid.group, L"Jabber", _TRUNCATE);
strncpy_s(colourid.dbSettingsGroup, GLOBAL_SETTING_MODULE, _TRUNCATE);
@@ -141,7 +139,6 @@ static int OnModulesLoaded(WPARAM, LPARAM) strncpy_s(colourid.setting, "clFrameBack", _TRUNCATE);
colourid.defcolour = GetSysColor(COLOR_WINDOW);
g_plugin.addColor(&colourid);
-
return 0;
}
diff --git a/protocols/JabberG/src/jabber_menu.cpp b/protocols/JabberG/src/jabber_menu.cpp index e29c547cdf..89d745bb3d 100644 --- a/protocols/JabberG/src/jabber_menu.cpp +++ b/protocols/JabberG/src/jabber_menu.cpp @@ -907,7 +907,7 @@ int CJabberProto::OnProcessSrmmEvent(WPARAM, LPARAM lParam) DBVARIANT dbv;
bool bSupportTyping = false;
- if (!db_get_b(event->hContact, "SRMsg", "SupportTyping")) {
+ if (!db_get(event->hContact, "SRMsg", "SupportTyping", &dbv)) {
bSupportTyping = dbv.bVal == 1;
db_free(&dbv);
}
|