summaryrefslogtreecommitdiff
path: root/protocols/JabberG
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2022-06-13 15:09:41 +0300
committerGeorge Hazan <ghazan@miranda.im>2022-06-13 15:09:41 +0300
commit346ae348ae7ee5a594c9fcd17114ae949c1ce201 (patch)
tree1e42c52d59515646d603a9593ce23d094a5fde20 /protocols/JabberG
parent7524e8b875b924bb3cee484e90f6cc6bc01515a4 (diff)
Popup+: fix for a madness with default popup class values
Diffstat (limited to 'protocols/JabberG')
-rw-r--r--protocols/JabberG/src/jabber_misc.cpp10
-rw-r--r--protocols/JabberG/src/jabber_proto.cpp4
2 files changed, 7 insertions, 7 deletions
diff --git a/protocols/JabberG/src/jabber_misc.cpp b/protocols/JabberG/src/jabber_misc.cpp
index 9083b8c9e3..0e1ce56479 100644
--- a/protocols/JabberG/src/jabber_misc.cpp
+++ b/protocols/JabberG/src/jabber_misc.cpp
@@ -403,15 +403,15 @@ void CJabberProto::SetContactOfflineStatus(MCONTACT hContact)
void CJabberProto::InitPopups(void)
{
char name[256];
+ mir_snprintf(name, "%s_%s", m_szModuleName, "Error");
+
wchar_t desc[256];
+ mir_snwprintf(desc, L"%s/%s", m_tszUserName, TranslateT("Errors"));
- POPUPCLASS ppc = { sizeof(ppc) };
+ POPUPCLASS ppc = {};
ppc.flags = PCF_UNICODE;
ppc.pszName = name;
ppc.pszDescription.w = desc;
-
- mir_snprintf(name, "%s_%s", m_szModuleName, "Error");
- mir_snwprintf(desc, L"%s/%s", m_tszUserName, TranslateT("Errors"));
ppc.hIcon = IcoLib_GetIconByHandle(m_hProtoIcon);
ppc.colorBack = RGB(191, 0, 0); //Red
ppc.colorText = RGB(255, 245, 225); //Yellow
@@ -435,7 +435,7 @@ void CJabberProto::MsgPopup(MCONTACT hContact, const wchar_t *szMsg, const wchar
wszTitle.Insert(0, m_tszUserName);
}
- POPUPDATACLASS ppd = { sizeof(ppd) };
+ POPUPDATACLASS ppd = {};
ppd.szTitle.w = wszTitle;
ppd.szText.w = szMsg;
ppd.pszClassName = name;
diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp
index 0aa73bbca2..6b17777e13 100644
--- a/protocols/JabberG/src/jabber_proto.cpp
+++ b/protocols/JabberG/src/jabber_proto.cpp
@@ -203,8 +203,6 @@ CJabberProto::CJabberProto(const char *aProtoName, const wchar_t *aUserName) :
AddDefaultCaps();
IconsInit();
- InitPopups();
- GlobalMenuInit();
m_pepServices.insert(new CPepMood(this));
m_pepServices.insert(new CPepActivity(this));
@@ -294,6 +292,8 @@ void CJabberProto::OnModulesLoaded()
m_pepServices.InitGui();
InitInfoFrame();
+ InitPopups();
+ GlobalMenuInit();
StatusIconData sid = {};
sid.szModule = m_szModuleName;