summaryrefslogtreecommitdiff
path: root/plugins/Clist_nicer/src/clisttray.cpp
diff options
context:
space:
mode:
authorslotwin <slotwin@users.noreply.github.com>2014-06-08 16:15:46 +0000
committerslotwin <slotwin@users.noreply.github.com>2014-06-08 16:15:46 +0000
commit2f7760a079e0f1fd713ed46c58239e47b8f7f65a (patch)
tree155362b6cc83de84e0b707641bc9fe8534e61616 /plugins/Clist_nicer/src/clisttray.cpp
parente964f60be38a8a92cba9fc93c2247a052e40d21b (diff)
Clist_nicer: code cleanup
git-svn-id: http://svn.miranda-ng.org/main/trunk@9424 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_nicer/src/clisttray.cpp')
-rw-r--r--plugins/Clist_nicer/src/clisttray.cpp27
1 files changed, 14 insertions, 13 deletions
diff --git a/plugins/Clist_nicer/src/clisttray.cpp b/plugins/Clist_nicer/src/clisttray.cpp
index ac955750cd..3f5c45cb79 100644
--- a/plugins/Clist_nicer/src/clisttray.cpp
+++ b/plugins/Clist_nicer/src/clisttray.cpp
@@ -24,15 +24,15 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "commonheaders.h"
-#define TRAYICON_ID_BASE 100
-#define TIM_CALLBACK (WM_USER+1857)
-#define TIM_CREATE (WM_USER+1858)
+#define TRAYICON_ID_BASE 100
+#define TIM_CALLBACK (WM_USER+1857)
+#define TIM_CREATE (WM_USER+1858)
extern HIMAGELIST hCListImages;
// don't move to win2k.h, need new and old versions to work on 9x/2000/XP
-#define NIF_STATE 0x00000008
-#define NIF_INFO 0x00000010
+#define NIF_STATE 0x00000008
+#define NIF_INFO 0x00000010
int TrayCalcChanged(const char *szChangedProto, int averageMode, int netProtoCount)
{
@@ -71,7 +71,7 @@ int TrayCalcChanged(const char *szChangedProto, int averageMode, int netProtoCou
return pcli->pfnTrayIconSetBaseInfo(hIcon, NULL);
case SETTING_TRAYICON_MULTI:
- if ( !pcli->trayIcon )
+ if (!pcli->trayIcon)
pcli->pfnTrayIconRemove(NULL, NULL);
else if (cfg::getByte("CList", "AlwaysMulti", SETTING_ALWAYSMULTI_DEFAULT)) {
iIcon = IconFromStatusMode(szChangedProto, CallProtoService(szChangedProto, PS_GETSTATUS, 0, 0), 0, &hIcon);
@@ -83,7 +83,7 @@ int TrayCalcChanged(const char *szChangedProto, int averageMode, int netProtoCou
break;
case SETTING_TRAYICON_SINGLE:
- ptrA szProto( db_get_sa(NULL,"CList","PrimaryStatus"));
+ ptrA szProto( db_get_sa(NULL, "CList", "PrimaryStatus"));
int iIcon = IconFromStatusMode(szProto, szProto ? CallProtoService(szProto, PS_GETSTATUS, 0, 0) : CallService(MS_CLIST_GETSTATUSMODE, 0, 0), 0, &hIcon);
hIcon = (hIcon) ? CopyIcon(hIcon) : ImageList_GetIcon(hCListImages, iIcon, ILD_NORMAL);
return pcli->pfnTrayIconSetBaseInfo(hIcon, NULL);
@@ -101,16 +101,17 @@ int TrayCalcChanged(const char *szChangedProto, int averageMode, int netProtoCou
/////////////////////////////////////////////////////////////////////////////////////////
-extern INT_PTR ( *saveTrayIconProcessMessage )(WPARAM wParam, LPARAM lParam);
+extern INT_PTR (*saveTrayIconProcessMessage)(WPARAM wParam, LPARAM lParam);
INT_PTR TrayIconProcessMessage(WPARAM wParam, LPARAM lParam)
{
- MSG* msg = ( MSG* )wParam;
- if ( msg->message == TIM_CALLBACK && msg->lParam == WM_MOUSEMOVE ) {
- if ( cfg::dat.bNoTrayTips ) {
- *((LRESULT *) lParam) = 0;
+ MSG *msg = (MSG *)wParam;
+ if (msg->message == TIM_CALLBACK && msg->lParam == WM_MOUSEMOVE ) {
+ if (cfg::dat.bNoTrayTips) {
+ *((LRESULT *)lParam) = 0;
return TRUE;
- } }
+ }
+ }
return saveTrayIconProcessMessage(wParam, lParam);
}