From 2cc3a9b83f61b8ddc3338574c466c892ffe8c02b Mon Sep 17 00:00:00 2001 From: Tobias Weimer Date: Wed, 5 Dec 2012 19:56:06 +0000 Subject: fixed popup icons git-svn-id: http://svn.miranda-ng.org/main/trunk@2656 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/WhenWasIt/src/notifiers.cpp | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'plugins/WhenWasIt/src/notifiers.cpp') diff --git a/plugins/WhenWasIt/src/notifiers.cpp b/plugins/WhenWasIt/src/notifiers.cpp index 6921a19619..3ae570bf70 100644 --- a/plugins/WhenWasIt/src/notifiers.cpp +++ b/plugins/WhenWasIt/src/notifiers.cpp @@ -39,8 +39,6 @@ void PopupNotifyNoBirthdays() _tcscpy(pd.lptzContactName, TranslateT("WhenWasIt")); _tcscpy(pd.lptzText, TranslateT("No upcoming birthdays.")); PUAddPopUpT(&pd); - - Skin_ReleaseIcon(pd.lchIcon); } TCHAR *BuildDTBText(int dtb, TCHAR *name, TCHAR *text, int size) @@ -87,10 +85,10 @@ int PopupNotifyBirthday(HANDLE hContact, int dtb, int age) POPUPDATAT pd = {0}; FillPopupData(pd, dtb); pd.lchContact = hContact; - pd.PluginWindowProc = (WNDPROC)DlgProcPopup; + pd.PluginWindowProc = DlgProcPopup; pd.lchIcon = GetDTBIcon(dtb); - _stprintf(pd.lptzContactName, TranslateT("Birthday - %s"), name); + mir_sntprintf(pd.lptzContactName, MAX_CONTACTNAME, TranslateT("Birthday - %s"), name); TCHAR *sex; switch (toupper(gender)) { case _T('M'): @@ -104,13 +102,12 @@ int PopupNotifyBirthday(HANDLE hContact, int dtb, int age) break; } if (dtb > 0) - _stprintf(pd.lptzText, TranslateT("%s\n%s will be %d years old."), text, sex, age); + mir_sntprintf(pd.lptzText, MAX_SECONDLINE, TranslateT("%s\n%s will be %d years old."), text, sex, age); else - _stprintf(pd.lptzText, TranslateT("%s\n%s just turned %d."), text, sex, age); + mir_sntprintf(pd.lptzText, MAX_SECONDLINE, TranslateT("%s\n%s just turned %d."), text, sex, age); PUAddPopUpT(&pd); - Skin_ReleaseIcon(pd.lchIcon); free(name); return 0; } @@ -132,10 +129,10 @@ int PopupNotifyMissedBirthday(HANDLE hContact, int dab, int age) POPUPDATAT pd = {0}; FillPopupData(pd, dab); pd.lchContact = hContact; - pd.PluginWindowProc = (WNDPROC)DlgProcPopup; + pd.PluginWindowProc = DlgProcPopup; pd.lchIcon = GetDTBIcon(dab); - _stprintf(pd.lptzContactName, TranslateT("Birthday - %s"), name); + mir_sntprintf(pd.lptzContactName, MAX_CONTACTNAME, TranslateT("Birthday - %s"), name); TCHAR *sex; switch (toupper(gender)) { case _T('M'): @@ -149,13 +146,12 @@ int PopupNotifyMissedBirthday(HANDLE hContact, int dab, int age) break; } if (dab > 0) - _stprintf(pd.lptzText, TranslateT("%s\n%s just turned %d."), text, sex, age); + mir_sntprintf(pd.lptzText, MAX_SECONDLINE, TranslateT("%s\n%s just turned %d."), text, sex, age); else - _stprintf(pd.lptzText, TranslateT("%s\n%s just turned %d."), text, sex, age); + mir_sntprintf(pd.lptzText, MAX_SECONDLINE, TranslateT("%s\n%s just turned %d."), text, sex, age); PUAddPopUpT(&pd); - Skin_ReleaseIcon(pd.lchIcon); free(name); return 0; } -- cgit v1.2.3