From e58823d961a630eb62e60d2ccb443761ba5f1704 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 14 Jun 2012 15:51:34 +0000 Subject: - all MS_CLIST_ADD*ITEM services replaced with Menu_Add*Item stubs. - massive cleanup of the menu-related code git-svn-id: http://svn.miranda-ng.org/main/trunk@410 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/clist/clisttray.cpp | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'src/modules/clist/clisttray.cpp') diff --git a/src/modules/clist/clisttray.cpp b/src/modules/clist/clisttray.cpp index 00d4074b33..519cf0f875 100644 --- a/src/modules/clist/clisttray.cpp +++ b/src/modules/clist/clisttray.cpp @@ -2,7 +2,7 @@ Miranda IM: the free IM client for Microsoft* Windows* -Copyright 2000-2009 Miranda ICQ/IM project, +Copyright 2000-2009 Miranda ICQ/IM project, all portions of this codebase are copyrighted to the people listed in contributors.txt. @@ -11,7 +11,7 @@ modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. -This program is distributed in the hope that it will be useful, +This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -161,7 +161,7 @@ TCHAR* fnTrayIconMakeTooltip( const TCHAR *szPrefix, const char *szProto ) if ( DBGetContactSettingByte( NULL, "CList", "AlwaysStatus", SETTING_ALWAYSSTATUS_DEFAULT )) { if ( mToolTipTrayTips ) { if ( ProtoXStatus ) - mir_sntprintf(cli.szTip, MAX_TIP_SIZE, _T("%s%s%-12.12s\t%s%s%-24.24s"), szPrefix, szSeparator, pa->tszAccountName, szStatus,szSeparator,ProtoXStatus); + mir_sntprintf(cli.szTip, MAX_TIP_SIZE, _T("%s%s%-12.12s\t%s%s%-24.24s"), szPrefix, szSeparator, pa->tszAccountName, szStatus, szSeparator, ProtoXStatus); else mir_sntprintf(cli.szTip, MAX_TIP_SIZE, _T("%s%s%-12.12s\t%s"), szPrefix, szSeparator, pa->tszAccountName, szStatus); } @@ -172,7 +172,7 @@ TCHAR* fnTrayIconMakeTooltip( const TCHAR *szPrefix, const char *szProto ) else { if ( mToolTipTrayTips ) { if ( ProtoXStatus ) - mir_sntprintf( cli.szTip, MAX_TIP_SIZE, _T("%-12.12s\t%s\n%-24.24s"), pa->tszAccountName, szStatus,ProtoXStatus); + mir_sntprintf( cli.szTip, MAX_TIP_SIZE, _T("%-12.12s\t%s\n%-24.24s"), pa->tszAccountName, szStatus, ProtoXStatus); else mir_sntprintf( cli.szTip, MAX_TIP_SIZE, _T("%-12.12s\t%s"), pa->tszAccountName, szStatus); } @@ -357,7 +357,7 @@ static VOID CALLBACK RefreshTimerProc(HWND, UINT, UINT_PTR, DWORD) { int i; if ( RefreshTimerId ) { - KillTimer(NULL,RefreshTimerId); + KillTimer(NULL, RefreshTimerId); RefreshTimerId=0; } for (i=0; i < accounts.getCount(); i++) { @@ -422,13 +422,13 @@ int fnTrayIconUpdate(HICON hNewIcon, const TCHAR *szNewTip, const char *szPrefer SetTaskBarIcon(NULL, NULL); cli.trayIcon[i].isBase = isBase; - if (DBGetContactSettingByte(NULL,"CList","TrayIcon",SETTING_TRAYICON_DEFAULT) == SETTING_TRAYICON_MULTI) + if (DBGetContactSettingByte(NULL, "CList", "TrayIcon", SETTING_TRAYICON_DEFAULT) == SETTING_TRAYICON_MULTI) { - DWORD time1=DBGetContactSettingWord(NULL,"CList","CycleTime",SETTING_CYCLETIME_DEFAULT)*200; - DWORD time2=DBGetContactSettingWord(NULL,"CList","IconFlashTime",550)+1000; - DWORD time=max(max(2000,time1),time2); - if (RefreshTimerId) {KillTimer(NULL,RefreshTimerId); RefreshTimerId=0;} - RefreshTimerId=SetTimer(NULL,0,time,RefreshTimerProc); // if unknown base was changed - than show preffered proto icon for 2 sec and reset it to original one after timeout + DWORD time1=DBGetContactSettingWord(NULL, "CList", "CycleTime", SETTING_CYCLETIME_DEFAULT)*200; + DWORD time2=DBGetContactSettingWord(NULL, "CList", "IconFlashTime", 550)+1000; + DWORD time=max(max(2000, time1), time2); + if (RefreshTimerId) {KillTimer(NULL, RefreshTimerId); RefreshTimerId=0;} + RefreshTimerId=SetTimer(NULL, 0, time, RefreshTimerProc); // if unknown base was changed - than show preffered proto icon for 2 sec and reset it to original one after timeout } { ulock; return i; } } @@ -455,8 +455,8 @@ int fnTrayIconSetBaseInfo(HICON hIcon, const char *szPreferredProto) } if ((cli.pfnGetProtocolVisibility(szPreferredProto)) && (GetAverageMode() == -1) - && (DBGetContactSettingByte(NULL,"CList","TrayIcon",SETTING_TRAYICON_DEFAULT) == SETTING_TRAYICON_MULTI) - && !(DBGetContactSettingByte(NULL,"CList","AlwaysMulti",SETTING_ALWAYSMULTI_DEFAULT))) + && (DBGetContactSettingByte(NULL, "CList", "TrayIcon", SETTING_TRAYICON_DEFAULT) == SETTING_TRAYICON_MULTI) + && !(DBGetContactSettingByte(NULL, "CList", "AlwaysMulti", SETTING_ALWAYSMULTI_DEFAULT))) goto LBL_Error; } @@ -555,7 +555,7 @@ void fnTrayIconUpdateBase(const char *szChangedProto) szProto = NULL; else szProto = dbv.pszVal; - changed = cli.pfnTrayIconSetBaseInfo( cli.pfnGetIconFromStatusMode( NULL, szProto, szProto ? CallProtoService(szProto, PS_GETSTATUS, 0,0) : CallService(MS_CLIST_GETSTATUSMODE, 0, 0)), szProto ); + changed = cli.pfnTrayIconSetBaseInfo( cli.pfnGetIconFromStatusMode( NULL, szProto, szProto ? CallProtoService(szProto, PS_GETSTATUS, 0, 0) : CallService(MS_CLIST_GETSTATUSMODE, 0, 0)), szProto ); DBFreeVariant(&dbv); break; } @@ -564,7 +564,7 @@ void fnTrayIconUpdateBase(const char *szChangedProto) SetTimer(NULL, 0, DBGetContactSettingWord(NULL, "CList", "CycleTime", SETTING_CYCLETIME_DEFAULT) * 1000, cli.pfnTrayCycleTimerProc); changed = cli.pfnTrayIconSetBaseInfo(ImageList_GetIcon - (hCListImages, cli.pfnIconFromStatusMode(szChangedProto, CallProtoService(szChangedProto, PS_GETSTATUS, 0, 0), NULL), + (hCListImages, cli.pfnIconFromStatusMode(szChangedProto, CallProtoService(szChangedProto, PS_GETSTATUS, 0, 0), NULL), ILD_NORMAL), NULL); break; case SETTING_TRAYICON_MULTI: -- cgit v1.2.3