diff options
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/Gadu-Gadu/src/popups.cpp | 5 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_misc.cpp | 10 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_proto.cpp | 4 | ||||
-rw-r--r-- | protocols/Sametime/src/utils.cpp | 9 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_popups.cpp | 10 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_proto.cpp | 4 |
6 files changed, 15 insertions, 27 deletions
diff --git a/protocols/Gadu-Gadu/src/popups.cpp b/protocols/Gadu-Gadu/src/popups.cpp index 7ae48ba9c6..872a1bc01e 100644 --- a/protocols/Gadu-Gadu/src/popups.cpp +++ b/protocols/Gadu-Gadu/src/popups.cpp @@ -75,8 +75,7 @@ void GaduProto::initpopups() wchar_t szDescr[256];
char szName[256];
- POPUPCLASS puc = { 0 };
- puc.cbSize = sizeof(puc);
+ POPUPCLASS puc = {};
puc.PluginWindowProc = PopupWindowProc;
puc.flags = PCF_UNICODE;
puc.pszName = szName;
@@ -113,7 +112,7 @@ void CALLBACK sttMainThreadCallback(PVOID dwParam) else
mir_snprintf(szName, "%s_%s", gg->m_szModuleName, "Notify");
- POPUPDATACLASS ppd = { sizeof(ppd) };
+ POPUPDATACLASS ppd = {};
ppd.szTitle.w = puData->title;
ppd.szText.w = puData->text;
ppd.PluginData = puData;
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;
diff --git a/protocols/Sametime/src/utils.cpp b/protocols/Sametime/src/utils.cpp index d7bffc8089..e83c2bb823 100644 --- a/protocols/Sametime/src/utils.cpp +++ b/protocols/Sametime/src/utils.cpp @@ -34,7 +34,7 @@ void CSametimeProto::RegisterPopups() debugLogW(L"CSametimeProto::RegisterPopups()");
- POPUPCLASS puc = { sizeof(puc) };
+ POPUPCLASS puc = {};
puc.PluginWindowProc = PopupWindowProc;
puc.flags = PCF_UNICODE;
puc.pszName = szName;
@@ -45,8 +45,6 @@ void CSametimeProto::RegisterPopups() puc.hIcon = CopyIcon(g_plugin.getIcon(IDI_ICON_NOTIFY));
g_plugin.releaseIcon(IDI_ICON_NOTIFY);
puc.iSeconds = 8;
- puc.colorBack = GetSysColor(COLOR_BTNFACE);
- puc.colorText = GetSysColor(COLOR_WINDOWTEXT);
hPopupNotify = Popup_RegisterClass(&puc);
mir_snprintf(szName, "%s_%s", m_szModuleName, "Error");
@@ -54,12 +52,9 @@ void CSametimeProto::RegisterPopups() puc.hIcon = CopyIcon(g_plugin.getIcon(IDI_ICON_ERROR, FALSE));
g_plugin.releaseIcon(IDI_ICON_ERROR);
puc.iSeconds = 10;
- puc.colorBack = GetSysColor(COLOR_BTNFACE);
- puc.colorText = GetSysColor(COLOR_WINDOWTEXT);
hPopupError = Popup_RegisterClass(&puc);
}
-
void CSametimeProto::UnregisterPopups()
{
debugLogW(L"CSametimeProto::RegisterPopups()");
@@ -77,7 +72,7 @@ void CALLBACK sttMainThreadCallback(PVOID dwParam) ErrorDisplay disp = proto->options.err_method;
if (disp == ED_POP) {
- POPUPDATACLASS ppd = { sizeof(ppd) };
+ POPUPDATACLASS ppd = {};
char szName[256];
ppd.szTitle.w = puData->title;
ppd.szText.w = puData->text;
diff --git a/protocols/SkypeWeb/src/skype_popups.cpp b/protocols/SkypeWeb/src/skype_popups.cpp index e147cd3936..7aa386b279 100644 --- a/protocols/SkypeWeb/src/skype_popups.cpp +++ b/protocols/SkypeWeb/src/skype_popups.cpp @@ -5,7 +5,7 @@ void CSkypeProto::InitPopups() wchar_t desc[256];
char name[256];
- POPUPCLASS ppc = { sizeof(ppc) };
+ POPUPCLASS ppc = {};
ppc.flags = PCF_UNICODE;
ppc.pszName = name;
ppc.pszDescription.w = desc;
@@ -13,24 +13,18 @@ void CSkypeProto::InitPopups() mir_snwprintf(desc, L"%s/%s", m_tszUserName, TranslateT("Notifications"));
mir_snprintf(name, "%s_%s", m_szModuleName, "Notification");
ppc.hIcon = g_plugin.getIcon(IDI_NOTIFY);
- ppc.colorBack = RGB(255, 255, 255);
- ppc.colorText = RGB(0, 0, 0);
ppc.iSeconds = 5;
m_PopupClasses.insert(Popup_RegisterClass(&ppc));
mir_snwprintf(desc, L"%s/%s", m_tszUserName, TranslateT("Errors"));
mir_snprintf(name, "%s_%s", m_szModuleName, "Error");
ppc.hIcon = g_plugin.getIcon(IDI_ERRORICON);
- ppc.colorBack = RGB(255, 255, 255);
- ppc.colorText = RGB(0, 0, 0);
ppc.iSeconds = -1;
m_PopupClasses.insert(Popup_RegisterClass(&ppc));
mir_snwprintf(desc, L"%s/%s", m_tszUserName, TranslateT("Calls"));
mir_snprintf(name, "%s_%s", m_szModuleName, "Call");
ppc.hIcon = g_plugin.getIcon(IDI_CALL);
- ppc.colorBack = RGB(255, 255, 255);
- ppc.colorText = RGB(0, 0, 0);
ppc.iSeconds = 30;
ppc.PluginWindowProc = PopupDlgProcCall;
m_PopupClasses.insert(Popup_RegisterClass(&ppc));
@@ -63,7 +57,7 @@ void CSkypeProto::ShowNotification(const wchar_t *caption, const wchar_t *messag break;
}
- POPUPDATACLASS ppd = { sizeof(ppd) };
+ POPUPDATACLASS ppd = {};
ppd.szTitle.w = caption;
ppd.szText.w = message;
ppd.pszClassName = className.GetBuffer();
diff --git a/protocols/VKontakte/src/vk_proto.cpp b/protocols/VKontakte/src/vk_proto.cpp index 489615b0c3..b2eb707ab4 100644 --- a/protocols/VKontakte/src/vk_proto.cpp +++ b/protocols/VKontakte/src/vk_proto.cpp @@ -426,7 +426,7 @@ void CVkProto::InitPopups(void) wchar_t desc[256];
char name[256];
- POPUPCLASS ppc = { sizeof(ppc) };
+ POPUPCLASS ppc = {};
ppc.flags = PCF_UNICODE;
ppc.pszName = name;
ppc.pszDescription.w = desc;
@@ -454,7 +454,7 @@ void CVkProto::MsgPopup(MCONTACT hContact, const wchar_t *wszMsg, const wchar_t {
char name[256];
- POPUPDATACLASS ppd = { sizeof(ppd) };
+ POPUPDATACLASS ppd = {};
ppd.szTitle.w = wszTitle;
ppd.szText.w = wszMsg;
ppd.pszClassName = name;
|