summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2023-02-03 20:10:06 +0300
committerGeorge Hazan <ghazan@miranda.im>2023-02-05 21:12:12 +0300
commitcf1b6f456049b8c2d69edd99ec64e3e906774c04 (patch)
treeaa09427ba9b334bd3f181fe2c454990016e50278
parent428cfefdcf0a8da4624ae64a52057ab3c0cb61e1 (diff)
minor interface fix
-rw-r--r--protocols/Telegram/res/resource.rc4
-rw-r--r--protocols/Telegram/src/options.cpp9
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);
}
};