2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-05 09:05:14 +00:00

Improve custom language loading.

Apply custom language without relaunching the app.
This commit is contained in:
John Preston
2017-04-18 21:57:32 +03:00
parent 3f0b57ec11
commit 6fb980ca79
9 changed files with 54 additions and 41 deletions

View File

@@ -21,6 +21,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
#pragma once
#include "lang_auto.h"
#include "base/weak_unique_ptr.h"
namespace Lang {
@@ -33,12 +34,13 @@ QString DefaultLanguageId();
class Instance;
Instance &Current();
class Instance {
class Instance : public base::enable_weak_from_this {
public:
Instance() {
fillDefaults();
}
void switchToId(const QString &id);
void chooseCustomFile();
void switchToCustomFile(const QString &filePath);
Instance(const Instance &other) = delete;