mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-06 15:13:57 +02:00
Make InstallLauncher accessible on any platform
This commit is contained in:
parent
cfa12fb0cc
commit
f2d2826fc7
5 changed files with 11 additions and 9 deletions
|
@ -15,8 +15,6 @@ class LocationPoint;
|
||||||
|
|
||||||
namespace Platform {
|
namespace Platform {
|
||||||
|
|
||||||
void InstallLauncher(bool force = false);
|
|
||||||
|
|
||||||
inline void IgnoreApplicationActivationRightNow() {
|
inline void IgnoreApplicationActivationRightNow() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,6 +33,9 @@ inline bool SkipTaskbarSupported() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline void InstallLauncher(bool force) {
|
||||||
|
}
|
||||||
|
|
||||||
namespace ThirdParty {
|
namespace ThirdParty {
|
||||||
|
|
||||||
inline void start() {
|
inline void start() {
|
||||||
|
|
|
@ -42,6 +42,7 @@ bool TrayIconSupported();
|
||||||
bool SkipTaskbarSupported();
|
bool SkipTaskbarSupported();
|
||||||
void WriteCrashDumpDetails();
|
void WriteCrashDumpDetails();
|
||||||
void NewVersionLaunched(int oldVersion);
|
void NewVersionLaunched(int oldVersion);
|
||||||
|
void InstallLauncher(bool force = false);
|
||||||
|
|
||||||
[[nodiscard]] std::optional<bool> IsDarkMode();
|
[[nodiscard]] std::optional<bool> IsDarkMode();
|
||||||
[[nodiscard]] inline bool IsDarkModeSupported() {
|
[[nodiscard]] inline bool IsDarkModeSupported() {
|
||||||
|
|
|
@ -27,6 +27,9 @@ inline bool SkipTaskbarSupported() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline void InstallLauncher(bool force) {
|
||||||
|
}
|
||||||
|
|
||||||
namespace ThirdParty {
|
namespace ThirdParty {
|
||||||
|
|
||||||
void start();
|
void start();
|
||||||
|
|
|
@ -179,6 +179,10 @@ auto GenerateCodes() {
|
||||||
Core::Application::RegisterUrlScheme();
|
Core::Application::RegisterUrlScheme();
|
||||||
Ui::Toast::Show("Forced custom scheme register.");
|
Ui::Toast::Show("Forced custom scheme register.");
|
||||||
});
|
});
|
||||||
|
codes.emplace(qsl("installlauncher"), [](SessionController *window) {
|
||||||
|
Platform::InstallLauncher(true);
|
||||||
|
Ui::Toast::Show("Forced launcher installation.");
|
||||||
|
});
|
||||||
|
|
||||||
#if defined Q_OS_WIN || defined Q_OS_MAC
|
#if defined Q_OS_WIN || defined Q_OS_MAC
|
||||||
codes.emplace(qsl("freetype"), [](SessionController *window) {
|
codes.emplace(qsl("freetype"), [](SessionController *window) {
|
||||||
|
@ -196,13 +200,6 @@ auto GenerateCodes() {
|
||||||
});
|
});
|
||||||
#endif // Q_OS_WIN || Q_OS_MAC
|
#endif // Q_OS_WIN || Q_OS_MAC
|
||||||
|
|
||||||
#if defined Q_OS_UNIX && !defined Q_OS_MAC
|
|
||||||
codes.emplace(qsl("installlauncher"), [](SessionController *window) {
|
|
||||||
Platform::InstallLauncher(true);
|
|
||||||
Ui::Toast::Show("Forced launcher installation.");
|
|
||||||
});
|
|
||||||
#endif // Q_OS_UNIX && !Q_OS_MAC
|
|
||||||
|
|
||||||
auto audioFilters = qsl("Audio files (*.wav *.mp3);;") + FileDialog::AllFilesFilter();
|
auto audioFilters = qsl("Audio files (*.wav *.mp3);;") + FileDialog::AllFilesFilter();
|
||||||
auto audioKeys = {
|
auto audioKeys = {
|
||||||
qsl("msg_incoming"),
|
qsl("msg_incoming"),
|
||||||
|
|
Loading…
Add table
Reference in a new issue