From cf1b6f456049b8c2d69edd99ec64e3e906774c04 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 3 Feb 2023 20:10:06 +0300 Subject: minor interface fix --- protocols/Telegram/res/resource.rc | 4 ++-- protocols/Telegram/src/options.cpp | 9 ++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/protocols/Telegram/res/resource.rc b/protocols/Telegram/res/resource.rc index 34e18a009d..14b23f0c05 100644 --- a/protocols/Telegram/res/resource.rc +++ b/protocols/Telegram/res/resource.rc @@ -66,7 +66,7 @@ EXSTYLE WS_EX_CONTROLPARENT FONT 8, "MS Shell Dlg", 400, 0, 0x0 BEGIN LTEXT "Country:",IDC_STATIC,0,8,89,8 - COMBOBOX IDC_COUNTRY,96,5,86,12,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_COUNTRY,96,5,86,12,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP RTEXT "",IDC_CODE,95,22,23,13,0,WS_EX_CLIENTEDGE LTEXT "Phone number:",IDC_STATIC,0,25,89,10 EDITTEXT IDC_PHONE,122,22,58,12,ES_AUTOHSCROLL @@ -84,7 +84,7 @@ EXSTYLE WS_EX_CONTROLPARENT FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN LTEXT "Country:",IDC_STATIC,5,8,79,8 - COMBOBOX IDC_COUNTRY,87,6,211,12,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_COUNTRY,87,6,211,12,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP LTEXT "Phone number:",IDC_STATIC,5,25,79,10 RTEXT "",IDC_CODE,88,24,32,13,0,WS_EX_CLIENTEDGE EDITTEXT IDC_PHONE,126,24,172,12,ES_AUTOHSCROLL diff --git a/protocols/Telegram/src/options.cpp b/protocols/Telegram/src/options.cpp index d3823c1df1..0604f8dc0d 100644 --- a/protocols/Telegram/src/options.cpp +++ b/protocols/Telegram/src/options.cpp @@ -83,11 +83,14 @@ public: void onChange_Country(CCtrlCombo *) { CMStringA buf; - int iCode = cmbCountry.GetCurData(); - if (iCode == 9999) + switch (int iCode = cmbCountry.GetCurData()) { + case 9999: + case -1: buf = "---"; - else + break; + default: buf.Format("+%d", iCode); + } SetDlgItemTextA(m_hwnd, IDC_CODE, buf); } }; -- cgit v1.2.3