diff options
author | George Hazan <george.hazan@gmail.com> | 2013-03-15 21:47:10 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-03-15 21:47:10 +0000 |
commit | 9d482ed81c2a6a3361a5a9b2d0efbfc4b6b815c5 (patch) | |
tree | e5b304c159f7c79ab44926eee439eb93288acec6 /plugins/UserInfoEx/src/svc_reminder.cpp | |
parent | 7fe6e93058f0e9253e2a79d7fc2d7a136784f791 (diff) |
- POPUPDATAT_V2 replaced with POPUPDATAT in all possible cases;
- fix: wrong popup initialization code;
- code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@4057 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/UserInfoEx/src/svc_reminder.cpp')
-rw-r--r-- | plugins/UserInfoEx/src/svc_reminder.cpp | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/plugins/UserInfoEx/src/svc_reminder.cpp b/plugins/UserInfoEx/src/svc_reminder.cpp index 3bfc5b6084..c5112d2a54 100644 --- a/plugins/UserInfoEx/src/svc_reminder.cpp +++ b/plugins/UserInfoEx/src/svc_reminder.cpp @@ -254,31 +254,24 @@ static INT NotifyWithPopup(HANDLE hContact, CEvent::EType eventType, INT DaysToA {
if (gRemindOpts.bPopups)
{
- POPUPDATAT_V2 ppd;
-
- ZeroMemory(&ppd, sizeof(POPUPDATAT_V2));
+ POPUPDATAT ppd = { 0 };
ppd.PluginWindowProc = PopupWindowProc;
ppd.iSeconds = (INT)DB::Setting::GetByte(SET_POPUP_DELAY, 0);
- if (hContact)
- {
+ if (hContact) {
ppd.lchContact = hContact;
mir_sntprintf(ppd.lptzContactName, SIZEOF(ppd.lptzContactName),
_T("%s - %s"), TranslateTS(pszDesc), DB::Contact::DisplayName(hContact));
}
- else
- {
- mir_tcsncpy(ppd.lptzContactName, TranslateT("Reminder"), SIZEOF(ppd.lptzContactName));
- }
+ else mir_tcsncpy(ppd.lptzContactName, TranslateT("Reminder"), SIZEOF(ppd.lptzContactName));
+
mir_tcsncpy(ppd.lptzText, pszMsg, MAX_SECONDLINE);
ppd.lchIcon = GetAnnivIcon(CEvent(eventType, DaysToAnniv));
- switch (eventType)
- {
+ switch (eventType) {
case CEvent::BIRTHDAY:
- switch (DB::Setting::GetByte(SET_POPUP_BIRTHDAY_COLORTYPE, POPUP_COLOR_CUSTOM))
- {
+ switch (DB::Setting::GetByte(SET_POPUP_BIRTHDAY_COLORTYPE, POPUP_COLOR_CUSTOM)) {
case POPUP_COLOR_WINDOWS:
ppd.colorBack = GetSysColor(COLOR_BTNFACE);
ppd.colorText = GetSysColor(COLOR_WINDOWTEXT);
@@ -292,8 +285,7 @@ static INT NotifyWithPopup(HANDLE hContact, CEvent::EType eventType, INT DaysToA break;
case CEvent::ANNIVERSARY:
- switch (DB::Setting::GetByte(SET_POPUP_ANNIVERSARY_COLORTYPE, POPUP_COLOR_CUSTOM))
- {
+ switch (DB::Setting::GetByte(SET_POPUP_ANNIVERSARY_COLORTYPE, POPUP_COLOR_CUSTOM)) {
case POPUP_COLOR_WINDOWS:
ppd.colorBack = GetSysColor(COLOR_BTNFACE);
ppd.colorText = GetSysColor(COLOR_WINDOWTEXT);
|