From a411a7391bb879db8da398f067245a13c7fa7aee Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 25 Jul 2018 23:10:36 +0300 Subject: major code cleaning of all font-related structures --- protocols/JabberG/src/jabber.cpp | 11 ++++------- protocols/JabberG/src/jabber_menu.cpp | 2 +- 2 files changed, 5 insertions(+), 8 deletions(-) (limited to 'protocols') 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); } -- cgit v1.2.3