mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-01 15:05:56 +00:00
Unified function to detect icon name on Linux
This commit is contained in:
@@ -44,6 +44,7 @@ namespace {
|
||||
|
||||
constexpr auto kDesktopFile = ":/misc/telegramdesktop.desktop"_cs;
|
||||
constexpr auto kSnapLauncherDir = "/var/lib/snapd/desktop/applications/"_cs;
|
||||
constexpr auto kIconName = "telegram"_cs;
|
||||
|
||||
#ifndef TDESKTOP_DISABLE_DBUS_INTEGRATION
|
||||
void SandboxAutostart(bool autostart, bool silent = false) {
|
||||
@@ -333,6 +334,13 @@ QString GetLauncherFilename() {
|
||||
return LauncherFilename;
|
||||
}
|
||||
|
||||
QString GetIconName() {
|
||||
static const auto IconName = InSandbox()
|
||||
? GetLauncherBasename()
|
||||
: kIconName.utf16();
|
||||
return IconName;
|
||||
}
|
||||
|
||||
} // namespace Platform
|
||||
|
||||
namespace {
|
||||
|
Reference in New Issue
Block a user