summaryrefslogtreecommitdiff
path: root/plugins/UserInfoEx/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-05-08 20:40:49 +0200
committerGeorge Hazan <ghazan@miranda.im>2018-05-08 20:47:39 +0200
commit6a6f2b9e3b2749f16b513dfc98d5d5038b5628fb (patch)
treef0bc709157a49e0cff4ac436e60c0e098739b00c /plugins/UserInfoEx/src
parentc575dc94be9630240b7377a2e05011630bb8eb1e (diff)
merge from master
Diffstat (limited to 'plugins/UserInfoEx/src')
-rw-r--r--plugins/UserInfoEx/src/ctrl_contact.cpp3
-rw-r--r--plugins/UserInfoEx/src/ex_import/svc_ExImINI.cpp6
-rw-r--r--plugins/UserInfoEx/src/mir_icolib.cpp3
-rw-r--r--plugins/UserInfoEx/src/psp_anniversary.cpp36
-rw-r--r--plugins/UserInfoEx/src/psp_options.cpp6
5 files changed, 31 insertions, 23 deletions
diff --git a/plugins/UserInfoEx/src/ctrl_contact.cpp b/plugins/UserInfoEx/src/ctrl_contact.cpp
index 342a760f11..125b7575d3 100644
--- a/plugins/UserInfoEx/src/ctrl_contact.cpp
+++ b/plugins/UserInfoEx/src/ctrl_contact.cpp
@@ -306,7 +306,8 @@ INT_PTR CALLBACK DlgProc_Phone(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam
if ((int)IsDlgButtonChecked(hDlg, CHECK_SMS) != ((cbi->wFlags & CBEXIF_SMS) == CBEXIF_SMS))
cbi->wFlags ^= CBEXIF_SMS;
}
- //fall through
+ __fallthrough;
+
case IDCANCEL:
if (HIWORD(wParam) == BN_CLICKED)
EndDialog(hDlg, wParam);
diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImINI.cpp b/plugins/UserInfoEx/src/ex_import/svc_ExImINI.cpp
index 1b7b7b3a76..8be503a6db 100644
--- a/plugins/UserInfoEx/src/ex_import/svc_ExImINI.cpp
+++ b/plugins/UserInfoEx/src/ex_import/svc_ExImINI.cpp
@@ -230,13 +230,15 @@ static DWORD ImportreadLine(FILE* file, LPSTR &str)
case ';':
// found a comment line
bComment |= (l == 0);
- // fall through
+ __fallthrough;
+
case '\t':
case ' ':
// ignore space and tab at the beginning of the line
if (l == 0)
break;
- // fall through
+ __fallthrough;
+
default:
if (!bComment) {
str = mir_strncat_c(str, c);
diff --git a/plugins/UserInfoEx/src/mir_icolib.cpp b/plugins/UserInfoEx/src/mir_icolib.cpp
index a197d9d27c..3c3ed95943 100644
--- a/plugins/UserInfoEx/src/mir_icolib.cpp
+++ b/plugins/UserInfoEx/src/mir_icolib.cpp
@@ -193,7 +193,8 @@ void IcoLib_SetCtrlIcons(HWND hDlg, const ICONCTRL *pCtrl, BYTE numCtrls)
case STM_SETICON:
case STM_SETIMAGE:
ShowWindow(hCtrl, hIcon ? SW_SHOW : SW_HIDE);
- // fall through
+ __fallthrough;
+
case BM_SETIMAGE:
SendMessage(hCtrl, pCtrl[i].Message, IMAGE_ICON, (LPARAM)hIcon);
}
diff --git a/plugins/UserInfoEx/src/psp_anniversary.cpp b/plugins/UserInfoEx/src/psp_anniversary.cpp
index fb51299823..f4f3b89427 100644
--- a/plugins/UserInfoEx/src/psp_anniversary.cpp
+++ b/plugins/UserInfoEx/src/psp_anniversary.cpp
@@ -71,26 +71,28 @@ static INT_PTR CALLBACK DlgProc_AnniversaryEditor(HWND hDlg, UINT uMsg, WPARAM w
EnableWindow(GetDlgItem(hDlg, IDOK), GetWindowTextLength((HWND)lParam) > 0);
break;
- case IDOK: {
- // read new description
- HWND hEdit = GetDlgItem(hDlg, EDIT_CATEGORY);
- int len = Edit_GetTextLength(hEdit);
- LPTSTR pszText;
-
- if (len == 0
- || (pszText = (LPTSTR)_alloca((len + 1) * sizeof(wchar_t))) == nullptr
- || !Edit_GetText(hEdit, pszText, len + 1))
+ case IDOK:
{
- MsgErr(hDlg, LPGENW("Please enter a valid description first!"));
- break;
- }
+ // read new description
+ HWND hEdit = GetDlgItem(hDlg, EDIT_CATEGORY);
+ int len = Edit_GetTextLength(hEdit);
+ LPTSTR pszText;
+
+ if (len == 0
+ || (pszText = (LPTSTR)_alloca((len + 1) * sizeof(wchar_t))) == nullptr
+ || !Edit_GetText(hEdit, pszText, len + 1))
+ {
+ MsgErr(hDlg, LPGENW("Please enter a valid description first!"));
+ break;
+ }
- if (mir_wstrcmpi(pszText, pDlgEditAnniv->Description())) {
- pDlgEditAnniv->Description(pszText);
- pDlgEditAnniv->SetFlags(MAnnivDate::MADF_HASCUSTOM | MAnnivDate::MADF_CHANGED);
+ if (mir_wstrcmpi(pszText, pDlgEditAnniv->Description())) {
+ pDlgEditAnniv->Description(pszText);
+ pDlgEditAnniv->SetFlags(MAnnivDate::MADF_HASCUSTOM | MAnnivDate::MADF_CHANGED);
+ }
}
- }
- // fall through
+ __fallthrough;
+
case IDCANCEL:
return EndDialog(hDlg, LOWORD(wParam));
diff --git a/plugins/UserInfoEx/src/psp_options.cpp b/plugins/UserInfoEx/src/psp_options.cpp
index 057bc4c325..8c98ef6c57 100644
--- a/plugins/UserInfoEx/src/psp_options.cpp
+++ b/plugins/UserInfoEx/src/psp_options.cpp
@@ -554,7 +554,8 @@ static INT_PTR CALLBACK DlgProc_DetailsDlgOpts(HWND hDlg, UINT uMsg, WPARAM wPar
EnableControls(hDlg, idCtrl, _countof(idCtrl), bChecked);
}
- // fall through
+ __fallthrough;
+
case CHECK_OPT_GROUPS:
case CHECK_OPT_SORTTREE:
case CHECK_OPT_AEROADAPTION:
@@ -707,7 +708,8 @@ static INT_PTR CALLBACK DlgProc_ReminderOpts(HWND hDlg, UINT uMsg, WPARAM wParam
EnableControls(hDlg, idCtrl, _countof(idCtrl), bEnabled);
}
- // fall through
+ __fallthrough;
+
case EDIT_BIRTHMODULE:
if (bInitialized && HIWORD(wParam) == CBN_SELCHANGE)
NotifyParentOfChange(hDlg);