diff options
author | George Hazan <george.hazan@gmail.com> | 2016-09-06 18:26:47 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-09-06 18:26:47 +0000 |
commit | a27b07c35565ced7f690890dcba29518ae2e4928 (patch) | |
tree | d599c43d8448816a5fcc5f09838dd817b59f3b3f /plugins/Scriver/src | |
parent | a609a99eebd89fca7955c8957fc0f2e99c8ededb (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 'plugins/Scriver/src')
-rw-r--r-- | plugins/Scriver/src/msgoptions.cpp | 16 | ||||
-rw-r--r-- | plugins/Scriver/src/msgs.cpp | 24 |
2 files changed, 4 insertions, 36 deletions
diff --git a/plugins/Scriver/src/msgoptions.cpp b/plugins/Scriver/src/msgoptions.cpp index 98198af1a6..abb4b38229 100644 --- a/plugins/Scriver/src/msgoptions.cpp +++ b/plugins/Scriver/src/msgoptions.cpp @@ -880,23 +880,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);
@@ -908,8 +899,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/plugins/Scriver/src/msgs.cpp b/plugins/Scriver/src/msgs.cpp index 19f42b14f9..49310e20e8 100644 --- a/plugins/Scriver/src/msgs.cpp +++ b/plugins/Scriver/src/msgs.cpp @@ -207,29 +207,7 @@ static int TypingMessage(WPARAM hContact, LPARAM lParam) else if (lParam && (g_dat.flags2 & SMF2_SHOWTYPINGTRAY)) {
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.flags2 & SMF2_SHOWTYPINGCLIST)) {
- MIRANDASYSTRAYNOTIFY tn;
- tn.szProto = NULL;
- tn.cbSize = sizeof(tn);
- tn.tszInfoTitle = TranslateT("Typing notification");
- tn.tszInfo = szTip;
- tn.dwInfoFlags = NIIF_INFO | NIIF_INTERN_UNICODE;
- tn.uTimeout = 1000 * 4;
- CallService(MS_CLIST_SYSTRAY_NOTIFY, 0, (LPARAM)&tn);
- }
- else {
- pcli->pfnRemoveEvent(hContact, 1);
-
- CLISTEVENT cle = {};
- cle.hContact = hContact;
- cle.hDbEvent = 1;
- cle.flags = CLEF_ONLYAFEW | CLEF_TCHAR;
- cle.hIcon = GetCachedIcon("scriver_TYPING");
- cle.pszService = "SRMsg/TypingMessage";
- cle.ptszTooltip = szTip;
- pcli->pfnAddEvent(&cle);
- }
+ Clist_TrayNotifyW(NULL, TranslateT("Typing notification"), szTip, NIIF_INFO, 1000 * 4);
}
return 0;
}
|