summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/BasicHistory/src/HistoryWindow.cpp2
-rw-r--r--plugins/Clist_nicer/src/coolscroll.cpp2
-rw-r--r--plugins/DbEditorPP/src/copymodule.cpp3
-rw-r--r--plugins/DbEditorPP/src/deletemodule.cpp5
-rw-r--r--plugins/DbEditorPP/src/exportimport.cpp3
-rw-r--r--plugins/DbEditorPP/src/renamemodule.cpp3
-rw-r--r--plugins/DbEditorPP/src/settinglist.cpp13
-rw-r--r--plugins/DbEditorPP/src/settingsdlg.cpp3
-rw-r--r--plugins/MenuItemEx/src/main.cpp6
-rw-r--r--plugins/PluginUpdater/src/Options.cpp3
-rw-r--r--plugins/Scriver/src/chat_window.cpp4
-rw-r--r--plugins/Scriver/src/msgdialog.cpp2
-rw-r--r--plugins/Scriver/src/msglog.cpp3
-rw-r--r--plugins/TabSRMM/src/chat_main.cpp2
-rw-r--r--plugins/TabSRMM/src/chat_options.cpp68
-rw-r--r--plugins/TabSRMM/src/chat_window.cpp4
-rw-r--r--plugins/TabSRMM/src/msgdialog.cpp2
-rw-r--r--plugins/TabSRMM/src/msglog.cpp2
-rw-r--r--plugins/TipperYM/src/options.cpp10
-rw-r--r--plugins/TopToolBar/src/toolbarwnd.cpp2
-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
-rw-r--r--plugins/Variables/src/help.cpp2
-rw-r--r--plugins/Weather/src/weather_contacts.cpp6
-rw-r--r--plugins/Weather/src/weather_ini.cpp3
-rw-r--r--plugins/YAMN/src/browser/mailbrowser.cpp3
-rw-r--r--protocols/FacebookRM/src/communication.cpp2
-rw-r--r--protocols/JabberG/src/jabber_bookmarks.cpp3
-rw-r--r--protocols/JabberG/src/jabber_chat.cpp6
-rw-r--r--protocols/JabberG/src/jabber_disco.cpp2
-rw-r--r--protocols/JabberG/src/jabber_form.cpp3
-rwxr-xr-xprotocols/JabberG/src/jabber_userinfo.cpp2
-rw-r--r--protocols/JabberG/src/jabber_vcard.cpp39
-rw-r--r--protocols/MRA/src/MraPopUp.cpp3
-rw-r--r--protocols/MSN/src/msn_chat.cpp3
-rw-r--r--protocols/VKontakte/src/misc.cpp3
-rw-r--r--src/core/stdmsg/res/resource.rc4
-rw-r--r--src/core/stdmsg/src/chat_manager.cpp4
-rw-r--r--src/core/stdmsg/src/chat_window.cpp2
-rw-r--r--src/core/stdmsg/src/msgdialog.cpp17
-rw-r--r--src/core/stdmsg/src/msglog.cpp3
-rw-r--r--src/core/stdmsg/src/msgoptions.cpp22
-rw-r--r--src/core/stdmsg/src/msgs.cpp21
-rw-r--r--src/core/stdmsg/src/stdafx.h1
-rw-r--r--src/core/stdmsg/src/tabs.cpp4
-rw-r--r--src/core/stduserinfo/src/contactinfo.cpp10
-rw-r--r--src/mir_app/src/FontOptions.cpp74
-rw-r--r--src/mir_app/src/FontService.cpp27
-rw-r--r--src/mir_app/src/chat_opts.cpp3
-rw-r--r--src/mir_app/src/clui.cpp3
-rw-r--r--src/mir_app/src/findadd.cpp2
-rw-r--r--src/mir_app/src/ignore.cpp2
-rw-r--r--src/mir_app/src/netliblog.cpp3
-rw-r--r--src/mir_app/src/visibility.cpp3
-rw-r--r--tools/build_scripts/bin15/z3_PackArchives.txt3
-rw-r--r--tools/build_scripts/z2_PackPluginUpdater.txt88
59 files changed, 320 insertions, 252 deletions
diff --git a/plugins/BasicHistory/src/HistoryWindow.cpp b/plugins/BasicHistory/src/HistoryWindow.cpp
index 8425368ad1..25f8cd4f7a 100644
--- a/plugins/BasicHistory/src/HistoryWindow.cpp
+++ b/plugins/BasicHistory/src/HistoryWindow.cpp
@@ -594,8 +594,8 @@ INT_PTR CALLBACK HistoryWindow::DlgProcHistory(HWND hwndDlg, UINT msg, WPARAM wP
ResetCList(hwndDlg);
return FALSE;
}
+ __fallthrough;
- //fall through
case IDC_SHOWHIDE:
case IDC_FIND_TEXT:
case IDC_EDIT:
diff --git a/plugins/Clist_nicer/src/coolscroll.cpp b/plugins/Clist_nicer/src/coolscroll.cpp
index 9e2ea12830..0d6b91aa0e 100644
--- a/plugins/Clist_nicer/src/coolscroll.cpp
+++ b/plugins/Clist_nicer/src/coolscroll.cpp
@@ -1190,7 +1190,7 @@ static UINT DrawScrollButton(SCROLLBUT *sbut, HDC hdc, const RECT *pctrl, UINT f
if (sbut->uState != SBBS_NORMAL)
flags |= SBBS_PUSHED;
- //intentionally fall through here...
+ __fallthrough;
case SBBT_PUSHBUTTON:
diff --git a/plugins/DbEditorPP/src/copymodule.cpp b/plugins/DbEditorPP/src/copymodule.cpp
index 5ca149ee4e..052b6fd8d5 100644
--- a/plugins/DbEditorPP/src/copymodule.cpp
+++ b/plugins/DbEditorPP/src/copymodule.cpp
@@ -67,7 +67,8 @@ INT_PTR CALLBACK copyModDlgProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPar
SetCursor(LoadCursor(nullptr, IDC_ARROW));
}
refreshTree(1);
- // fall through
+ __fallthrough;
+
case IDCANCEL:
mir_free(mac);
DestroyWindow(hwnd);
diff --git a/plugins/DbEditorPP/src/deletemodule.cpp b/plugins/DbEditorPP/src/deletemodule.cpp
index 4b07c0519b..2c08c762e4 100644
--- a/plugins/DbEditorPP/src/deletemodule.cpp
+++ b/plugins/DbEditorPP/src/deletemodule.cpp
@@ -90,7 +90,6 @@ INT_PTR CALLBACK DeleteModuleDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM)
case WM_COMMAND:
switch (LOWORD(wParam)) {
case IDOK:
- {
char module[FLD_SIZE];
GetDlgItemTextA(hwnd, IDC_CONTACTS, module, _countof(module));
SetCursor(LoadCursor(nullptr, IDC_WAIT));
@@ -101,8 +100,8 @@ INT_PTR CALLBACK DeleteModuleDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM)
deleteModule(NULL, module, 0);
SetCursor(LoadCursor(nullptr, IDC_ARROW));
refreshTree(1);
- }
- // fall through
+ __fallthrough;
+
case IDCANCEL:
if (working == 1) {
working = 0;
diff --git a/plugins/DbEditorPP/src/exportimport.cpp b/plugins/DbEditorPP/src/exportimport.cpp
index b7a404c980..425abae95a 100644
--- a/plugins/DbEditorPP/src/exportimport.cpp
+++ b/plugins/DbEditorPP/src/exportimport.cpp
@@ -390,7 +390,8 @@ void importSettings(MCONTACT hContact, char *utf8)
memmove(pstr + 1, pstr + 2, mir_strlen(pstr + 2) + 1);
}
}
- // fall through - write it to database
+ __fallthrough; // write it to database
+
case 'u':
case 'U':
db_set_utf(hContact, module, setting, (end + 2));
diff --git a/plugins/DbEditorPP/src/renamemodule.cpp b/plugins/DbEditorPP/src/renamemodule.cpp
index f242fe5f1f..89122b9b39 100644
--- a/plugins/DbEditorPP/src/renamemodule.cpp
+++ b/plugins/DbEditorPP/src/renamemodule.cpp
@@ -51,7 +51,8 @@ static INT_PTR CALLBACK AddModDlgProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARA
refreshTree(1);
}
- // fall through
+ __fallthrough;
+
case IDCANCEL:
DestroyWindow(hwnd);
break;
diff --git a/plugins/DbEditorPP/src/settinglist.cpp b/plugins/DbEditorPP/src/settinglist.cpp
index 26f5a6f9f7..aaa8591c8b 100644
--- a/plugins/DbEditorPP/src/settinglist.cpp
+++ b/plugins/DbEditorPP/src/settinglist.cpp
@@ -62,11 +62,13 @@ int convertSetting(MCONTACT hContact, const char *module, const char *setting, i
case DBVT_WCHAR:
if (!value)
value = mir_wstrdup(dbv.pwszVal);
- // fall through
+ __fallthrough;
+
case DBVT_UTF8:
if (!value)
value = mir_utf8decodeW(dbv.pszVal);
- // fall through
+ __fallthrough;
+
case DBVT_ASCIIZ:
if (!value)
value = mir_a2u(dbv.pszVal);
@@ -519,7 +521,8 @@ static LRESULT CALLBACK SettingLabelEditSubClassProc(HWND hwnd, UINT msg, WPARAM
case '0':
i = 1;
- // fall through
+ __fallthrough;
+
case '1':
case '2':
case '3':
@@ -579,8 +582,8 @@ static LRESULT CALLBACK SettingLabelEditSubClassProc(HWND hwnd, UINT msg, WPARAM
msg(TranslateT("Unable to store value in this data type!"));
break;
}
-
- } // fall through
+ }
+ __fallthrough;
case IDCANCEL:
DestroyWindow(hwnd);
diff --git a/plugins/DbEditorPP/src/settingsdlg.cpp b/plugins/DbEditorPP/src/settingsdlg.cpp
index 30ddd1b373..10201f6965 100644
--- a/plugins/DbEditorPP/src/settingsdlg.cpp
+++ b/plugins/DbEditorPP/src/settingsdlg.cpp
@@ -247,7 +247,8 @@ INT_PTR CALLBACK EditSettingDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l
db_unset(dbsetting->hContact, dbsetting->module, dbsetting->setting);
}
- } // fall through
+ }
+ __fallthrough;
case IDCANCEL:
struct DBsetting *dbsetting = (struct DBsetting*)GetWindowLongPtr(hwnd, GWLP_USERDATA);
diff --git a/plugins/MenuItemEx/src/main.cpp b/plugins/MenuItemEx/src/main.cpp
index 29a0aa89df..0a14892c56 100644
--- a/plugins/MenuItemEx/src/main.cpp
+++ b/plugins/MenuItemEx/src/main.cpp
@@ -389,11 +389,11 @@ static INT_PTR CALLBACK AuthReqWndProc(HWND hdlg, UINT msg, WPARAM wparam, LPARA
case WM_COMMAND:
switch (LOWORD(wparam)) {
case IDOK:
- {
- wchar_t tszReason[256] = { 0 };
+ wchar_t tszReason[256];
GetDlgItemText(hdlg, IDC_REASON, tszReason, _countof(tszReason));
ProtoChainSend(hcontact, PSS_AUTHREQUEST, 0, (LPARAM)tszReason);
- } // fall through
+ __fallthrough;
+
case IDCANCEL:
DestroyWindow(hdlg);
break;
diff --git a/plugins/PluginUpdater/src/Options.cpp b/plugins/PluginUpdater/src/Options.cpp
index 660b676d07..b8bbc5363c 100644
--- a/plugins/PluginUpdater/src/Options.cpp
+++ b/plugins/PluginUpdater/src/Options.cpp
@@ -161,7 +161,8 @@ static INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wPar
switch (LOWORD(wParam)) {
case IDC_UPDATEONSTARTUP:
EnableWindow(GetDlgItem(hwndDlg, IDC_ONLYONCEADAY), IsDlgButtonChecked(hwndDlg, IDC_UPDATEONSTARTUP));
- // fall through
+ __fallthrough;
+
case IDC_SILENTMODE:
case IDC_ONLYONCEADAY:
case IDC_BACKUP:
diff --git a/plugins/Scriver/src/chat_window.cpp b/plugins/Scriver/src/chat_window.cpp
index 5021e20fb0..7331033f84 100644
--- a/plugins/Scriver/src/chat_window.cpp
+++ b/plugins/Scriver/src/chat_window.cpp
@@ -915,7 +915,7 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
tcd.iFlags = TCDF_TEXT;
tcd.pszText = m_si->ptszName;
SendMessage(m_hwndParent, CM_UPDATETABCONTROL, (WPARAM)&tcd, (LPARAM)m_hwnd);
- // fall through
+ __fallthrough;
case DM_ACTIVATE:
if (m_si->wState & STATE_TALK) {
@@ -1012,7 +1012,7 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
if (LOWORD(wParam) != WA_ACTIVE)
break;
- // fall through
+ __fallthrough;
case WM_MOUSEACTIVATE:
if (uMsg != WM_ACTIVATE)
SetFocus(m_message.GetHwnd());
diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp
index 214c915608..faddf76067 100644
--- a/plugins/Scriver/src/msgdialog.cpp
+++ b/plugins/Scriver/src/msgdialog.cpp
@@ -1302,7 +1302,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam)
if (LOWORD(wParam) != WA_ACTIVE)
break;
- //fall through
+ __fallthrough;
case WM_MOUSEACTIVATE:
if (m_hDbUnreadEventFirst != 0) {
MEVENT hDbEvent = m_hDbUnreadEventFirst;
diff --git a/plugins/Scriver/src/msglog.cpp b/plugins/Scriver/src/msglog.cpp
index f388f9eae8..f594b637c1 100644
--- a/plugins/Scriver/src/msglog.cpp
+++ b/plugins/Scriver/src/msglog.cpp
@@ -695,7 +695,8 @@ static DWORD CALLBACK LogStreamInEvents(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG
break;
dat->stage = STREAMSTAGE_TAIL;
- //fall through
+ __fallthrough;
+
case STREAMSTAGE_TAIL:
dat->buffer = CreateRTFTail();
dat->stage = STREAMSTAGE_STOP;
diff --git a/plugins/TabSRMM/src/chat_main.cpp b/plugins/TabSRMM/src/chat_main.cpp
index 16bce15921..383267c89a 100644
--- a/plugins/TabSRMM/src/chat_main.cpp
+++ b/plugins/TabSRMM/src/chat_main.cpp
@@ -216,7 +216,7 @@ int Chat_Load()
CheckUpdate();
Utils::RTF_CTableInit();
- CHAT_MANAGER_INITDATA data = { &g_Settings, sizeof(MODULEINFO), sizeof(SESSION_INFO), LPGENW("Message Sessions") L"/" LPGENW("Group chats"), FONTMODE_ALTER };
+ CHAT_MANAGER_INITDATA data = { &g_Settings, sizeof(MODULEINFO), sizeof(SESSION_INFO), LPGENW("Message sessions") L"/" LPGENW("Group chats"), FONTMODE_ALTER };
pci = Chat_GetInterface(&data);
pci->OnCreateModule = OnCreateModule;
diff --git a/plugins/TabSRMM/src/chat_options.cpp b/plugins/TabSRMM/src/chat_options.cpp
index 49d8027208..613588c0e7 100644
--- a/plugins/TabSRMM/src/chat_options.cpp
+++ b/plugins/TabSRMM/src/chat_options.cpp
@@ -58,34 +58,34 @@ struct ColorOptionsList
* (GetSysColor(default_color & 0x00ffffff)), not a rgb value.
*/
static ColorOptionsList _clrs[] = {
- { 0, LPGENW("Message Sessions"), LPGENW("Input area background"), "inputbg", SRMSGDEFSET_BKGCOLOUR },
- { 1, LPGENW("Message Sessions"), LPGENW("Log background"), SRMSGSET_BKGCOLOUR, SRMSGDEFSET_BKGCOLOUR },
- { 0, LPGENW("Message Sessions") L"/" LPGENW("Single Messaging"), LPGENW("Outgoing background"), "outbg", SRMSGDEFSET_BKGOUTCOLOUR },
- { 1, LPGENW("Message Sessions") L"/" LPGENW("Single Messaging"), LPGENW("Incoming background"), "inbg", SRMSGDEFSET_BKGINCOLOUR },
- { 2, LPGENW("Message Sessions") L"/" LPGENW("Single Messaging"), LPGENW("Status background"), "statbg", SRMSGDEFSET_BKGCOLOUR },
- { 3, LPGENW("Message Sessions") L"/" LPGENW("Single Messaging"), LPGENW("Incoming background(old)"), "oldinbg", SRMSGDEFSET_BKGINCOLOUR },
- { 4, LPGENW("Message Sessions") L"/" LPGENW("Single Messaging"), LPGENW("Outgoing background(old)"), "oldoutbg", SRMSGDEFSET_BKGOUTCOLOUR },
- { 5, LPGENW("Message Sessions") L"/" LPGENW("Single Messaging"), LPGENW("Horizontal Grid Lines"), "hgrid", RGB(224, 224, 224) },
- { 0, LPGENW("Message Sessions") L"/" LPGENW("Info Panel"), LPGENW("Panel background low"), "ipfieldsbg", 0x62caff },
- { 1, LPGENW("Message Sessions") L"/" LPGENW("Info Panel"), LPGENW("Panel background high"), "ipfieldsbgHigh", 0xf0f0f0 },
- { 0, LPGENW("Message Sessions") L"/" LPGENW("Common colors"), LPGENW("Toolbar background high"), "tbBgHigh", 0 },
- { 1, LPGENW("Message Sessions") L"/" LPGENW("Common colors"), LPGENW("Toolbar background low"), "tbBgLow", 0 },
- { 2, LPGENW("Message Sessions") L"/" LPGENW("Common colors"), LPGENW("Window fill color"), "fillColor", 0 },
- { 3, LPGENW("Message Sessions") L"/" LPGENW("Common colors"), LPGENW("Text area borders"), "cRichBorders", 0 },
- { 4, LPGENW("Message Sessions") L"/" LPGENW("Common colors"), LPGENW("Aero glow effect"), "aeroGlow", RGB(40, 40, 255) },
- { 4, LPGENW("Message Sessions") L"/" LPGENW("Common colors"), LPGENW("Generic text color (only when fill color is set)"), "genericTxtClr", 0xff000000 | COLOR_BTNTEXT },
+ { 0, LPGENW("Message sessions"), LPGENW("Input area background"), "inputbg", SRMSGDEFSET_BKGCOLOUR },
+ { 1, LPGENW("Message sessions"), LPGENW("Log background"), SRMSGSET_BKGCOLOUR, SRMSGDEFSET_BKGCOLOUR },
+ { 0, LPGENW("Message sessions") L"/" LPGENW("Single Messaging"), LPGENW("Outgoing background"), "outbg", SRMSGDEFSET_BKGOUTCOLOUR },
+ { 1, LPGENW("Message sessions") L"/" LPGENW("Single Messaging"), LPGENW("Incoming background"), "inbg", SRMSGDEFSET_BKGINCOLOUR },
+ { 2, LPGENW("Message sessions") L"/" LPGENW("Single Messaging"), LPGENW("Status background"), "statbg", SRMSGDEFSET_BKGCOLOUR },
+ { 3, LPGENW("Message sessions") L"/" LPGENW("Single Messaging"), LPGENW("Incoming background(old)"), "oldinbg", SRMSGDEFSET_BKGINCOLOUR },
+ { 4, LPGENW("Message sessions") L"/" LPGENW("Single Messaging"), LPGENW("Outgoing background(old)"), "oldoutbg", SRMSGDEFSET_BKGOUTCOLOUR },
+ { 5, LPGENW("Message sessions") L"/" LPGENW("Single Messaging"), LPGENW("Horizontal Grid Lines"), "hgrid", RGB(224, 224, 224) },
+ { 0, LPGENW("Message sessions") L"/" LPGENW("Info Panel"), LPGENW("Panel background low"), "ipfieldsbg", 0x62caff },
+ { 1, LPGENW("Message sessions") L"/" LPGENW("Info Panel"), LPGENW("Panel background high"), "ipfieldsbgHigh", 0xf0f0f0 },
+ { 0, LPGENW("Message sessions") L"/" LPGENW("Common colors"), LPGENW("Toolbar background high"), "tbBgHigh", 0 },
+ { 1, LPGENW("Message sessions") L"/" LPGENW("Common colors"), LPGENW("Toolbar background low"), "tbBgLow", 0 },
+ { 2, LPGENW("Message sessions") L"/" LPGENW("Common colors"), LPGENW("Window fill color"), "fillColor", 0 },
+ { 3, LPGENW("Message sessions") L"/" LPGENW("Common colors"), LPGENW("Text area borders"), "cRichBorders", 0 },
+ { 4, LPGENW("Message sessions") L"/" LPGENW("Common colors"), LPGENW("Aero glow effect"), "aeroGlow", RGB(40, 40, 255) },
+ { 4, LPGENW("Message sessions") L"/" LPGENW("Common colors"), LPGENW("Generic text color (only when fill color is set)"), "genericTxtClr", 0xff000000 | COLOR_BTNTEXT },
};
static ColorOptionsList _tabclrs[] = {
- { 0, LPGENW("Message Sessions") L"/" LPGENW("Tabs"), LPGENW("Normal text"), "tab_txt_normal", 0xff000000 | COLOR_BTNTEXT },
- { 1, LPGENW("Message Sessions") L"/" LPGENW("Tabs"), LPGENW("Active text"), "tab_txt_active", 0xff000000 | COLOR_BTNTEXT },
- { 2, LPGENW("Message Sessions") L"/" LPGENW("Tabs"), LPGENW("Hovered text"), "tab_txt_hottrack", 0xff000000 | COLOR_HOTLIGHT },
- { 3, LPGENW("Message Sessions") L"/" LPGENW("Tabs"), LPGENW("Unread text"), "tab_txt_unread", 0xff000000 | COLOR_HOTLIGHT },
-
- { 4, LPGENW("Message Sessions") L"/" LPGENW("Tabs"), LPGENW("Normal background"), "tab_bg_normal", 0xff000000 | COLOR_3DFACE },
- { 5, LPGENW("Message Sessions") L"/" LPGENW("Tabs"), LPGENW("Active background"), "tab_bg_active", 0xff000000 | COLOR_3DFACE },
- { 6, LPGENW("Message Sessions") L"/" LPGENW("Tabs"), LPGENW("Hovered background"), "tab_bg_hottrack", 0xff000000 | COLOR_3DFACE },
- { 7, LPGENW("Message Sessions") L"/" LPGENW("Tabs"), LPGENW("Unread background"), "tab_bg_unread", 0xff000000 | COLOR_3DFACE }
+ { 0, LPGENW("Message sessions") L"/" LPGENW("Tabs"), LPGENW("Normal text"), "tab_txt_normal", 0xff000000 | COLOR_BTNTEXT },
+ { 1, LPGENW("Message sessions") L"/" LPGENW("Tabs"), LPGENW("Active text"), "tab_txt_active", 0xff000000 | COLOR_BTNTEXT },
+ { 2, LPGENW("Message sessions") L"/" LPGENW("Tabs"), LPGENW("Hovered text"), "tab_txt_hottrack", 0xff000000 | COLOR_HOTLIGHT },
+ { 3, LPGENW("Message sessions") L"/" LPGENW("Tabs"), LPGENW("Unread text"), "tab_txt_unread", 0xff000000 | COLOR_HOTLIGHT },
+
+ { 4, LPGENW("Message sessions") L"/" LPGENW("Tabs"), LPGENW("Normal background"), "tab_bg_normal", 0xff000000 | COLOR_3DFACE },
+ { 5, LPGENW("Message sessions") L"/" LPGENW("Tabs"), LPGENW("Active background"), "tab_bg_active", 0xff000000 | COLOR_3DFACE },
+ { 6, LPGENW("Message sessions") L"/" LPGENW("Tabs"), LPGENW("Hovered background"), "tab_bg_hottrack", 0xff000000 | COLOR_3DFACE },
+ { 7, LPGENW("Message sessions") L"/" LPGENW("Tabs"), LPGENW("Unread background"), "tab_bg_unread", 0xff000000 | COLOR_3DFACE }
};
extern LOGFONT lfDefault;
@@ -506,8 +506,8 @@ void RegisterFontServiceFonts()
fid.deffontsettings.charset = lf.lfCharSet;
fid.flags = fid.flags & ~FIDF_CLASSMASK | (fid.deffontsettings.style&FONTF_BOLD ? FIDF_CLASSHEADER : FIDF_CLASSGENERAL);
wcsncpy(fid.deffontsettings.szFace, lf.lfFaceName, LF_FACESIZE);
- wcsncpy(fid.backgroundGroup, LPGENW("Message Sessions") L"/" LPGENW("Single Messaging"), _countof(fid.backgroundGroup));
- wcsncpy(fid.group, LPGENW("Message Sessions") L"/" LPGENW("Single Messaging"), _countof(fid.group));
+ wcsncpy(fid.backgroundGroup, LPGENW("Message sessions") L"/" LPGENW("Single Messaging"), _countof(fid.backgroundGroup));
+ wcsncpy(fid.group, LPGENW("Message sessions") L"/" LPGENW("Single Messaging"), _countof(fid.group));
switch (i) {
case MSGFONTID_MYMSG:
case 1:
@@ -529,8 +529,8 @@ void RegisterFontServiceFonts()
wcsncpy(fid.backgroundName, LPGENW("Incoming background(old)"), _countof(fid.backgroundName));
break;
case MSGFONTID_MESSAGEAREA:
- wcsncpy(fid.group, LPGENW("Message Sessions"), _countof(fid.group));
- wcsncpy(fid.backgroundGroup, LPGENW("Message Sessions"), _countof(fid.backgroundGroup));
+ wcsncpy(fid.group, LPGENW("Message sessions"), _countof(fid.group));
+ wcsncpy(fid.backgroundGroup, LPGENW("Message sessions"), _countof(fid.backgroundGroup));
wcsncpy(fid.backgroundName, LPGENW("Input area background"), _countof(fid.backgroundName));
break;
case 17:
@@ -539,7 +539,7 @@ void RegisterFontServiceFonts()
wcsncpy(fid.backgroundName, LPGENW("Status background"), _countof(fid.backgroundName));
break;
case 18:
- wcsncpy(fid.backgroundGroup, LPGENW("Message Sessions"), _countof(fid.backgroundGroup));
+ wcsncpy(fid.backgroundGroup, LPGENW("Message sessions"), _countof(fid.backgroundGroup));
wcsncpy(fid.backgroundName, LPGENW("Log background"), _countof(fid.backgroundName));
break;
case 19:
@@ -554,8 +554,8 @@ void RegisterFontServiceFonts()
fontOptionsList = IP_fontOptionsList;
fid.flags = FIDF_DEFAULTVALID | FIDF_ALLOWEFFECTS;
- wcsncpy(fid.group, LPGENW("Message Sessions") L"/" LPGENW("Info Panel"), _countof(fid.group));
- wcsncpy(fid.backgroundGroup, LPGENW("Message Sessions") L"/" LPGENW("Info Panel"), _countof(fid.backgroundGroup));
+ wcsncpy(fid.group, LPGENW("Message sessions") L"/" LPGENW("Info Panel"), _countof(fid.group));
+ wcsncpy(fid.backgroundGroup, LPGENW("Message sessions") L"/" LPGENW("Info Panel"), _countof(fid.backgroundGroup));
wcsncpy(fid.backgroundName, LPGENW("Fields background"), _countof(fid.backgroundName));
for (int i = 0; i < IPFONTCOUNT; i++) {
LoadMsgDlgFont(FONTSECTION_IP, i, &lf, &fontOptionsList[i].colour, FONTMODULE);
@@ -572,12 +572,12 @@ void RegisterFontServiceFonts()
if (i == IPFONTCOUNT - 1) {
wcsncpy(fid.backgroundGroup, L"", _countof(fid.backgroundGroup));
wcsncpy(fid.backgroundName, L"", _countof(fid.backgroundName));
- wcsncpy(fid.group, LPGENW("Message Sessions"), _countof(fid.group));
+ wcsncpy(fid.group, LPGENW("Message sessions"), _countof(fid.group));
}
Font_RegisterW(&fid);
}
- wcsncpy(cid.group, LPGENW("Message Sessions") L"/" LPGENW("Group chats"), _countof(cid.group));
+ wcsncpy(cid.group, LPGENW("Message sessions") L"/" LPGENW("Group chats"), _countof(cid.group));
strncpy(cid.dbSettingsGroup, CHAT_MODULE, _countof(cid.dbSettingsGroup));
for (int i = 0; i <= 7; i++) {
mir_snprintf(cid.setting, "NickColor%d", i);
diff --git a/plugins/TabSRMM/src/chat_window.cpp b/plugins/TabSRMM/src/chat_window.cpp
index bf86bd245e..da2636eccf 100644
--- a/plugins/TabSRMM/src/chat_window.cpp
+++ b/plugins/TabSRMM/src/chat_window.cpp
@@ -1388,7 +1388,7 @@ LRESULT CChatRoomDlg::WndProc_Message(UINT msg, WPARAM wParam, LPARAM lParam)
m_iLastEnterTime = 0;
return 0;
}
- // fall through
+ __fallthrough;
case WM_LBUTTONDOWN:
case WM_MBUTTONDOWN:
@@ -1936,7 +1936,7 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
m_pContainer->hwndSaved = nullptr;
break;
}
- // fall through
+ __fallthrough;
case WM_MOUSEACTIVATE:
UpdateWindowState(WM_ACTIVATE);
diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp
index 41a908d09c..be9485c0e8 100644
--- a/plugins/TabSRMM/src/msgdialog.cpp
+++ b/plugins/TabSRMM/src/msgdialog.cpp
@@ -2472,7 +2472,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
case WM_ACTIVATE:
if (LOWORD(wParam) != WA_ACTIVE)
break;
- // fall through
+ __fallthrough;
case WM_MOUSEACTIVATE:
MsgWindowUpdateState(WM_ACTIVATE);
diff --git a/plugins/TabSRMM/src/msglog.cpp b/plugins/TabSRMM/src/msglog.cpp
index c4c0ac3a40..e083b545fd 100644
--- a/plugins/TabSRMM/src/msglog.cpp
+++ b/plugins/TabSRMM/src/msglog.cpp
@@ -1032,8 +1032,8 @@ static DWORD CALLBACK LogStreamInEvents(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG
break;
}
dat->stage = STREAMSTAGE_TAIL;
+ __fallthrough;
- // fall through
case STREAMSTAGE_TAIL:
mir_free(dat->buffer);
dat->buffer = CreateRTFTail();
diff --git a/plugins/TipperYM/src/options.cpp b/plugins/TipperYM/src/options.cpp
index 13cf5ad354..67de4e4143 100644
--- a/plugins/TipperYM/src/options.cpp
+++ b/plugins/TipperYM/src/options.cpp
@@ -1876,7 +1876,7 @@ INT_PTR CALLBACK DlgProcFavouriteContacts(HWND hwndDlg, UINT msg, WPARAM wParam,
db_set_dw(0, MODULE, "FavContFlags", opt.iFavoriteContFlags);
}
- // fall through
+ __fallthrough;
case IDC_BTN_CANCEL:
DestroyWindow(hwndDlg);
@@ -1943,8 +1943,8 @@ INT_PTR CALLBACK DlgProcOptsTraytip(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
case IDC_CHK_ENABLETRAYTIP:
state = IsDlgButtonChecked(hwndDlg, IDC_CHK_ENABLETRAYTIP);
EnableWindow(GetDlgItem(hwndDlg, IDC_CHK_HANDLEBYTIPPER), state);
- // fall through
-
+ __fallthrough;
+
case IDC_CHK_HANDLEBYTIPPER:
state = IsDlgButtonChecked(hwndDlg, IDC_CHK_HANDLEBYTIPPER) & IsDlgButtonChecked(hwndDlg, IDC_CHK_ENABLETRAYTIP);
@@ -1953,8 +1953,8 @@ INT_PTR CALLBACK DlgProcOptsTraytip(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
EnableWindow(GetDlgItem(hwndDlg, IDC_TREE_FIRST_ITEMS), state);
EnableWindow(GetDlgItem(hwndDlg, IDC_BTN_FAVCONTACTS), state);
EnableWindow(GetDlgItem(hwndDlg, IDC_CHK_EXPAND), state);
- // fall through
-
+ __fallthrough;
+
case IDC_CHK_EXPAND:
state = IsDlgButtonChecked(hwndDlg, IDC_CHK_HANDLEBYTIPPER)
& IsDlgButtonChecked(hwndDlg, IDC_CHK_ENABLETRAYTIP)
diff --git a/plugins/TopToolBar/src/toolbarwnd.cpp b/plugins/TopToolBar/src/toolbarwnd.cpp
index e0faf32262..332585f4f1 100644
--- a/plugins/TopToolBar/src/toolbarwnd.cpp
+++ b/plugins/TopToolBar/src/toolbarwnd.cpp
@@ -138,7 +138,7 @@ LRESULT CALLBACK TopToolBarProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara
supressRepos = false;
break;
}
- // fall through
+ __fallthrough;
case TTB_REPOSBUTTONS:
if (g_ctrl->hWnd == hwnd) {
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);
diff --git a/plugins/Variables/src/help.cpp b/plugins/Variables/src/help.cpp
index a605833839..59fd3b5170 100644
--- a/plugins/Variables/src/help.cpp
+++ b/plugins/Variables/src/help.cpp
@@ -952,7 +952,7 @@ static INT_PTR CALLBACK helpDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM l
}
dat->vhs->fi->hContact = (MCONTACT)SendMessage(hwndDlg, VARM_GETSUBJECT, 0, 0);
}
- // fall through
+ __fallthrough;
case IDC_CANCEL:
if (GetParent(hwndDlg) == nullptr)
diff --git a/plugins/Weather/src/weather_contacts.cpp b/plugins/Weather/src/weather_contacts.cpp
index 2348e9b69b..c770ebd5d0 100644
--- a/plugins/Weather/src/weather_contacts.cpp
+++ b/plugins/Weather/src/weather_contacts.cpp
@@ -260,7 +260,8 @@ static INT_PTR CALLBACK DlgProcChange(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
EnableWindow(GetDlgItem(hwndDlg, IDC_BROWSE), (BYTE)IsDlgButtonChecked(hwndDlg, IDC_External));
if (!(BYTE)IsDlgButtonChecked(hwndDlg, IDC_External))
return TRUE;
- // fall through
+ __fallthrough;
+
case IDC_BROWSE:
// browse for the external log file
GetDlgItemText(hwndDlg, IDC_LOG, str, _countof(str));
@@ -374,7 +375,8 @@ static INT_PTR CALLBACK DlgProcChange(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
// re-enable the protocol and update the data for the station
db_set_s(hContact, WEATHERPROTONAME, "LastCondition", "None");
UpdateSingleStation(hContact, 0);
- // fall through
+ __fallthrough;
+
case IDCANCEL:
// remove the dialog from window list and close it
DestroyWindow(hwndDlg);
diff --git a/plugins/Weather/src/weather_ini.cpp b/plugins/Weather/src/weather_ini.cpp
index 994f80ce11..5e1caf5cef 100644
--- a/plugins/Weather/src/weather_ini.cpp
+++ b/plugins/Weather/src/weather_ini.cpp
@@ -199,7 +199,8 @@ static INT_PTR CALLBACK DlgProcSetup(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
case IDC_STEP4:
WeatherAdd(0, 0);
- // fall through
+ __fallthrough;
+
case IDCANCEL:
// close the info window
DestroyWindow(hwndDlg);
diff --git a/plugins/YAMN/src/browser/mailbrowser.cpp b/plugins/YAMN/src/browser/mailbrowser.cpp
index 60ca3431e3..b5ffce0881 100644
--- a/plugins/YAMN/src/browser/mailbrowser.cpp
+++ b/plugins/YAMN/src/browser/mailbrowser.cpp
@@ -845,7 +845,8 @@ LRESULT CALLBACK NewMailPopupProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPa
if ((Account->NewMailN.Flags & YAMN_ACC_CONT) && !(Account->NewMailN.Flags & YAMN_ACC_CONTNOEVENT))
pcli->pfnRemoveEvent(hContact, hContact);
}
- // fall through
+ __fallthrough;
+
case WM_CONTEXTMENU:
PUDeletePopup(hWnd);
break;
diff --git a/protocols/FacebookRM/src/communication.cpp b/protocols/FacebookRM/src/communication.cpp
index de12e9075f..dbec3c4e32 100644
--- a/protocols/FacebookRM/src/communication.cpp
+++ b/protocols/FacebookRM/src/communication.cpp
@@ -556,7 +556,7 @@ bool facebook_client::login(const char *username, const char *password)
error = utils::text::slashu_to_utf8(utils::text::source_get_value(&resp.data, 2, "<strong>", "</strong"));
loginError(parent, error);
}
- // fall through
+ __fallthrough;
case HTTP_CODE_FORBIDDEN: // Forbidden
case HTTP_CODE_NOT_FOUND: // Not Found
diff --git a/protocols/JabberG/src/jabber_bookmarks.cpp b/protocols/JabberG/src/jabber_bookmarks.cpp
index bceb2b9689..1838665de4 100644
--- a/protocols/JabberG/src/jabber_bookmarks.cpp
+++ b/protocols/JabberG/src/jabber_bookmarks.cpp
@@ -137,7 +137,8 @@ static INT_PTR CALLBACK JabberAddBookmarkDlgProc(HWND hwndDlg, UINT msg, WPARAM
param->ppro->SetBookmarkRequest(iq);
param->ppro->m_ThreadInfo->send(iq);
}
- // fall through
+ __fallthrough;
+
case IDCANCEL:
EndDialog(hwndDlg, 0);
break;
diff --git a/protocols/JabberG/src/jabber_chat.cpp b/protocols/JabberG/src/jabber_chat.cpp
index c7a739b642..142fe7b535 100644
--- a/protocols/JabberG/src/jabber_chat.cpp
+++ b/protocols/JabberG/src/jabber_chat.cpp
@@ -1292,10 +1292,10 @@ static void sttLogListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK* g
szTitle.Format(TranslateT("Reason to destroy %s"), gch->ptszID);
if (ppro->EnterString(szBuffer, szTitle, ESF_MULTILINE, "gcReason_"))
ppro->m_ThreadInfo->send(
- XmlNodeIq(L"set", ppro->SerialNext(), gch->ptszID) << XQUERY(JABBER_FEAT_MUC_OWNER)
- << XCHILD(L"destroy") << XCHILD(L"reason", szBuffer));
+ XmlNodeIq(L"set", ppro->SerialNext(), gch->ptszID) << XQUERY(JABBER_FEAT_MUC_OWNER)
+ << XCHILD(L"destroy") << XCHILD(L"reason", szBuffer));
+ __fallthrough;
- // fall through
case IDM_LEAVE:
ppro->GcQuit(item, 200, nullptr);
break;
diff --git a/protocols/JabberG/src/jabber_disco.cpp b/protocols/JabberG/src/jabber_disco.cpp
index e6d123e7fd..d1fb73b739 100644
--- a/protocols/JabberG/src/jabber_disco.cpp
+++ b/protocols/JabberG/src/jabber_disco.cpp
@@ -962,7 +962,7 @@ INT_PTR CJabberDlgDiscovery::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam)
}
wParam = REFRESH_TIMER;
- // fall through
+ __fallthrough;
case WM_TIMER:
if (wParam == REFRESH_TIMER) {
diff --git a/protocols/JabberG/src/jabber_form.cpp b/protocols/JabberG/src/jabber_form.cpp
index 3e427452fb..bef07afdb5 100644
--- a/protocols/JabberG/src/jabber_form.cpp
+++ b/protocols/JabberG/src/jabber_form.cpp
@@ -826,7 +826,8 @@ static INT_PTR CALLBACK JabberFormDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam,
(jfi->ppro->*(jfi->pfnSubmit))(n, jfi->userdata);
xmlDestroyNode(n);
}
- // fall through
+ __fallthrough;
+
case IDCANCEL:
case IDCLOSE:
DestroyWindow(hwndDlg);
diff --git a/protocols/JabberG/src/jabber_userinfo.cpp b/protocols/JabberG/src/jabber_userinfo.cpp
index 73f017b910..374c60bee3 100755
--- a/protocols/JabberG/src/jabber_userinfo.cpp
+++ b/protocols/JabberG/src/jabber_userinfo.cpp
@@ -474,7 +474,7 @@ static INT_PTR CALLBACK JabberUserInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM wPa
dat->item = nullptr;
break;
}
- // fall through
+ __fallthrough;
case WM_JABBER_REFRESH:
if (dat == nullptr) break;
diff --git a/protocols/JabberG/src/jabber_vcard.cpp b/protocols/JabberG/src/jabber_vcard.cpp
index 51676949ab..95b737973b 100644
--- a/protocols/JabberG/src/jabber_vcard.cpp
+++ b/protocols/JabberG/src/jabber_vcard.cpp
@@ -591,7 +591,8 @@ static INT_PTR CALLBACK EditEmailDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam,
mir_snprintf(idstr, "e-mailFlag%d", dat->id);
dat->ppro->setWord(idstr, nFlag);
}
- // fall through
+ __fallthrough;
+
case IDCANCEL:
EndDialog(hwndDlg, wParam);
break;
@@ -639,7 +640,6 @@ static INT_PTR CALLBACK EditPhoneDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam,
case WM_COMMAND:
switch (LOWORD(wParam)) {
case IDOK:
- {
char idstr[33];
if (dat->id < 0)
@@ -653,24 +653,25 @@ static INT_PTR CALLBACK EditPhoneDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam,
GetDlgItemTextA(hwndDlg, IDC_PHONE, text, _countof(text));
mir_snprintf(idstr, "Phone%d", dat->id);
dat->ppro->setString(idstr, text);
+ {
+ WORD nFlag = 0;
+ if (IsDlgButtonChecked(hwndDlg, IDC_HOME)) nFlag |= JABBER_VCTEL_HOME;
+ if (IsDlgButtonChecked(hwndDlg, IDC_WORK)) nFlag |= JABBER_VCTEL_WORK;
+ if (IsDlgButtonChecked(hwndDlg, IDC_VOICE)) nFlag |= JABBER_VCTEL_VOICE;
+ if (IsDlgButtonChecked(hwndDlg, IDC_FAX)) nFlag |= JABBER_VCTEL_FAX;
+ if (IsDlgButtonChecked(hwndDlg, IDC_PAGER)) nFlag |= JABBER_VCTEL_PAGER;
+ if (IsDlgButtonChecked(hwndDlg, IDC_MSG)) nFlag |= JABBER_VCTEL_MSG;
+ if (IsDlgButtonChecked(hwndDlg, IDC_CELL)) nFlag |= JABBER_VCTEL_CELL;
+ if (IsDlgButtonChecked(hwndDlg, IDC_VIDEO)) nFlag |= JABBER_VCTEL_VIDEO;
+ if (IsDlgButtonChecked(hwndDlg, IDC_BBS)) nFlag |= JABBER_VCTEL_BBS;
+ if (IsDlgButtonChecked(hwndDlg, IDC_MODEM)) nFlag |= JABBER_VCTEL_MODEM;
+ if (IsDlgButtonChecked(hwndDlg, IDC_ISDN)) nFlag |= JABBER_VCTEL_ISDN;
+ if (IsDlgButtonChecked(hwndDlg, IDC_PCS)) nFlag |= JABBER_VCTEL_PCS;
+ mir_snprintf(idstr, "PhoneFlag%d", dat->id);
+ dat->ppro->setWord(idstr, nFlag);
+ }
+ __fallthrough;
- WORD nFlag = 0;
- if (IsDlgButtonChecked(hwndDlg, IDC_HOME)) nFlag |= JABBER_VCTEL_HOME;
- if (IsDlgButtonChecked(hwndDlg, IDC_WORK)) nFlag |= JABBER_VCTEL_WORK;
- if (IsDlgButtonChecked(hwndDlg, IDC_VOICE)) nFlag |= JABBER_VCTEL_VOICE;
- if (IsDlgButtonChecked(hwndDlg, IDC_FAX)) nFlag |= JABBER_VCTEL_FAX;
- if (IsDlgButtonChecked(hwndDlg, IDC_PAGER)) nFlag |= JABBER_VCTEL_PAGER;
- if (IsDlgButtonChecked(hwndDlg, IDC_MSG)) nFlag |= JABBER_VCTEL_MSG;
- if (IsDlgButtonChecked(hwndDlg, IDC_CELL)) nFlag |= JABBER_VCTEL_CELL;
- if (IsDlgButtonChecked(hwndDlg, IDC_VIDEO)) nFlag |= JABBER_VCTEL_VIDEO;
- if (IsDlgButtonChecked(hwndDlg, IDC_BBS)) nFlag |= JABBER_VCTEL_BBS;
- if (IsDlgButtonChecked(hwndDlg, IDC_MODEM)) nFlag |= JABBER_VCTEL_MODEM;
- if (IsDlgButtonChecked(hwndDlg, IDC_ISDN)) nFlag |= JABBER_VCTEL_ISDN;
- if (IsDlgButtonChecked(hwndDlg, IDC_PCS)) nFlag |= JABBER_VCTEL_PCS;
- mir_snprintf(idstr, "PhoneFlag%d", dat->id);
- dat->ppro->setWord(idstr, nFlag);
- }
- // fall through
case IDCANCEL:
EndDialog(hwndDlg, wParam);
break;
diff --git a/protocols/MRA/src/MraPopUp.cpp b/protocols/MRA/src/MraPopUp.cpp
index 4d27b75bb3..7338eb2fdb 100644
--- a/protocols/MRA/src/MraPopUp.cpp
+++ b/protocols/MRA/src/MraPopUp.cpp
@@ -82,7 +82,8 @@ INT_PTR CALLBACK MraPopupDlgProcOpts(HWND hWndDlg, UINT msg, WPARAM wParam, LPAR
EnableWindow(GetDlgItem(hWndDlg, IDC_POPUP_TEXTCOLOR), (bEnabled && bUseWinColors == FALSE));
EnableWindow(GetDlgItem(hWndDlg, IDC_POPUP_TIMEOUT), bEnabled);
}
- // fall through
+ __fallthrough;
+
default:
if ((LOWORD(wParam) == IDC_POPUP_TIMEOUT) && (HIWORD(wParam) != EN_CHANGE || (HWND)lParam != GetFocus()))
return FALSE;
diff --git a/protocols/MSN/src/msn_chat.cpp b/protocols/MSN/src/msn_chat.cpp
index 681a931702..140bb2fdf6 100644
--- a/protocols/MSN/src/msn_chat.cpp
+++ b/protocols/MSN/src/msn_chat.cpp
@@ -209,7 +209,8 @@ void CMsnProto::MSN_GCProcessThreadActivity(ezxml_t xmli, const wchar_t *mChatID
switch (gce.iType) {
case GC_EVENT_JOIN:
gce.ptszStatus = MSN_GCGetRole(MSN_GetThreadByChatId(mChatID), target->txt);
- // ..fall through.. //
+ __fallthrough;
+
case GC_EVENT_KICK:
case GC_EVENT_PART:
pszTarget = target->txt;
diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp
index 54b9f87f8f..79e9066c07 100644
--- a/protocols/VKontakte/src/misc.cpp
+++ b/protocols/VKontakte/src/misc.cpp
@@ -311,7 +311,8 @@ bool CVkProto::CheckJsonResult(AsyncHttpRequest *pReq, const JSONNode &jnNode)
break;
case VKERR_FLOOD_CONTROL:
pReq->m_iRetry = 0;
- // fall through
+ __fallthrough;
+
case VKERR_UNKNOWN:
case VKERR_TOO_MANY_REQ_PER_SEC:
case VKERR_INTERNAL_SERVER_ERR:
diff --git a/src/core/stdmsg/res/resource.rc b/src/core/stdmsg/res/resource.rc
index dc3abac474..dbdc5bcf2b 100644
--- a/src/core/stdmsg/res/resource.rc
+++ b/src/core/stdmsg/res/resource.rc
@@ -46,8 +46,8 @@ BEGIN
CONTROL "Show toolbar buttons on top row",IDC_SHOWBUTTONLINE,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,192,137,10
CONTROL "Send message on double 'Enter'",IDC_SENDONDBLENTER,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,148,166,149,10
- CONTROL "Send message on 'Enter'",IDC_SENDONENTER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,148,179,152,10
+ "Button", BS_AUTORADIOBUTTON | WS_TABSTOP,148,166,149,10
+ CONTROL "Send message on 'Enter'",IDC_SENDONENTER,"Button", BS_AUTORADIOBUTTON | WS_TABSTOP,148,179,152,10
CONTROL "Show character count",IDC_CHARCOUNT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,148,192,149,10
LTEXT "Show warning when message has not been received after",IDC_STATIC,8,208,211,8
EDITTEXT IDC_SECONDS,223,206,25,12,ES_AUTOHSCROLL
diff --git a/src/core/stdmsg/src/chat_manager.cpp b/src/core/stdmsg/src/chat_manager.cpp
index 7fc20d3af8..a4e4697f3e 100644
--- a/src/core/stdmsg/src/chat_manager.cpp
+++ b/src/core/stdmsg/src/chat_manager.cpp
@@ -160,7 +160,7 @@ static void RegisterFonts()
{
ColourIDW colourid = { sizeof(colourid) };
strncpy(colourid.dbSettingsGroup, CHAT_MODULE, sizeof(colourid.dbSettingsGroup));
- wcsncpy(colourid.group, LPGENW("Chat module"), _countof(colourid.group));
+ wcsncpy(colourid.group, LPGENW("Message sessions") L"/" LPGENW("Chat module"), _countof(colourid.group));
strncpy(colourid.setting, "ColorLogBG", _countof(colourid.setting));
wcsncpy(colourid.name, LPGENW("Group chat log background"), _countof(colourid.name));
@@ -239,7 +239,7 @@ void Load_ChatModule()
AddIcons();
RegisterFonts();
- CHAT_MANAGER_INITDATA data = { &g_Settings, sizeof(MODULEINFO), sizeof(SESSION_INFO), LPGENW("Chat module"), FONTMODE_USE };
+ CHAT_MANAGER_INITDATA data = { &g_Settings, sizeof(MODULEINFO), sizeof(SESSION_INFO), LPGENW("Message sessions") L"/" LPGENW("Chat module"), FONTMODE_USE };
pci = Chat_GetInterface(&data);
pci->OnCreateModule = OnCreateModule;
diff --git a/src/core/stdmsg/src/chat_window.cpp b/src/core/stdmsg/src/chat_window.cpp
index 55ca576727..4767d84312 100644
--- a/src/core/stdmsg/src/chat_window.cpp
+++ b/src/core/stdmsg/src/chat_window.cpp
@@ -850,7 +850,7 @@ LRESULT CChatRoomDlg::WndProc_Message(UINT msg, WPARAM wParam, LPARAM lParam)
return TRUE;
}
}
- // fall through
+ __fallthrough;
case WM_LBUTTONDOWN:
case WM_MBUTTONDOWN:
diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp
index 386552ee78..0a5ef46008 100644
--- a/src/core/stdmsg/src/msgdialog.cpp
+++ b/src/core/stdmsg/src/msgdialog.cpp
@@ -634,11 +634,12 @@ void CSrmmWindow::UpdateTitle()
m_wStatus = db_get_w(m_hContact, m_szProto, "Status", ID_STATUS_OFFLINE);
wchar_t *contactName = Clist_GetContactDisplayName(m_hContact);
- wchar_t *szStatus = Clist_GetStatusModeDescription(m_szProto == nullptr ? ID_STATUS_OFFLINE : db_get_w(m_hContact, m_szProto, "Status", ID_STATUS_OFFLINE), 0);
if (g_dat.bUseStatusWinIcon)
mir_snwprintf(newtitle, L"%s - %s", contactName, TranslateT("Message session"));
- else
+ else {
+ wchar_t *szStatus = Clist_GetStatusModeDescription(m_szProto == nullptr ? ID_STATUS_OFFLINE : db_get_w(m_hContact, m_szProto, "Status", ID_STATUS_OFFLINE), 0);
mir_snwprintf(newtitle, L"%s (%s): %s", contactName, szStatus, TranslateT("Message session"));
+ }
m_wOldStatus = m_wStatus;
}
@@ -659,7 +660,7 @@ int CSrmmWindow::Resizer(UTILRESIZECONTROL *urc)
switch (urc->wId) {
case IDC_SRMM_LOG:
if (!g_dat.bShowButtons)
- urc->rcItem.top = 22;
+ urc->rcItem.top = 2;
urc->rcItem.bottom = urc->dlgNewSize.cy - m_iSplitterY;
return RD_ANCHORX_WIDTH | RD_ANCHORY_TOP;
@@ -1035,8 +1036,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
Window_FreeIcon_IcoLib(m_pOwner->GetHwnd());
if (m_szProto) {
- WORD wStatus = db_get_w(m_hContact, m_szProto, "Status", ID_STATUS_OFFLINE);
- Window_SetProtoIcon_IcoLib(m_pOwner->GetHwnd(), m_szProto, wStatus);
+ Window_SetProtoIcon_IcoLib(m_pOwner->GetHwnd(), m_szProto, Contact_GetStatus(m_hContact));
break;
}
}
@@ -1084,13 +1084,16 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
if (LOWORD(wParam) != WA_ACTIVE)
break;
- SetFocus(m_message.GetHwnd());
- // fall through
+ __fallthrough;
+
case WM_MOUSEACTIVATE:
+ SetFocus(m_message.GetHwnd());
UpdateTitle();
UpdateLastMessage();
if (KillTimer(m_hwnd, TIMERID_FLASHWND))
FlashWindow(m_pOwner->GetHwnd(), FALSE);
+ if (g_dat.bUseStatusWinIcon)
+ SendMessage(m_hwnd, DM_UPDATEWINICON, 0, 0);
break;
case WM_CBD_LOADICONS:
diff --git a/src/core/stdmsg/src/msglog.cpp b/src/core/stdmsg/src/msglog.cpp
index dac3fdb793..b06bdb9b64 100644
--- a/src/core/stdmsg/src/msglog.cpp
+++ b/src/core/stdmsg/src/msglog.cpp
@@ -371,7 +371,8 @@ static DWORD CALLBACK LogStreamInEvents(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG
}
}
dat->stage = STREAMSTAGE_TAIL;
- // fall through
+ __fallthrough;
+
case STREAMSTAGE_TAIL:
CreateRTFTail(dat->buf);
dat->stage = STREAMSTAGE_STOP;
diff --git a/src/core/stdmsg/src/msgoptions.cpp b/src/core/stdmsg/src/msgoptions.cpp
index 5f0e0823b2..5168b2933c 100644
--- a/src/core/stdmsg/src/msgoptions.cpp
+++ b/src/core/stdmsg/src/msgoptions.cpp
@@ -95,14 +95,14 @@ bool LoadMsgDlgFont(int i, LOGFONT* lf, COLORREF * colour)
void RegisterSRMMFonts(void)
{
- char idstr[10];
-
FontIDW fontid = { sizeof(fontid) };
fontid.flags = FIDF_ALLOWREREGISTER | FIDF_DEFAULTVALID;
for (int i = 0; i < _countof(fontOptionsList); i++) {
strncpy_s(fontid.dbSettingsGroup, SRMMMOD, _TRUNCATE);
- wcsncpy_s(fontid.group, LPGENW("Message log"), _TRUNCATE);
+ wcsncpy_s(fontid.group, LPGENW("Message sessions") L"/" LPGENW("Message log"), _TRUNCATE);
wcsncpy_s(fontid.name, fontOptionsList[i].szDescr, _TRUNCATE);
+
+ char idstr[10];
mir_snprintf(idstr, "SRMFont%d", i);
strncpy_s(fontid.prefix, idstr, _TRUNCATE);
fontid.order = i;
@@ -115,7 +115,7 @@ void RegisterSRMMFonts(void)
fontid.deffontsettings.style = fontOptionsList[i].defStyle;
wcsncpy_s(fontid.deffontsettings.szFace, fontOptionsList[i].szDefFace, _TRUNCATE);
fontid.deffontsettings.charset = MsgDlgGetFontDefaultCharset(fontOptionsList[i].szDefFace);
- wcsncpy_s(fontid.backgroundGroup, LPGENW("Message log"), _TRUNCATE);
+ wcsncpy_s(fontid.backgroundGroup, LPGENW("Message sessions") L"/" LPGENW("Message log"), _TRUNCATE);
wcsncpy_s(fontid.backgroundName, LPGENW("Background"), _TRUNCATE);
Font_RegisterW(&fontid);
}
@@ -125,7 +125,7 @@ void RegisterSRMMFonts(void)
strncpy_s(colourid.setting, SRMSGSET_BKGCOLOUR, _TRUNCATE);
colourid.defcolour = SRMSGDEFSET_BKGCOLOUR;
wcsncpy_s(colourid.name, LPGENW("Background"), _TRUNCATE);
- wcsncpy_s(colourid.group, LPGENW("Message log"), _TRUNCATE);
+ wcsncpy_s(colourid.group, LPGENW("Message sessions") L"/" LPGENW("Message log"), _TRUNCATE);
Colour_RegisterW(&colourid);
}
@@ -220,8 +220,6 @@ public:
chkAutoMin.OnChange = Callback(this, &COptionMainDlg::onChange_AutoMin);
chkAutoClose.OnChange = Callback(this, &COptionMainDlg::onChange_AutoClose);
chkLimitAvatar.OnChange = Callback(this, &COptionMainDlg::onChange_LimitAvatar);
- chkSendOnEnter.OnChange = Callback(this, &COptionMainDlg::onChange_SendOnEnter);
- chkSendOnDblEnter.OnChange = Callback(this, &COptionMainDlg::onChange_SendOnDblEnter);
chkSavePerContact.OnChange = Callback(this, &COptionMainDlg::onChange_SavePerContact);
CreateLink(edtNFlash, g_dat.nFlashMax);
@@ -282,16 +280,6 @@ public:
chkCtrlSupport.Enable(!chkAutoClose.GetState());
}
- void onChange_SendOnEnter(CCtrlCheck*)
- {
- chkSendOnDblEnter.SetState(false);
- }
-
- void onChange_SendOnDblEnter(CCtrlCheck*)
- {
- chkSendOnEnter.SetState(false);
- }
-
void onChange_SavePerContact(CCtrlCheck*)
{
chkCascade.Enable(!chkSavePerContact.GetState());
diff --git a/src/core/stdmsg/src/msgs.cpp b/src/core/stdmsg/src/msgs.cpp
index eac78a6b84..1b8a5f9727 100644
--- a/src/core/stdmsg/src/msgs.cpp
+++ b/src/core/stdmsg/src/msgs.cpp
@@ -409,20 +409,27 @@ void SetButtonsPos(HWND hwndDlg, bool bIsChat)
GetClientRect(hwndDlg, &rc);
int iLeftX = 2, iRightX = rc.right - 2;
+ bool bShow = (bIsChat) ? true : g_dat.bShowButtons;
+
CustomButtonData *cbd;
for (int i = 0; cbd = Srmm_GetNthButton(i); i++) {
HWND hwndButton = GetDlgItem(hwndDlg, cbd->m_dwButtonCID);
if (hwndButton == nullptr || cbd->m_bHidden)
continue;
- if (cbd->m_bRSided) {
- iRightX -= g_dat.iGap + cbd->m_iButtonWidth;
- hdwp = DeferWindowPos(hdwp, hwndButton, nullptr, iRightX, yPos, 0, 0, SWP_NOZORDER | SWP_NOSIZE);
- }
- else {
- hdwp = DeferWindowPos(hdwp, hwndButton, nullptr, iLeftX, yPos, 0, 0, SWP_NOZORDER | SWP_NOSIZE);
- iLeftX += g_dat.iGap + cbd->m_iButtonWidth;
+ if (bShow) {
+ ShowWindow(hwndButton, SW_SHOW);
+
+ if (cbd->m_bRSided) {
+ iRightX -= g_dat.iGap + cbd->m_iButtonWidth;
+ hdwp = DeferWindowPos(hdwp, hwndButton, nullptr, iRightX, yPos, 0, 0, SWP_NOZORDER | SWP_NOSIZE);
+ }
+ else {
+ hdwp = DeferWindowPos(hdwp, hwndButton, nullptr, iLeftX, yPos, 0, 0, SWP_NOZORDER | SWP_NOSIZE);
+ iLeftX += g_dat.iGap + cbd->m_iButtonWidth;
+ }
}
+ else ShowWindow(hwndButton, SW_HIDE);
}
EndDeferWindowPos(hdwp);
diff --git a/src/core/stdmsg/src/stdafx.h b/src/core/stdmsg/src/stdafx.h
index 5d890b97c3..28f6e257fd 100644
--- a/src/core/stdmsg/src/stdafx.h
+++ b/src/core/stdmsg/src/stdafx.h
@@ -150,7 +150,6 @@ class CTabbedWindow : public CDlgBase
int iX = 0, iY = 0;
int iWidth = 0, iHeight = 0;
int m_windowWasCascaded = 0;
- bool m_bSizingLoop = false;
public:
CCtrlPages m_tab;
diff --git a/src/core/stdmsg/src/tabs.cpp b/src/core/stdmsg/src/tabs.cpp
index 7afb64175f..c244f0dd24 100644
--- a/src/core/stdmsg/src/tabs.cpp
+++ b/src/core/stdmsg/src/tabs.cpp
@@ -545,7 +545,6 @@ INT_PTR CTabbedWindow::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam)
GetClientRect(m_hwnd, &rc);
oldSizeX = rc.right - rc.left;
oldSizeY = rc.bottom - rc.top;
- m_bSizingLoop = true;
break;
case WM_EXITSIZEMOVE:
@@ -557,7 +556,6 @@ INT_PTR CTabbedWindow::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam)
pDlg->Resize();
}
}
- m_bSizingLoop = false;
break;
case WM_GETMINMAXINFO:
@@ -685,7 +683,7 @@ INT_PTR CTabbedWindow::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam)
LRESULT res = CDlgBase::DlgProc(msg, wParam, lParam);
if (msg == WM_SIZE) {
SendMessage(m_hwndStatus, WM_SIZE, 0, 0);
- if (m_pEmbed && !m_bSizingLoop) {
+ if (m_pEmbed) {
GetClientRect(m_tab.GetHwnd(), &rc);
MoveWindow(m_pEmbed->GetHwnd(), 0, 0, rc.right - rc.left, rc.bottom - rc.top, FALSE);
}
diff --git a/src/core/stduserinfo/src/contactinfo.cpp b/src/core/stduserinfo/src/contactinfo.cpp
index 4a1c8ba273..41a5c6331e 100644
--- a/src/core/stduserinfo/src/contactinfo.cpp
+++ b/src/core/stduserinfo/src/contactinfo.cpp
@@ -42,9 +42,12 @@ static INT_PTR CALLBACK EditUserEmailDlgProc(HWND hwndDlg, UINT msg, WPARAM wPar
switch (LOWORD(wParam)) {
case IDOK:
GetDlgItemTextA(hwndDlg, IDC_EMAIL, (char*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA), 256);
- //fall through
+ __fallthrough;
+
case IDCANCEL:
EndDialog(hwndDlg, wParam);
+ __fallthrough;
+
case IDC_EMAIL:
if (HIWORD(wParam) == EN_CHANGE)
EnableWindow(GetDlgItem(hwndDlg, IDOK), GetWindowTextLength(GetDlgItem(hwndDlg, IDC_EMAIL)));
@@ -100,9 +103,12 @@ static INT_PTR CALLBACK EditUserPhoneDlgProc(HWND hwndDlg, UINT msg, WPARAM wPar
}
if (IsDlgButtonChecked(hwndDlg, IDC_SMS)) mir_strcat(szText, " SMS");
}
- //fall through
+ __fallthrough;
+
case IDCANCEL:
EndDialog(hwndDlg, wParam);
+ __fallthrough;
+
case IDC_COUNTRY:
if (HIWORD(wParam) != CBN_SELCHANGE)
break;
diff --git a/src/mir_app/src/FontOptions.cpp b/src/mir_app/src/FontOptions.cpp
index 9d42904807..6e3b97709a 100644
--- a/src/mir_app/src/FontOptions.cpp
+++ b/src/mir_app/src/FontOptions.cpp
@@ -28,6 +28,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
// *_w2 is working copy of list
// *_w3 is stores initial configuration
+HWND hwndFontOptions = nullptr;
+
static int sttCompareFont(const FontInternal* p1, const FontInternal* p2)
{
int result = mir_wstrcmp(p1->group, p2->group);
@@ -113,7 +115,6 @@ int __inline DrawTextWithEffect(HDC hdc, LPCTSTR lpchText, int cchText, RECT * l
}
#define UM_SETFONTGROUP (WM_USER + 101)
-#define TIMER_ID 11015
#define FSUI_COLORBOXWIDTH 50
#define FSUI_COLORBOXLEFT 5
@@ -540,6 +541,36 @@ static void sttSaveFontData(HWND hwndDlg, FontInternal &F)
db_set_w(0, F.dbSettingsGroup, str, (WORD)F.flags);
}
+static void RebuildTree(HWND hwndDlg)
+{
+ font_id_list_w2 = font_id_list;
+ font_id_list_w3 = font_id_list;
+
+ colour_id_list_w2 = colour_id_list;
+ colour_id_list_w3 = colour_id_list;
+
+ effect_id_list_w2 = effect_id_list;
+ effect_id_list_w3 = effect_id_list;
+
+ for (auto &F : font_id_list_w2) {
+ // sync settings with database
+ UpdateFontSettings(F, &F->value);
+ sttFsuiCreateSettingsTreeNode(GetDlgItem(hwndDlg, IDC_FONTGROUP), F->group, F->hLangpack);
+ }
+
+ for (auto &C : colour_id_list_w2) {
+ // sync settings with database
+ UpdateColourSettings(C, &C->value);
+ sttFsuiCreateSettingsTreeNode(GetDlgItem(hwndDlg, IDC_FONTGROUP), C->group, C->hLangpack);
+ }
+
+ for (auto &E : effect_id_list_w2) {
+ // sync settings with database
+ UpdateEffectSettings(E, &E->value);
+ sttFsuiCreateSettingsTreeNode(GetDlgItem(hwndDlg, IDC_FONTGROUP), E->group, E->hLangpack);
+ }
+}
+
static INT_PTR CALLBACK DlgProcLogOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
int selCount;
@@ -550,33 +581,9 @@ static INT_PTR CALLBACK DlgProcLogOptions(HWND hwndDlg, UINT msg, WPARAM wParam,
switch (msg) {
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
+ hwndFontOptions = hwndDlg;
- font_id_list_w2 = font_id_list;
- font_id_list_w3 = font_id_list;
-
- colour_id_list_w2 = colour_id_list;
- colour_id_list_w3 = colour_id_list;
-
- effect_id_list_w2 = effect_id_list;
- effect_id_list_w3 = effect_id_list;
-
- for (auto &F : font_id_list_w2) {
- // sync settings with database
- UpdateFontSettings(F, &F->value);
- sttFsuiCreateSettingsTreeNode(GetDlgItem(hwndDlg, IDC_FONTGROUP), F->group, F->hLangpack);
- }
-
- for (auto &C : colour_id_list_w2) {
- // sync settings with database
- UpdateColourSettings(C, &C->value);
- sttFsuiCreateSettingsTreeNode(GetDlgItem(hwndDlg, IDC_FONTGROUP), C->group, C->hLangpack);
- }
-
- for (auto &E : effect_id_list_w2) {
- // sync settings with database
- UpdateEffectSettings(E, &E->value);
- sttFsuiCreateSettingsTreeNode(GetDlgItem(hwndDlg, IDC_FONTGROUP), E->group, E->hLangpack);
- }
+ RebuildTree(hwndDlg);
SendDlgItemMessage(hwndDlg, IDC_BKGCOLOUR, CPM_SETDEFAULTCOLOUR, 0, (LPARAM)GetSysColor(COLOR_WINDOW));
return TRUE;
@@ -906,8 +913,7 @@ static INT_PTR CALLBACK DlgProcLogOptions(HWND hwndDlg, UINT msg, WPARAM wParam,
if (HIWORD(wParam) != LBN_DBLCLK)
return TRUE;
-
- //fall through
+ __fallthrough;
case IDC_CHOOSEFONT:
if (selCount = SendDlgItemMessage(hwndDlg, IDC_FONTLIST, LB_GETSELCOUNT, 0, 0)) {
@@ -1151,8 +1157,16 @@ static INT_PTR CALLBACK DlgProcLogOptions(HWND hwndDlg, UINT msg, WPARAM wParam,
}
break;
+ case WM_TIMER:
+ if (wParam == 1) {
+ KillTimer(hwndDlg, wParam);
+ TreeView_DeleteAllItems(GetDlgItem(hwndDlg, IDC_FONTGROUP));
+ RebuildTree(hwndDlg);
+ }
+ break;
+
case WM_DESTROY:
- KillTimer(hwndDlg, TIMER_ID);
+ hwndFontOptions = nullptr;
sttSaveCollapseState(GetDlgItem(hwndDlg, IDC_FONTGROUP));
DeleteObject(hBkgColourBrush);
font_id_list_w2.destroy();
diff --git a/src/mir_app/src/FontService.cpp b/src/mir_app/src/FontService.cpp
index 8e07db3829..7acc62ac0b 100644
--- a/src/mir_app/src/FontService.cpp
+++ b/src/mir_app/src/FontService.cpp
@@ -27,6 +27,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
int code_page = CP_ACP;
HANDLE hFontReloadEvent, hColourReloadEvent;
+extern HWND hwndFontOptions;
+
+static void notifyOptions()
+{
+ if (hwndFontOptions)
+ SetTimer(hwndFontOptions, 1, 100, nullptr);
+}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -266,6 +273,8 @@ static int sttRegisterFontWorker(FontIDW *font_id, int _hLang)
UpdateFontSettings(font_id, &newItem->value);
font_id_list.insert(newItem);
+
+ notifyOptions();
return 0;
}
@@ -327,9 +336,12 @@ static INT_PTR ReloadFonts(WPARAM, LPARAM)
MIR_APP_DLL(void) KillModuleFonts(int _hLang)
{
auto T = font_id_list.rev_iter();
- for (auto &it : T)
- if (it->hLangpack == _hLang)
+ for (auto &it : T) {
+ if (it->hLangpack == _hLang) {
font_id_list.remove(T.indexOf(&it));
+ notifyOptions();
+ }
+ }
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -355,6 +367,8 @@ static INT_PTR sttRegisterColourWorker(ColourIDW *colour_id, int _hLang)
newItem->hLangpack = _hLang;
UpdateColourSettings(colour_id, &newItem->value);
colour_id_list.insert(newItem);
+
+ notifyOptions();
return 0;
}
@@ -403,9 +417,12 @@ static INT_PTR ReloadColours(WPARAM, LPARAM)
MIR_APP_DLL(void) KillModuleColours(int _hLang)
{
auto T = colour_id_list.rev_iter();
- for (auto &it : T)
- if (it->hLangpack == _hLang)
+ for (auto &it : T) {
+ if (it->hLangpack == _hLang) {
colour_id_list.remove(T.indexOf(&it));
+ notifyOptions();
+ }
+ }
}
//////////////////////////////////////////////////////////////////////////
@@ -442,6 +459,8 @@ static int sttRegisterEffectWorker(EffectIDW *effect_id, int _hLang)
newItem->hLangpack = _hLang;
UpdateEffectSettings(effect_id, &newItem->value);
effect_id_list.insert(newItem);
+
+ notifyOptions();
return 0;
}
diff --git a/src/mir_app/src/chat_opts.cpp b/src/mir_app/src/chat_opts.cpp
index 705d74a125..2282f53374 100644
--- a/src/mir_app/src/chat_opts.cpp
+++ b/src/mir_app/src/chat_opts.cpp
@@ -166,7 +166,8 @@ void RegisterFonts(void)
FO.szDefFace = L"Webdings";
FO.defColour = RGB(170, 170, 170);
FO.defCharset = SYMBOL_CHARSET;
- // fall through
+ __fallthrough;
+
default:
wcsncpy_s(fontid.backgroundName, LPGENW("Group chat log background"), _TRUNCATE);
break;
diff --git a/src/mir_app/src/clui.cpp b/src/mir_app/src/clui.cpp
index 75c66b3b25..5da831c9de 100644
--- a/src/mir_app/src/clui.cpp
+++ b/src/mir_app/src/clui.cpp
@@ -141,7 +141,8 @@ static INT_PTR CALLBACK AskForConfirmationDlgProc(HWND hWnd, UINT msg, WPARAM wP
EndDialog(hWnd, IDC_HIDE);
break;
}
- //fall through
+ __fallthrough;
+
case IDCANCEL:
case IDNO:
EndDialog(hWnd, LOWORD(wParam));
diff --git a/src/mir_app/src/findadd.cpp b/src/mir_app/src/findadd.cpp
index 19caaf101a..fdadcd9b7c 100644
--- a/src/mir_app/src/findadd.cpp
+++ b/src/mir_app/src/findadd.cpp
@@ -439,7 +439,7 @@ static INT_PTR CALLBACK DlgProcFindAdd(HWND hwndDlg, UINT msg, WPARAM wParam, LP
GetClientRect(hwndList, &rc);
ListView_SetColumnWidth(hwndList, 0, rc.right);
}
- // fall through
+ __fallthrough;
case WM_MOVE:
if (dat && dat->hwndAdvSearch) {
diff --git a/src/mir_app/src/ignore.cpp b/src/mir_app/src/ignore.cpp
index bf7e23e659..86d60be867 100644
--- a/src/mir_app/src/ignore.cpp
+++ b/src/mir_app/src/ignore.cpp
@@ -253,7 +253,7 @@ static INT_PTR CALLBACK DlgProcIgnoreOpts(HWND hwndDlg, UINT msg, WPARAM, LPARAM
case CLN_NEWCONTACT:
case CLN_LISTREBUILT:
SetAllContactIcons(GetDlgItem(hwndDlg, IDC_LIST));
- //fall through
+ __fallthrough;
case CLN_CONTACTMOVED:
SetListGroupIcons(GetDlgItem(hwndDlg, IDC_LIST), (HANDLE)SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_GETNEXTITEM, CLGN_ROOT, 0), hItemAll, nullptr);
break;
diff --git a/src/mir_app/src/netliblog.cpp b/src/mir_app/src/netliblog.cpp
index c0d17d7b3c..392f8dc4f3 100644
--- a/src/mir_app/src/netliblog.cpp
+++ b/src/mir_app/src/netliblog.cpp
@@ -247,7 +247,8 @@ static INT_PTR CALLBACK LogOptionsDlgProc(HWND hwndDlg, UINT message, WPARAM wPa
}
}
InitLog();
- // fall through
+ __fallthrough;
+
case IDCANCEL:
DestroyWindow(hwndDlg);
}
diff --git a/src/mir_app/src/visibility.cpp b/src/mir_app/src/visibility.cpp
index e90fd88e05..77536c2c94 100644
--- a/src/mir_app/src/visibility.cpp
+++ b/src/mir_app/src/visibility.cpp
@@ -171,7 +171,8 @@ static INT_PTR CALLBACK DlgProcVisibilityOpts(HWND hwndDlg, UINT msg, WPARAM, LP
case CLN_NEWCONTACT:
case CLN_LISTREBUILT:
SetAllContactIcons(GetDlgItem(hwndDlg, IDC_LIST));
- //fall through
+ __fallthrough;
+
case CLN_CONTACTMOVED:
SetListGroupIcons(GetDlgItem(hwndDlg, IDC_LIST), (HANDLE)SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_GETNEXTITEM, CLGN_ROOT, 0), hItemAll, nullptr);
break;
diff --git a/tools/build_scripts/bin15/z3_PackArchives.txt b/tools/build_scripts/bin15/z3_PackArchives.txt
index 2947b27405..1525183eff 100644
--- a/tools/build_scripts/bin15/z3_PackArchives.txt
+++ b/tools/build_scripts/bin15/z3_PackArchives.txt
@@ -1,4 +1,3 @@
-dbchecker.bat
Libs\api-ms-win-core-console-l1-1-0.dll
Libs\api-ms-win-core-datetime-l1-1-0.dll
Libs\api-ms-win-core-debug-l1-1-0.dll
@@ -67,6 +66,7 @@ Libs\Pcre16.mir
Libs\sqlite3.mir
Libs\ssleay32.mir
Libs\Zlib.mir
+Icons\Proto_Dummy.dll
Icons\Proto_Facebook.dll
Icons\Proto_GG.dll
Icons\Proto_ICQ.dll
@@ -83,6 +83,7 @@ Plugins\Clist_modern.dll
Plugins\CrashDumper.dll
Plugins\Dbx_mdbx.dll
Plugins\Dbx_mmap.dll
+Plugins\Dummy.dll
Plugins\Facebook.dll
Plugins\GG.dll
Plugins\ICQ.dll
diff --git a/tools/build_scripts/z2_PackPluginUpdater.txt b/tools/build_scripts/z2_PackPluginUpdater.txt
index 58545793b1..69bf537ed7 100644
--- a/tools/build_scripts/z2_PackPluginUpdater.txt
+++ b/tools/build_scripts/z2_PackPluginUpdater.txt
@@ -1,46 +1,46 @@
-api-ms-win-core-console-l1-1-0.dll
-api-ms-win-core-datetime-l1-1-0.dll
-api-ms-win-core-debug-l1-1-0.dll
-api-ms-win-core-errorhandling-l1-1-0.dll
-api-ms-win-core-file-l1-1-0.dll
-api-ms-win-core-file-l1-2-0.dll
-api-ms-win-core-file-l2-1-0.dll
-api-ms-win-core-handle-l1-1-0.dll
-api-ms-win-core-heap-l1-1-0.dll
-api-ms-win-core-interlocked-l1-1-0.dll
-api-ms-win-core-libraryloader-l1-1-0.dll
-api-ms-win-core-localization-l1-2-0.dll
-api-ms-win-core-memory-l1-1-0.dll
-api-ms-win-core-namedpipe-l1-1-0.dll
-api-ms-win-core-processenvironment-l1-1-0.dll
-api-ms-win-core-processthreads-l1-1-0.dll
-api-ms-win-core-processthreads-l1-1-1.dll
-api-ms-win-core-profile-l1-1-0.dll
-api-ms-win-core-rtlsupport-l1-1-0.dll
-api-ms-win-core-string-l1-1-0.dll
-api-ms-win-core-synch-l1-1-0.dll
-api-ms-win-core-synch-l1-2-0.dll
-api-ms-win-core-sysinfo-l1-1-0.dll
-api-ms-win-core-timezone-l1-1-0.dll
-api-ms-win-core-util-l1-1-0.dll
-api-ms-win-crt-conio-l1-1-0.dll
-api-ms-win-crt-convert-l1-1-0.dll
-api-ms-win-crt-environment-l1-1-0.dll
-api-ms-win-crt-filesystem-l1-1-0.dll
-api-ms-win-crt-heap-l1-1-0.dll
-api-ms-win-crt-locale-l1-1-0.dll
-api-ms-win-crt-math-l1-1-0.dll
-api-ms-win-crt-multibyte-l1-1-0.dll
-api-ms-win-crt-private-l1-1-0.dll
-api-ms-win-crt-process-l1-1-0.dll
-api-ms-win-crt-runtime-l1-1-0.dll
-api-ms-win-crt-stdio-l1-1-0.dll
-api-ms-win-crt-string-l1-1-0.dll
-api-ms-win-crt-time-l1-1-0.dll
-api-ms-win-crt-utility-l1-1-0.dll
-msvcp140.dll
-ucrtbase.dll
-vcruntime140.dll
+Libs\api-ms-win-core-console-l1-1-0.dll
+Libs\api-ms-win-core-datetime-l1-1-0.dll
+Libs\api-ms-win-core-debug-l1-1-0.dll
+Libs\api-ms-win-core-errorhandling-l1-1-0.dll
+Libs\api-ms-win-core-file-l1-1-0.dll
+Libs\api-ms-win-core-file-l1-2-0.dll
+Libs\api-ms-win-core-file-l2-1-0.dll
+Libs\api-ms-win-core-handle-l1-1-0.dll
+Libs\api-ms-win-core-heap-l1-1-0.dll
+Libs\api-ms-win-core-interlocked-l1-1-0.dll
+Libs\api-ms-win-core-libraryloader-l1-1-0.dll
+Libs\api-ms-win-core-localization-l1-2-0.dll
+Libs\api-ms-win-core-memory-l1-1-0.dll
+Libs\api-ms-win-core-namedpipe-l1-1-0.dll
+Libs\api-ms-win-core-processenvironment-l1-1-0.dll
+Libs\api-ms-win-core-processthreads-l1-1-0.dll
+Libs\api-ms-win-core-processthreads-l1-1-1.dll
+Libs\api-ms-win-core-profile-l1-1-0.dll
+Libs\api-ms-win-core-rtlsupport-l1-1-0.dll
+Libs\api-ms-win-core-string-l1-1-0.dll
+Libs\api-ms-win-core-synch-l1-1-0.dll
+Libs\api-ms-win-core-synch-l1-2-0.dll
+Libs\api-ms-win-core-sysinfo-l1-1-0.dll
+Libs\api-ms-win-core-timezone-l1-1-0.dll
+Libs\api-ms-win-core-util-l1-1-0.dll
+Libs\api-ms-win-crt-conio-l1-1-0.dll
+Libs\api-ms-win-crt-convert-l1-1-0.dll
+Libs\api-ms-win-crt-environment-l1-1-0.dll
+Libs\api-ms-win-crt-filesystem-l1-1-0.dll
+Libs\api-ms-win-crt-heap-l1-1-0.dll
+Libs\api-ms-win-crt-locale-l1-1-0.dll
+Libs\api-ms-win-crt-math-l1-1-0.dll
+Libs\api-ms-win-crt-multibyte-l1-1-0.dll
+Libs\api-ms-win-crt-private-l1-1-0.dll
+Libs\api-ms-win-crt-process-l1-1-0.dll
+Libs\api-ms-win-crt-runtime-l1-1-0.dll
+Libs\api-ms-win-crt-stdio-l1-1-0.dll
+Libs\api-ms-win-crt-string-l1-1-0.dll
+Libs\api-ms-win-crt-time-l1-1-0.dll
+Libs\api-ms-win-crt-utility-l1-1-0.dll
+Libs\msvcp140.dll
+Libs\ucrtbase.dll
+Libs\vcruntime140.dll
Core\StdAutoAway.dll
Core\StdAway.dll
Core\StdClist.dll
@@ -56,7 +56,9 @@ Core\StdUserInfo.dll
Core\StdUserOnline.dll
Plugins\Dbx_mmap.dll
Plugins\Dbx_mdbx.dll
+Plugins\Dummy.dll
Plugins\Import.dll
+Icons\Proto_Dummy.dll
Icons\Proto_MetaContacts.dll
Libs\FreeImage.mir
Libs\mir_app.mir