diff options
Diffstat (limited to 'protocols/Telegram/src/options.cpp')
-rw-r--r-- | protocols/Telegram/src/options.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/protocols/Telegram/src/options.cpp b/protocols/Telegram/src/options.cpp index e9d5f83b9b..ed9f331f54 100644 --- a/protocols/Telegram/src/options.cpp +++ b/protocols/Telegram/src/options.cpp @@ -21,6 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. class COptionsDlg : public CTelegramDlgBase
{
+ CCtrlButton btnLogout;
CCtrlCheck chkHideChats, chkUsePopups, chkCompressFiles;
CCtrlCombo cmbCountry;
CCtrlEdit edtGroup, edtPhone, edtDeviceName;
@@ -29,6 +30,7 @@ class COptionsDlg : public CTelegramDlgBase public:
COptionsDlg(CTelegramProto *ppro, int iDlgID, bool bFullDlg) :
CTelegramDlgBase(ppro, iDlgID),
+ btnLogout(this, IDC_LOGOUT),
cmbCountry(this, IDC_COUNTRY),
chkUsePopups(this, IDC_POPUPS),
chkHideChats(this, IDC_HIDECHATS),
@@ -48,6 +50,9 @@ public: CreateLink(chkCompressFiles, ppro->m_bCompressFiles);
}
+ btnLogout.Enable(m_proto->getByte(DBKEY_AUTHORIZED));
+ btnLogout.OnClick = Callback(this, &COptionsDlg::onClick_Logout);
+
cmbCountry.OnChange = Callback(this, &COptionsDlg::onChange_Country);
}
@@ -83,6 +88,11 @@ public: return true;
}
+ void onClick_Logout(CCtrlButton *)
+ {
+ m_proto->UnregisterSession();
+ }
+
void onChange_Country(CCtrlCombo *)
{
CMStringA buf;
|