diff options
author | Tobias Weimer <wishmaster51@googlemail.com> | 2012-12-05 19:56:06 +0000 |
---|---|---|
committer | Tobias Weimer <wishmaster51@googlemail.com> | 2012-12-05 19:56:06 +0000 |
commit | 2cc3a9b83f61b8ddc3338574c466c892ffe8c02b (patch) | |
tree | 46bf7da3a7e6bf0ac6997fb0c028a5dba32fbb05 /plugins/WhenWasIt/src/notifiers.cpp | |
parent | 3cd022db126b5de4ba485172875a3919b79d00ca (diff) |
fixed popup icons
git-svn-id: http://svn.miranda-ng.org/main/trunk@2656 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/WhenWasIt/src/notifiers.cpp')
-rw-r--r-- | plugins/WhenWasIt/src/notifiers.cpp | 20 |
1 files changed, 8 insertions, 12 deletions
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;
}
|