[Improvement] Settings three-dots menu improvements
This commit is contained in:
parent
b3c1ace07e
commit
3540298292
2 changed files with 13 additions and 0 deletions
|
|
@ -28,6 +28,8 @@
|
|||
"ktg_mac_menu_show": "Show Kotatogram",
|
||||
"ktg_settings_kotato": "Kotatogram Settings",
|
||||
"ktg_user_status_unaccessible": "account inaccessible",
|
||||
"ktg_settings_show_json_settings": "Show settings file",
|
||||
"ktg_settings_restart": "Restart Kotatogram",
|
||||
"ktg_settings_chats": "Chats",
|
||||
"ktg_settings_sticker_height": "Sticker height: {pixels}px",
|
||||
"ktg_settings_sticker_scale_both": "Apply to sticker width",
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
*/
|
||||
#include "settings/settings_common.h"
|
||||
|
||||
#include "kotato/kotato_lang.h"
|
||||
#include "settings/settings_chat.h"
|
||||
#include "settings/settings_advanced.h"
|
||||
#include "settings/settings_information.h"
|
||||
|
|
@ -29,6 +30,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "window/window_session_controller.h"
|
||||
#include "window/window_controller.h"
|
||||
#include "lang/lang_keys.h"
|
||||
#include "core/file_utilities.h"
|
||||
#include "mainwindow.h"
|
||||
#include "main/main_session.h"
|
||||
#include "main/main_domain.h"
|
||||
|
|
@ -226,12 +228,21 @@ void FillMenu(
|
|||
Core::App().domain().addActivated(MTP::Environment{});
|
||||
}, &st::menuIconAddAccount);
|
||||
}
|
||||
const auto customSettingsFile = cWorkingDir() + "tdata/kotato-settings-custom.json";
|
||||
if (type != Type::Kotato && !controller->session().supportMode()) {
|
||||
addAction(
|
||||
tr::lng_settings_information(tr::now),
|
||||
[=] { showOther(Type::Information); },
|
||||
&st::menuIconInfo);
|
||||
}
|
||||
addAction(
|
||||
ktr("ktg_settings_show_json_settings"),
|
||||
[=] { File::ShowInFolder(customSettingsFile); },
|
||||
&st::menuIconSettings);
|
||||
addAction(
|
||||
ktr("ktg_settings_restart"),
|
||||
[] { Core::Restart(); },
|
||||
&st::menuIconRestore);
|
||||
if (type != Type::Kotato) {
|
||||
addAction(
|
||||
tr::lng_settings_logout(tr::now),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue