2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Add three dot menu to settings. Edit + logout.

This commit is contained in:
John Preston
2018-09-06 18:24:24 +03:00
parent cfce189201
commit 316d015d23
5 changed files with 37 additions and 10 deletions

View File

@@ -13,6 +13,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "settings/settings_main.h"
#include "settings/settings_notifications.h"
#include "settings/settings_privacy_security.h"
#include "lang/lang_keys.h"
#include "mainwindow.h"
namespace Settings {
@@ -38,4 +40,13 @@ object_ptr<Section> CreateSection(
Unexpected("Settings section type in Widget::createInnerWidget.");
}
void FillMenu(Fn<void(Type)> showOther, MenuCallback addAction) {
addAction(
lang(lng_settings_edit_info),
[=] { showOther(Type::Information); });
addAction(
lang(lng_settings_logout),
[=] { App::wnd()->onLogout(); });
}
} // namespace Settings