summaryrefslogtreecommitdiff
path: root/src/core/stdmsg
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-09-06 18:26:47 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-09-06 18:26:47 +0000
commita27b07c35565ced7f690890dcba29518ae2e4928 (patch)
treed599c43d8448816a5fcc5f09838dd817b59f3b3f /src/core/stdmsg
parenta609a99eebd89fca7955c8957fc0f2e99c8ededb (diff)
MS_CLIST_SYSTRAY_NOTIFY - more useless code removed
git-svn-id: http://svn.miranda-ng.org/main/trunk@17268 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/core/stdmsg')
-rw-r--r--src/core/stdmsg/src/msgoptions.cpp17
-rw-r--r--src/core/stdmsg/src/msgs.cpp14
2 files changed, 6 insertions, 25 deletions
diff --git a/src/core/stdmsg/src/msgoptions.cpp b/src/core/stdmsg/src/msgoptions.cpp
index 5fb40206cf..9935c9d747 100644
--- a/src/core/stdmsg/src/msgoptions.cpp
+++ b/src/core/stdmsg/src/msgoptions.cpp
@@ -482,24 +482,14 @@ static INT_PTR CALLBACK DlgProcTypeOptions(HWND hwndDlg, UINT msg, WPARAM wParam
EnableWindow(GetDlgItem(hwndDlg, IDC_TYPETRAY), IsDlgButtonChecked(hwndDlg, IDC_SHOWNOTIFY));
EnableWindow(GetDlgItem(hwndDlg, IDC_NOTIFYTRAY), IsDlgButtonChecked(hwndDlg, IDC_TYPETRAY));
EnableWindow(GetDlgItem(hwndDlg, IDC_NOTIFYBALLOON), IsDlgButtonChecked(hwndDlg, IDC_TYPETRAY));
- if (!ServiceExists(MS_CLIST_SYSTRAY_NOTIFY)) {
- EnableWindow(GetDlgItem(hwndDlg, IDC_NOTIFYBALLOON), FALSE);
- CheckDlgButton(hwndDlg, IDC_NOTIFYTRAY, BST_CHECKED);
- SetDlgItemText(hwndDlg, IDC_NOTIFYBALLOON, TranslateT("Show balloon popup (unsupported system)"));
- }
break;
case WM_COMMAND:
switch (LOWORD(wParam)) {
case IDC_TYPETRAY:
if (IsDlgButtonChecked(hwndDlg, IDC_TYPETRAY)) {
- if (!ServiceExists(MS_CLIST_SYSTRAY_NOTIFY)) {
- EnableWindow(GetDlgItem(hwndDlg, IDC_NOTIFYTRAY), TRUE);
- }
- else {
- EnableWindow(GetDlgItem(hwndDlg, IDC_NOTIFYTRAY), TRUE);
- EnableWindow(GetDlgItem(hwndDlg, IDC_NOTIFYBALLOON), TRUE);
- }
+ EnableWindow(GetDlgItem(hwndDlg, IDC_NOTIFYTRAY), TRUE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_NOTIFYBALLOON), TRUE);
}
else {
EnableWindow(GetDlgItem(hwndDlg, IDC_NOTIFYTRAY), FALSE);
@@ -511,8 +501,7 @@ static INT_PTR CALLBACK DlgProcTypeOptions(HWND hwndDlg, UINT msg, WPARAM wParam
EnableWindow(GetDlgItem(hwndDlg, IDC_TYPEWIN), IsDlgButtonChecked(hwndDlg, IDC_SHOWNOTIFY));
EnableWindow(GetDlgItem(hwndDlg, IDC_TYPETRAY), IsDlgButtonChecked(hwndDlg, IDC_SHOWNOTIFY));
EnableWindow(GetDlgItem(hwndDlg, IDC_NOTIFYTRAY), IsDlgButtonChecked(hwndDlg, IDC_SHOWNOTIFY));
- EnableWindow(GetDlgItem(hwndDlg, IDC_NOTIFYBALLOON), IsDlgButtonChecked(hwndDlg, IDC_SHOWNOTIFY)
- && ServiceExists(MS_CLIST_SYSTRAY_NOTIFY));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_NOTIFYBALLOON), IsDlgButtonChecked(hwndDlg, IDC_SHOWNOTIFY));
//fall-thru
case IDC_TYPEWIN:
case IDC_NOTIFYTRAY:
diff --git a/src/core/stdmsg/src/msgs.cpp b/src/core/stdmsg/src/msgs.cpp
index b38fea7b07..c35b3821ef 100644
--- a/src/core/stdmsg/src/msgs.cpp
+++ b/src/core/stdmsg/src/msgs.cpp
@@ -169,16 +169,7 @@ static int TypingMessage(WPARAM hContact, LPARAM lParam)
wchar_t szTip[256];
mir_snwprintf(szTip, TranslateT("%s is typing a message"), pcli->pfnGetContactDisplayName(hContact, 0));
- if (ServiceExists(MS_CLIST_SYSTRAY_NOTIFY) && !(g_dat.flags & SMF_SHOWTYPINGCLIST)) {
- MIRANDASYSTRAYNOTIFY tn = { sizeof(tn) };
- tn.tszInfoTitle = TranslateT("Typing notification");
- tn.tszInfo = szTip;
- tn.dwInfoFlags = NIIF_INFO;
- tn.dwInfoFlags |= NIIF_INTERN_UNICODE;
- tn.uTimeout = 1000 * 4;
- CallService(MS_CLIST_SYSTRAY_NOTIFY, 0, (LPARAM)& tn);
- }
- else {
+ if (g_dat.flags & SMF_SHOWTYPINGCLIST) {
pcli->pfnRemoveEvent(hContact, 1);
CLISTEVENT cle = {};
@@ -189,9 +180,10 @@ static int TypingMessage(WPARAM hContact, LPARAM lParam)
cle.pszService = "SRMsg/ReadMessage";
cle.ptszTooltip = szTip;
pcli->pfnAddEvent(&cle);
-
+
IcoLib_ReleaseIcon(cle.hIcon);
}
+ else Clist_TrayNotifyW(NULL, TranslateT("Typing notification"), szTip, NIIF_INFO, 1000 * 4);
}
return 0;
}