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 /protocols/Sametime/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 'protocols/Sametime/src')
| -rw-r--r-- | protocols/Sametime/src/options.cpp | 12 | ||||
| -rw-r--r-- | protocols/Sametime/src/utils.cpp | 24 | 
2 files changed, 9 insertions, 27 deletions
diff --git a/protocols/Sametime/src/options.cpp b/protocols/Sametime/src/options.cpp index 672b7e3d11..08f8bd8b61 100644 --- a/protocols/Sametime/src/options.cpp +++ b/protocols/Sametime/src/options.cpp @@ -165,11 +165,6 @@ static INT_PTR CALLBACK DlgProcOptNet(HWND hwndDlg, UINT msg, WPARAM wParam, LPA  			EnableWindow(hw, FALSE);
  		}
 -		if (!ServiceExists(MS_CLIST_SYSTRAY_NOTIFY)) {
 -			HWND hw = GetDlgItem(hwndDlg, IDC_RAD_ERRBAL);
 -			EnableWindow(hw, FALSE);
 -		}
 -
  		switch (proto->options.err_method) {
  			case ED_POP: CheckDlgButton(hwndDlg, IDC_RAD_ERRPOP, BST_CHECKED); break;
  			case ED_MB: CheckDlgButton(hwndDlg, IDC_RAD_ERRMB, BST_CHECKED); break;
 @@ -403,12 +398,9 @@ void CSametimeProto::LoadOptions()  	// if popups not installed, will be changed to 'ED_BAL' (balloons) in main.cpp, modules loaded
  	options.err_method = (ErrorDisplay)db_get_b(0, m_szModuleName, "ErrorDisplay", ED_POP);
  	// funny logic :) ... try to avoid message boxes
 -	// if want baloons but no balloons, try popups
  	// if want popups but no popups, try baloons
 -	// if, after that, you want balloons but no balloons, revert to message boxes
 -	if (options.err_method == ED_BAL && !ServiceExists(MS_CLIST_SYSTRAY_NOTIFY)) options.err_method = ED_POP;
 -	if (options.err_method == ED_POP && !ServiceExists(MS_POPUP_SHOWMESSAGE)) options.err_method = ED_BAL;
 -	if (options.err_method == ED_BAL && !ServiceExists(MS_CLIST_SYSTRAY_NOTIFY)) options.err_method = ED_MB;
 +	if (options.err_method == ED_POP && !ServiceExists(MS_POPUP_SHOWMESSAGE))
 +		options.err_method = ED_BAL;
  	debugLogW(L"LoadOptions() loaded: ServerName:len=[%d], id:len=[%d], pword:len=[%d]", options.server_name == NULL ? -1 : mir_strlen(options.server_name), options.id == NULL ? -1 : mir_strlen(options.id), options.pword == NULL ? -1 : mir_strlen(options.pword));
  	debugLogW(L"LoadOptions() loaded: port=[%d], encrypt_session=[%d], ClientID=[%d], ClientVersionMajor=[%d], ClientVersionMinor=[%d]", options.port, options.encrypt_session, options.client_id, options.client_versionMajor, options.client_versionMinor);
 diff --git a/protocols/Sametime/src/utils.cpp b/protocols/Sametime/src/utils.cpp index 7bbc3ff804..b5ab55d29e 100644 --- a/protocols/Sametime/src/utils.cpp +++ b/protocols/Sametime/src/utils.cpp @@ -79,9 +79,6 @@ void CALLBACK sttMainThreadCallback(PVOID dwParam)  	// if want baloons but no balloons, try popups
  	// if want popups but no popups, try baloons
  	// if, after that, you want balloons but no balloons, revert to message boxes
 -	if (disp == ED_BAL && !ServiceExists(MS_CLIST_SYSTRAY_NOTIFY)) disp = ED_POP;
 -	if (disp == ED_POP && !ServiceExists(MS_POPUP_ADDPOPUPCLASS)) disp = ED_BAL;
 -	if (disp == ED_BAL && !ServiceExists(MS_CLIST_SYSTRAY_NOTIFY)) disp = ED_MB;
  	if (disp == ED_POP) {
  		POPUPDATACLASS ppd = { sizeof(ppd) };
 @@ -96,20 +93,13 @@ void CALLBACK sttMainThreadCallback(PVOID dwParam)  		CallService(MS_POPUP_ADDPOPUPCLASS, 0, (LPARAM)&ppd);
  	}
  	else if (disp == ED_BAL) {
 -		MIRANDASYSTRAYNOTIFY sn = { sizeof(sn) };
 -		sn.szProto = proto->m_szModuleName;
 -		sn.tszInfoTitle = puData->title;
 -		sn.tszInfo = puData->text;
 -		sn.dwInfoFlags = NIIF_INTERN_UNICODE;
 -		if (puData->flag == SAMETIME_POPUP_ERROR) {
 -			sn.dwInfoFlags = sn.dwInfoFlags | NIIF_WARNING;
 -			sn.uTimeout = 1000 * 10;
 -		}
 -		else {
 -			sn.dwInfoFlags = sn.dwInfoFlags | NIIF_INFO;
 -			sn.uTimeout = 1000 * 8;
 -		}
 -		CallService(MS_CLIST_SYSTRAY_NOTIFY, 0, (LPARAM)&sn);
 +		int flags, timeout;
 +		if (puData->flag == SAMETIME_POPUP_ERROR)
 +			flags = NIIF_WARNING, timeout = 1000 * 10;
 +		else
 +			flags = NIIF_INFO, timeout = 1000 * 8;
 +
 +		Clist_TrayNotifyW(proto->m_szModuleName, puData->title, puData->text, flags, timeout);
  	}
  	else { //disp == ED_MB
  		if (puData->flag == SAMETIME_POPUP_ERROR)
  | 
