mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-30 14:17:45 +00:00
New items in settings' three-dots menu
- Show custom settings: opens JSON file in your profile folder. - Restart Kotatogram: restarts app, can be used to apply changes from JSON.
This commit is contained in:
@@ -2245,4 +2245,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||||||
"ktg_restricted_send_inline_until" = "The admins of this group restricted you from posting inline content here until {date}, {time}.";
|
"ktg_restricted_send_inline_until" = "The admins of this group restricted you from posting inline content here until {date}, {time}.";
|
||||||
"ktg_restricted_send_polls_until" = "The admins of this group restricted you from posting polls here until {date}, {time}.";
|
"ktg_restricted_send_polls_until" = "The admins of this group restricted you from posting polls here until {date}, {time}.";
|
||||||
|
|
||||||
|
"ktg_settings_show_json_settings" = "Show custom settings";
|
||||||
|
"ktg_settings_restart" = "Restart Kotatogram";
|
||||||
|
|
||||||
// Keys finished
|
// Keys finished
|
||||||
|
@@ -23,7 +23,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||||||
#include "window/window_session_controller.h"
|
#include "window/window_session_controller.h"
|
||||||
#include "window/window_controller.h"
|
#include "window/window_controller.h"
|
||||||
#include "lang/lang_keys.h"
|
#include "lang/lang_keys.h"
|
||||||
|
#include "core/file_utilities.h"
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
|
#include "app.h"
|
||||||
#include "main/main_session.h"
|
#include "main/main_session.h"
|
||||||
#include "styles/style_boxes.h"
|
#include "styles/style_boxes.h"
|
||||||
#include "styles/style_settings.h"
|
#include "styles/style_settings.h"
|
||||||
@@ -183,11 +185,18 @@ void FillMenu(
|
|||||||
tr::lng_settings_bg_theme_create(tr::now),
|
tr::lng_settings_bg_theme_create(tr::now),
|
||||||
[=] { window->show(Box(Window::Theme::CreateBox, window)); });
|
[=] { window->show(Box(Window::Theme::CreateBox, window)); });
|
||||||
} else {
|
} else {
|
||||||
|
const auto customSettingsFile = cWorkingDir() + "tdata/kotato-settings-custom.json";
|
||||||
if (!controller->session().supportMode()) {
|
if (!controller->session().supportMode()) {
|
||||||
addAction(
|
addAction(
|
||||||
tr::lng_settings_information(tr::now),
|
tr::lng_settings_information(tr::now),
|
||||||
[=] { showOther(Type::Information); });
|
[=] { showOther(Type::Information); });
|
||||||
}
|
}
|
||||||
|
addAction(
|
||||||
|
tr::ktg_settings_show_json_settings(tr::now),
|
||||||
|
[=] { File::ShowInFolder(customSettingsFile); });
|
||||||
|
addAction(
|
||||||
|
tr::ktg_settings_restart(tr::now),
|
||||||
|
[=] { App::restart(); });
|
||||||
addAction(
|
addAction(
|
||||||
tr::lng_settings_logout(tr::now),
|
tr::lng_settings_logout(tr::now),
|
||||||
[=] { window->widget()->onLogout(); });
|
[=] { window->widget()->onLogout(); });
|
||||||
|
Reference in New Issue
Block a user