diff options
author | George Hazan <george.hazan@gmail.com> | 2013-03-04 16:13:15 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-03-04 16:13:15 +0000 |
commit | 875f740e2a9efe878337e27849aa3b1fdddcc503 (patch) | |
tree | 55f3ad578a3919106c52b9b2e2bab44997900d5b /plugins | |
parent | d4eaaec055bbdc940f5758cc1fd7b22b2cb105d8 (diff) |
more code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@3884 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Scriver/src/chat/log.cpp | 74 | ||||
-rw-r--r-- | plugins/Scriver/src/chat/options.cpp | 19 | ||||
-rw-r--r-- | plugins/Scriver/src/chat/tools.cpp | 3 | ||||
-rw-r--r-- | plugins/Scriver/src/chat/window.cpp | 2 | ||||
-rw-r--r-- | plugins/Scriver/src/multimon.h | 26 |
5 files changed, 61 insertions, 63 deletions
diff --git a/plugins/Scriver/src/chat/log.cpp b/plugins/Scriver/src/chat/log.cpp index 24983d2c4b..984ac85397 100644 --- a/plugins/Scriver/src/chat/log.cpp +++ b/plugins/Scriver/src/chat/log.cpp @@ -519,43 +519,43 @@ static void LogEventIEView(LOGSTREAMDATA *streamData, TCHAR *ptszNick) ied.bIsMe = streamData->lin->bIsMe;
switch ( streamData->lin->iType ) {
- case GC_EVENT_MESSAGE:
- ied.iType = IEED_GC_EVENT_MESSAGE;
- ied.dwData = IEEDD_GC_SHOW_NICK;
- break;
- case GC_EVENT_ACTION:
- ied.iType = IEED_GC_EVENT_ACTION;
- break;
- case GC_EVENT_JOIN:
- ied.iType = IEED_GC_EVENT_JOIN;
- break;
- case GC_EVENT_PART:
- ied.iType = IEED_GC_EVENT_PART;
- break;
- case GC_EVENT_QUIT:
- ied.iType = IEED_GC_EVENT_QUIT;
- break;
- case GC_EVENT_NICK:
- ied.iType = IEED_GC_EVENT_NICK;
- break;
- case GC_EVENT_KICK:
- ied.iType = IEED_GC_EVENT_KICK;
- break;
- case GC_EVENT_NOTICE:
- ied.iType = IEED_GC_EVENT_NOTICE;
- break;
- case GC_EVENT_TOPIC:
- ied.iType = IEED_GC_EVENT_TOPIC;
- break;
- case GC_EVENT_INFORMATION:
- ied.iType = IEED_GC_EVENT_INFORMATION;
- break;
- case GC_EVENT_ADDSTATUS:
- ied.iType = IEED_GC_EVENT_ADDSTATUS;
- break;
- case GC_EVENT_REMOVESTATUS:
- ied.iType = IEED_GC_EVENT_REMOVESTATUS;
- break;
+ case GC_EVENT_MESSAGE:
+ ied.iType = IEED_GC_EVENT_MESSAGE;
+ ied.dwData = IEEDD_GC_SHOW_NICK;
+ break;
+ case GC_EVENT_ACTION:
+ ied.iType = IEED_GC_EVENT_ACTION;
+ break;
+ case GC_EVENT_JOIN:
+ ied.iType = IEED_GC_EVENT_JOIN;
+ break;
+ case GC_EVENT_PART:
+ ied.iType = IEED_GC_EVENT_PART;
+ break;
+ case GC_EVENT_QUIT:
+ ied.iType = IEED_GC_EVENT_QUIT;
+ break;
+ case GC_EVENT_NICK:
+ ied.iType = IEED_GC_EVENT_NICK;
+ break;
+ case GC_EVENT_KICK:
+ ied.iType = IEED_GC_EVENT_KICK;
+ break;
+ case GC_EVENT_NOTICE:
+ ied.iType = IEED_GC_EVENT_NOTICE;
+ break;
+ case GC_EVENT_TOPIC:
+ ied.iType = IEED_GC_EVENT_TOPIC;
+ break;
+ case GC_EVENT_INFORMATION:
+ ied.iType = IEED_GC_EVENT_INFORMATION;
+ break;
+ case GC_EVENT_ADDSTATUS:
+ ied.iType = IEED_GC_EVENT_ADDSTATUS;
+ break;
+ case GC_EVENT_REMOVESTATUS:
+ ied.iType = IEED_GC_EVENT_REMOVESTATUS;
+ break;
}
ied.dwData |= g_Settings.ShowTime ? IEEDD_GC_SHOW_TIME : 0;
ied.dwData |= IEEDD_GC_SHOW_ICON;
diff --git a/plugins/Scriver/src/chat/options.cpp b/plugins/Scriver/src/chat/options.cpp index eba15ce208..2f250b799a 100644 --- a/plugins/Scriver/src/chat/options.cpp +++ b/plugins/Scriver/src/chat/options.cpp @@ -218,13 +218,13 @@ static INT CALLBACK BrowseCallbackProc(HWND hwnd, UINT uMsg, LPARAM lp, LPARAM p {
char szDir[MAX_PATH];
switch(uMsg) {
- case BFFM_INITIALIZED:
- SendMessage(hwnd, BFFM_SETSELECTION, TRUE, pData);
- break;
- case BFFM_SELCHANGED:
- if (SHGetPathFromIDListA((LPITEMIDLIST) lp ,szDir))
- SendMessage(hwnd,BFFM_SETSTATUSTEXT,0,(LPARAM)szDir);
- break;
+ case BFFM_INITIALIZED:
+ SendMessage(hwnd, BFFM_SETSELECTION, TRUE, pData);
+ break;
+ case BFFM_SELCHANGED:
+ if (SHGetPathFromIDListA((LPITEMIDLIST) lp ,szDir))
+ SendMessage(hwnd,BFFM_SETSTATUSTEXT,0,(LPARAM)szDir);
+ break;
}
return 0;
}
@@ -324,8 +324,7 @@ INT_PTR CALLBACK DlgProcOptions1(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lPa break;
case 0:
- switch (((LPNMHDR)lParam)->code)
- {
+ switch (((LPNMHDR)lParam)->code) {
case PSN_APPLY:
{
int iLen;
@@ -515,8 +514,8 @@ INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lPa else
PostMessage(hwndDlg, OPT_FIXHEADINGS, 0, 0);
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
- break;
}
+ break;
case WM_NOTIFY:
if (((LPNMHDR)lParam)->idFrom == IDC_CHAT_CHECKBOXES) {
diff --git a/plugins/Scriver/src/chat/tools.cpp b/plugins/Scriver/src/chat/tools.cpp index 6fa6592bcc..a8ff09e1b4 100644 --- a/plugins/Scriver/src/chat/tools.cpp +++ b/plugins/Scriver/src/chat/tools.cpp @@ -263,7 +263,8 @@ static BOOL DoPopup(SESSION_INFO* si, GCEVENT * gce) case GC_EVENT_REMOVESTATUS:
ShowPopup(si->windowData.hContact, si, GetCachedIcon("chat_log_removestatus"), si->pszModule, si->ptszName, aFonts[14].color, TranslateT("%s disables \'%s\' status for %s"), gce->ptszText, (char *)gce->pszStatus, gce->ptszNick);
break;
- } }
+ }
+ }
return TRUE;
}
diff --git a/plugins/Scriver/src/chat/window.cpp b/plugins/Scriver/src/chat/window.cpp index 540b429781..dea51e672a 100644 --- a/plugins/Scriver/src/chat/window.cpp +++ b/plugins/Scriver/src/chat/window.cpp @@ -790,7 +790,7 @@ static LRESULT CALLBACK LogSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR break;
}
- return mir_callNextSubclass(hwnd, ButtonSubclassProc, msg, wParam, lParam);
+ return mir_callNextSubclass(hwnd, LogSubclassProc, msg, wParam, lParam);
}
static void ProcessNickListHovering(HWND hwnd, int hoveredItem, POINT * pt, SESSION_INFO * parentdat)
diff --git a/plugins/Scriver/src/multimon.h b/plugins/Scriver/src/multimon.h index aedd943da4..8498b775bd 100644 --- a/plugins/Scriver/src/multimon.h +++ b/plugins/Scriver/src/multimon.h @@ -178,8 +178,7 @@ typedef struct { if (InitMultipleMonitorStubs())
return g_pfnGetSystemMetrics(nIndex);
- switch (nIndex)
- {
+ switch (nIndex) {
case SM_CMONITORS:
case SM_SAMEDISPLAYFORMAT:
return 1;
@@ -313,18 +312,17 @@ typedef struct { if ((hWnd = WindowFromDC(hdc)) == NULL)
return FALSE;
- switch (GetClipBox(hdc, &rcClip))
- {
- default:
- MapWindowPoints(NULL, hWnd, (LPPOINT)&rcLimit, 2);
- if (IntersectRect(&rcCallback, &rcClip, &rcLimit))
- break;
- //fall thru
- case NULLREGION:
- return TRUE;
- case ERROR:
- return FALSE;
- }
+ switch (GetClipBox(hdc, &rcClip)) {
+ default:
+ MapWindowPoints(NULL, hWnd, (LPPOINT)&rcLimit, 2);
+ if (IntersectRect(&rcCallback, &rcClip, &rcLimit))
+ break;
+ //fall thru
+ case NULLREGION:
+ return TRUE;
+ case ERROR:
+ return FALSE;
+ }
rcLimit = rcCallback;
}
|