diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2018-03-06 20:24:07 +0300 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2018-03-07 12:54:58 +0300 |
commit | bebafc42ab6199e86d4c2c901fac8d091bfffef0 (patch) | |
tree | f3961879845e89688c6628dccf1a3c9cd3ebb9b3 /plugins | |
parent | 7e9fef8a6ff35c63f9217fcc618d77f660e45245 (diff) |
some fixes
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/AVS/src/image_utils.cpp | 2 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_clcpaint.cpp | 1 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_skinengine.cpp | 11 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/coolscroll.cpp | 9 | ||||
-rw-r--r-- | plugins/ListeningTo/src/options.cpp | 10 | ||||
-rw-r--r-- | plugins/MirOTR/ekhtml/src/ekhtml_mktables.c | 5 | ||||
-rw-r--r-- | plugins/MirandaG15/src/LCDFramework/CLCDInput.cpp | 4 | ||||
-rw-r--r-- | plugins/NewsAggregator/Src/Services.cpp | 4 | ||||
-rw-r--r-- | plugins/NewsAggregator/Src/Update.cpp | 2 | ||||
-rw-r--r-- | plugins/NewsAggregator/Src/Utils.cpp | 4 | ||||
-rw-r--r-- | plugins/SMS/src/functions.cpp | 2 | ||||
-rw-r--r-- | plugins/Scriver/src/tabs.cpp | 2 | ||||
-rw-r--r-- | plugins/UserInfoEx/src/Flags/svc_flags.cpp | 2 | ||||
-rw-r--r-- | plugins/UserInfoEx/src/psp_profile.cpp | 5 | ||||
-rw-r--r-- | plugins/WebView/src/webview_cleanup.cpp | 3 |
15 files changed, 22 insertions, 44 deletions
diff --git a/plugins/AVS/src/image_utils.cpp b/plugins/AVS/src/image_utils.cpp index 0e2107f87b..c34a998aa3 100644 --- a/plugins/AVS/src/image_utils.cpp +++ b/plugins/AVS/src/image_utils.cpp @@ -1,7 +1,7 @@ #include "stdafx.h"
#include "image_utils.h"
-#define GET_PIXEL(__P__, __X__, __Y__) ( __P__ + width * 4 * (__Y__) + 4 * (__X__))
+#define GET_PIXEL(__P__, __X__, __Y__) ( (__P__) + width * 4 * (__Y__) + 4 * (__X__))
// Make a bitmap all transparent, but only if it is a 32bpp
void MakeBmpTransparent(HBITMAP hBitmap)
diff --git a/plugins/Clist_modern/src/modern_clcpaint.cpp b/plugins/Clist_modern/src/modern_clcpaint.cpp index e930994dea..c3208bfd1e 100644 --- a/plugins/Clist_modern/src/modern_clcpaint.cpp +++ b/plugins/Clist_modern/src/modern_clcpaint.cpp @@ -753,7 +753,6 @@ void CLCPaint::_PaintRowItemsEx(HDC hdcMem, ClcData *dat, ClcContact *Drawing, R SetRect(&rc, fr_rc.right - x, p_rect.top, fr_rc.right - x + ICON_HEIGHT, p_rect.bottom);
if (dat->text_rtl != 0) _RTLRect(&rc, free_row_rc.right);
Drawing->pos_extra[iImage] = rc;
- Drawing->pos_extra[iImage] = rc;
if (Drawing->iExtraImage[iImage] != EMPTY_EXTRA_ICON)
ske_ImageList_DrawEx(dat->himlExtraColumns, Drawing->iExtraImage[iImage], hdcMem, rc.left, rc.top, 0, 0, CLR_NONE, colourFg, mode);
}
diff --git a/plugins/Clist_modern/src/modern_skinengine.cpp b/plugins/Clist_modern/src/modern_skinengine.cpp index 9ac08875bd..986de4cac7 100644 --- a/plugins/Clist_modern/src/modern_skinengine.cpp +++ b/plugins/Clist_modern/src/modern_skinengine.cpp @@ -1016,11 +1016,9 @@ static int ske_DrawSkinObject(SKINDRAWREQUEST * preq, GLYPHOBJECT * pobj) membmp = ske_CreateDIB32(PRect.right - PRect.left, PRect.bottom - PRect.top); oldbmp = (HBITMAP)SelectObject(memdc, membmp); if (oldbmp == nullptr) { - if (mode == 2) { - SelectObject(memdc, oldbmp); - DeleteDC(memdc); - DeleteObject(membmp); - } + SelectObject(memdc, oldbmp); + DeleteDC(memdc); + DeleteObject(membmp); return 0; } } @@ -1244,8 +1242,7 @@ static int ske_DrawSkinObject(SKINDRAWREQUEST * preq, GLYPHOBJECT * pobj) if ((k > 0 || k == -1) && mode == 2) { { BLENDFUNCTION bf = { AC_SRC_OVER, 0, pobj->dwAlpha, BYTE(pobj->bmBitsPixel == 32 && pobj->Style != ST_BRUSH ? AC_SRC_ALPHA : 0) }; - if (mode == 2) - OffsetRect(&PRect, mode2offset.x, mode2offset.y); + OffsetRect(&PRect, mode2offset.x, mode2offset.y); ske_AlphaBlend(preq->hDC, PRect.left, PRect.top, PRect.right - PRect.left, PRect.bottom - PRect.top, memdc, 0, 0, PRect.right - PRect.left, PRect.bottom - PRect.top, bf); } diff --git a/plugins/Clist_nicer/src/coolscroll.cpp b/plugins/Clist_nicer/src/coolscroll.cpp index cd9f0750e7..9e2ea12830 100644 --- a/plugins/Clist_nicer/src/coolscroll.cpp +++ b/plugins/Clist_nicer/src/coolscroll.cpp @@ -3010,17 +3010,10 @@ LRESULT CALLBACK CoolSBWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lP case WM_STYLECHANGED:
if (swnd->bPreventStyleChange)
- {
// the NCPAINT handler has told us to eat this message!
return 0;
- }
else
- {
- if (message == WM_STYLECHANGED)
- return CoolSB_StyleChange(swnd, hwnd, WM_STYLECHANGED, wParam, lParam);
- else
- break;
- }
+ return CoolSB_StyleChange(swnd, hwnd, WM_STYLECHANGED, wParam, lParam);
case WM_NCMOUSEMOVE:
{
diff --git a/plugins/ListeningTo/src/options.cpp b/plugins/ListeningTo/src/options.cpp index a4d934f8c8..aeea6a1b6e 100644 --- a/plugins/ListeningTo/src/options.cpp +++ b/plugins/ListeningTo/src/options.cpp @@ -177,16 +177,14 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP }
else {
// Init combo
- int total = EXTRA_ICON_COUNT, first = 0;
+ int first = 0;
SendDlgItemMessage(hwndDlg, IDC_ADV_ICON, CB_ADDSTRING, 0, (LPARAM)L"1");
SendDlgItemMessage(hwndDlg, IDC_ADV_ICON, CB_ADDSTRING, 0, (LPARAM)L"2");
- if (total > 0) {
- wchar_t tmp[10];
- for (int i = first; i <= total; i++)
- SendDlgItemMessage(hwndDlg, IDC_ADV_ICON, CB_ADDSTRING, 0, (LPARAM)_itow(i - first + 3, tmp, 10));
- }
+ wchar_t tmp[10];
+ for (int i = first; i <= EXTRA_ICON_COUNT; i++)
+ SendDlgItemMessage(hwndDlg, IDC_ADV_ICON, CB_ADDSTRING, 0, (LPARAM)_itow(i - first + 3, tmp, 10));
}
ret = SaveOptsDlgProc(optionsControls, _countof(optionsControls), MODULE_NAME, hwndDlg, msg, wParam, lParam);
diff --git a/plugins/MirOTR/ekhtml/src/ekhtml_mktables.c b/plugins/MirOTR/ekhtml/src/ekhtml_mktables.c index e9d2102325..473beb14f7 100644 --- a/plugins/MirOTR/ekhtml/src/ekhtml_mktables.c +++ b/plugins/MirOTR/ekhtml/src/ekhtml_mktables.c @@ -68,9 +68,8 @@ static EKHTML_CHARMAP_TYPE valid_attrvalue(char in){ in == '/' || in == ':' || in == '+' || in == '*' || in == '%' || in == '?' || in == '!' || in == '&' || in == '(' || in == ')' || in == '#' || in == '=' || - in == '~' || in == ']' || in == '*' || in == '@' || - in == '$' || in == '_' || in == ',' || in == ';' || - in == '|') + in == '~' || in == ']' || in == '@' || in == '$' || + in == '_' || in == ',' || in == ';' || in == '|') return 1; return 0; } diff --git a/plugins/MirandaG15/src/LCDFramework/CLCDInput.cpp b/plugins/MirandaG15/src/LCDFramework/CLCDInput.cpp index 92723e0501..cce1f30125 100644 --- a/plugins/MirandaG15/src/LCDFramework/CLCDInput.cpp +++ b/plugins/MirandaG15/src/LCDFramework/CLCDInput.cpp @@ -212,7 +212,6 @@ void CLCDInput::OnFontChanged() m_pScrollbar->SetSliderSize(m_iLineCount);
m_Marker[0].iLine = 0;
- m_Marker[0].iPosition = 0;
m_Marker[0].iPosition = (int)m_strText.length();
// Delete all offsets and recalculate them
@@ -429,9 +428,6 @@ LRESULT CLCDInput::ProcessKeyEvent(int Code, WPARAM wParam, LPARAM lParam) }
if(res != 0)
{
- if(dir != MARKER_HOLD) {
- MoveMarker(dir,res);
- }
UpdateOffsets(size);
UpdateMarker();
ScrollToMarker();
diff --git a/plugins/NewsAggregator/Src/Services.cpp b/plugins/NewsAggregator/Src/Services.cpp index 1e222f9314..68f7dedd05 100644 --- a/plugins/NewsAggregator/Src/Services.cpp +++ b/plugins/NewsAggregator/Src/Services.cpp @@ -145,7 +145,7 @@ INT_PTR CheckAllFeeds(WPARAM, LPARAM lParam) UpdateListAdd(hContact);
}
if (!ThreadRunning)
- mir_forkthread(UpdateThreadProc, nullptr);
+ mir_forkthread(UpdateThreadProc);
return 0;
}
@@ -188,7 +188,7 @@ INT_PTR CheckFeed(WPARAM hContact, LPARAM) if(IsMyContact(hContact))
UpdateListAdd(hContact);
if ( !ThreadRunning)
- mir_forkthread(UpdateThreadProc, FALSE);
+ mir_forkthread(UpdateThreadProc);
return 0;
}
diff --git a/plugins/NewsAggregator/Src/Update.cpp b/plugins/NewsAggregator/Src/Update.cpp index 07489d7dd8..56c0d2f44d 100644 --- a/plugins/NewsAggregator/Src/Update.cpp +++ b/plugins/NewsAggregator/Src/Update.cpp @@ -40,7 +40,7 @@ void CALLBACK timerProc(HWND, UINT, UINT_PTR, DWORD) }
}
if (!ThreadRunning && HaveUpdates)
- mir_forkthread(UpdateThreadProc, nullptr);
+ mir_forkthread(UpdateThreadProc);
}
}
diff --git a/plugins/NewsAggregator/Src/Utils.cpp b/plugins/NewsAggregator/Src/Utils.cpp index 2f180e9c14..43eb082f0f 100644 --- a/plugins/NewsAggregator/Src/Utils.cpp +++ b/plugins/NewsAggregator/Src/Utils.cpp @@ -193,7 +193,7 @@ time_t __stdcall DateToUnixTime(const wchar_t *stamp, bool FeedType) else {
wchar_t *weekday, monthstr[4], timezonesign[2];
int day, month = 0, year, hour, min, sec, timezoneh, timezonem;
- if (wcsstr(p, L",")) {
+ if (wcschr(p, L',')) {
weekday = wcstok(p, L",");
p = wcstok(nullptr, L",");
swscanf(p + 1, L"%d %3s %d %d:%d:%d %1s%02d%02d", &day, &monthstr, &year, &hour, &min, &sec, &timezonesign, &timezoneh, &timezonem);
@@ -230,7 +230,7 @@ time_t __stdcall DateToUnixTime(const wchar_t *stamp, bool FeedType) else
mir_snwprintf(p, 4 + 2 + 2 + 1 + 2 + 1 + 2 + 1 + 2 + 1, L"%04d%02d%02dT%02d:%02d:%02d", year, month, day, hour, min, sec);
}
- else if (wcsstr(p, L"T")) {
+ else if (wcschr(p, L'T')) {
swscanf(p, L"%d-%d-%dT%d:%d:%d", &year, &month, &day, &hour, &min, &sec);
mir_snwprintf(p, 4 + 2 + 2 + 1 + 2 + 1 + 2 + 1 + 2 + 1, L"%04d%02d%02dT%02d:%02d:%02d", year, month, day, hour, min, sec);
}
diff --git a/plugins/SMS/src/functions.cpp b/plugins/SMS/src/functions.cpp index 4501afcde7..3f125ac24e 100644 --- a/plugins/SMS/src/functions.cpp +++ b/plugins/SMS/src/functions.cpp @@ -163,7 +163,7 @@ BOOL IsContactPhone(MCONTACT hContact, LPWSTR lpwszPhone, size_t dwPhoneSize) size_t dwPhoneSizeLocal = CopyNumberW(wszPhoneLocal, lpwszPhone, dwPhoneSize);
LPSTR lpszProto = GetContactProto(hContact);
if (lpszProto) {
- if (bRet == FALSE) bRet = IsContactPhoneParam(hContact, lpszProto, "Phone", wszPhoneLocal, dwPhoneSizeLocal);
+ bRet = IsContactPhoneParam(hContact, lpszProto, "Phone", wszPhoneLocal, dwPhoneSizeLocal);
if (bRet == FALSE) bRet = IsContactPhoneParam(hContact, lpszProto, "Cellular", wszPhoneLocal, dwPhoneSizeLocal);
if (bRet == FALSE) bRet = IsContactPhoneParam(hContact, lpszProto, "Fax", wszPhoneLocal, dwPhoneSizeLocal);
}
diff --git a/plugins/Scriver/src/tabs.cpp b/plugins/Scriver/src/tabs.cpp index dad688b38a..8792f09ec7 100644 --- a/plugins/Scriver/src/tabs.cpp +++ b/plugins/Scriver/src/tabs.cpp @@ -855,7 +855,7 @@ static INT_PTR CALLBACK DlgProcParentWindow(HWND hwndDlg, UINT msg, WPARAM wPara if (nm->pt.x >= rc.left) {
CScriverWindow *pDlg = GetChildFromHWND(dat, dat->hwndActive);
if (pDlg != nullptr)
- CheckStatusIconClick(pDlg->m_hContact, dat->hwndStatus, nm->pt, rc, 2, (pNMHDR->code == NM_RCLICK ? MBCF_RIGHTBUTTON : 0));
+ CheckStatusIconClick(pDlg->m_hContact, dat->hwndStatus, nm->pt, rc, 2, 0);
}
return TRUE;
}
diff --git a/plugins/UserInfoEx/src/Flags/svc_flags.cpp b/plugins/UserInfoEx/src/Flags/svc_flags.cpp index d0ecb3c5a7..a5352033ab 100644 --- a/plugins/UserInfoEx/src/Flags/svc_flags.cpp +++ b/plugins/UserInfoEx/src/Flags/svc_flags.cpp @@ -219,7 +219,7 @@ void SvcFlagsLoadModule() langid = 1;
char szId[20];
- mir_snprintf(szId, (langid == 0xFFFF) ? "%s_0x%X" : "%s_%i", "flags", langid); /* buffer safe */
+ mir_snprintf(szId, "flags_%i", langid); /* buffer safe */
hExtraIconSvc = ExtraIcon_RegisterIcolib("Flags", LPGEN("Flags (UInfoEx)"), szId);
}
diff --git a/plugins/UserInfoEx/src/psp_profile.cpp b/plugins/UserInfoEx/src/psp_profile.cpp index ab335c58bb..07e2043a1f 100644 --- a/plugins/UserInfoEx/src/psp_profile.cpp +++ b/plugins/UserInfoEx/src/psp_profile.cpp @@ -697,10 +697,7 @@ static LRESULT CALLBACK ProfileList_LabelEditProc(HWND hwnd, UINT msg, WPARAM wP lvi.iSubItem = iSubItem;
lvi.mask = LVIF_PARAM;
do {
- if (wParam == VK_UP)
- lvi.iItem--;
- else
- lvi.iItem++;
+ lvi.iItem++;
if (lvi.iItem == -1 || !ListView_GetItem(pList->hList, &lvi))
return 0;
diff --git a/plugins/WebView/src/webview_cleanup.cpp b/plugins/WebView/src/webview_cleanup.cpp index 9ca77f42c2..9325881d38 100644 --- a/plugins/WebView/src/webview_cleanup.cpp +++ b/plugins/WebView/src/webview_cleanup.cpp @@ -375,8 +375,7 @@ void CodetoSymbol(char *truncated) Sleep(1); // avoid 100% CPU
if ( strstr(truncated, CharacterCodes[n]) != nullptr) { // does character code exist?
- if (strstr(truncated, CharacterCodes[n]) != nullptr)
- stringfrompos = strstr(truncated, CharacterCodes[n]);
+ stringfrompos = strstr(truncated, CharacterCodes[n]);
position = stringfrompos - truncated;
counter = 0;
|