From 7e6687edc73d4b4091e477049133bcac3a4f3527 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 17 May 2024 18:03:34 +0300 Subject: =?UTF-8?q?fixes=20#4416=20(Telegram:=20=D0=BD=D0=B5=20=D0=B2?= =?UTF-8?q?=D1=8B=D0=B2=D0=BE=D0=B4=D1=8F=D1=82=D1=81=D1=8F=20IP-=D0=B0?= =?UTF-8?q?=D0=B4=D1=80=D0=B5=D1=81=D0=B0=20=D0=B2=20=D1=81=D0=BF=D0=B8?= =?UTF-8?q?=D1=81=D0=BA=D0=B5=20=D1=81=D0=B5=D1=81=D1=81=D0=B8=D0=B9)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- protocols/Telegram/res/resource.rc | 12 +++++------- protocols/Telegram/src/options.cpp | 10 ++++------ protocols/Telegram/src/resource.h | 1 - 3 files changed, 9 insertions(+), 14 deletions(-) diff --git a/protocols/Telegram/res/resource.rc b/protocols/Telegram/res/resource.rc index 2e29723530..6351b30c46 100644 --- a/protocols/Telegram/res/resource.rc +++ b/protocols/Telegram/res/resource.rc @@ -114,16 +114,14 @@ BEGIN COMBOBOX IDC_STATUS2,221,61,81,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP END -IDD_OPTIONS_SESSIONS DIALOGEX 0, 0, 310, 226 +IDD_OPTIONS_SESSIONS DIALOGEX 0, 0, 310, 235 STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD EXSTYLE WS_EX_CONTROLPARENT FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN - CONTROL "",IDC_SESSIONS,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,1,0,309,182 - LTEXT "IP address",IDC_STATIC,7,188,75,8 - LTEXT "Software",IDC_STATIC,7,204,75,8 - EDITTEXT IDC_IPADDRESS,87,187,75,12,ES_AUTOHSCROLL | WS_DISABLED - EDITTEXT IDC_SOFTWARE,87,202,217,12,ES_AUTOHSCROLL | WS_DISABLED + CONTROL "",IDC_SESSIONS,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,1,0,308,212 + LTEXT "Software",IDC_STATIC,7,220,75,8 + EDITTEXT IDC_SOFTWARE,87,218,217,12,ES_AUTOHSCROLL | WS_DISABLED END IDD_ADD_PHONE DIALOGEX 0, 0, 343, 105 @@ -201,7 +199,7 @@ BEGIN IDD_OPTIONS_SESSIONS, DIALOG BEGIN - BOTTOMMARGIN, 86 + BOTTOMMARGIN, 95 END IDD_ADD_PHONE, DIALOG diff --git a/protocols/Telegram/src/options.cpp b/protocols/Telegram/src/options.cpp index ed9f331f54..dedf868c01 100644 --- a/protocols/Telegram/src/options.cpp +++ b/protocols/Telegram/src/options.cpp @@ -194,15 +194,14 @@ public: class COptSessionsDlg : public CTelegramDlgBase { - CCtrlBase m_ipAddress, m_software; + CCtrlBase m_software; CCtrlListView m_list; public: COptSessionsDlg(CTelegramProto *ppro) : CTelegramDlgBase(ppro, IDD_OPTIONS_SESSIONS), m_list(this, IDC_SESSIONS), - m_software(this, IDC_SOFTWARE), - m_ipAddress(this, IDC_IPADDRESS) + m_software(this, IDC_SOFTWARE) { m_list.OnBuildMenu = Callback(this, &COptSessionsDlg::onContextMenu); m_list.OnDeleteItem = Callback(this, &COptSessionsDlg::onDeleteItem); @@ -221,11 +220,11 @@ public: m_list.InsertColumn(0, &lvc); lvc.pszText = TranslateT("Platform"); - lvc.cx = 110; + lvc.cx = 80; m_list.InsertColumn(1, &lvc); lvc.pszText = TranslateT("Country"); - lvc.cx = 120; + lvc.cx = 115; m_list.InsertColumn(2, &lvc); lvc.pszText = TranslateT("Last active"); @@ -268,7 +267,6 @@ public: void onItemChanged(CCtrlListView::TEventInfo *ev) { auto *pSession = (TD::session*)m_list.GetItemData(ev->nmlv->iItem); - m_ipAddress.SetTextA(pSession->ip_.c_str()); m_software.SetTextA((pSession->application_name_ + " " + pSession->application_version_).c_str()); } diff --git a/protocols/Telegram/src/resource.h b/protocols/Telegram/src/resource.h index 4253f350a8..0332712efb 100644 --- a/protocols/Telegram/src/resource.h +++ b/protocols/Telegram/src/resource.h @@ -35,7 +35,6 @@ #define IDC_COMPRESS_FILES 1017 #define IDC_REACTIONS 1018 #define IDC_SESSIONS 1023 -#define IDC_IPADDRESS 1024 #define IDC_SOFTWARE 1025 #define IDC_LOGOUT 1025 -- cgit v1.2.3