summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2024-05-17 18:03:34 +0300
committerGeorge Hazan <george.hazan@gmail.com>2024-05-17 18:03:34 +0300
commit7e6687edc73d4b4091e477049133bcac3a4f3527 (patch)
tree346ed4ac33b03f7f4f93184386ada51bef81aa93
parent0cdf3208770436c186fbed2c035dba5af79d394f (diff)
fixes #4416 (Telegram: не выводятся IP-адреса в списке сессий)
-rw-r--r--protocols/Telegram/res/resource.rc12
-rw-r--r--protocols/Telegram/src/options.cpp10
-rw-r--r--protocols/Telegram/src/resource.h1
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