mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-18 14:00:09 +00:00
Use packaged build in the snap package
This commit is contained in:
@@ -29,6 +29,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
namespace Platform {
|
||||
namespace {
|
||||
|
||||
constexpr auto kLauncherBasename = str_const(MACRO_TO_STRING(TDESKTOP_LAUNCHER_BASENAME) ".desktop");
|
||||
|
||||
bool noQtTrayIcon = false, tryAppIndicator = false;
|
||||
bool useGtkBase = false, useAppIndicator = false, useStatusIcon = false, trayIconChecked = false, useUnityCount = false;
|
||||
|
||||
@@ -557,7 +559,7 @@ void MainWindow::psFirstShow() {
|
||||
auto snapName = QString::fromLatin1(qgetenv("SNAP_NAME"));
|
||||
if(snapName.isEmpty()) {
|
||||
std::vector<QString> possibleDesktopFiles = {
|
||||
MACRO_TO_STRING(TDESKTOP_LAUNCHER_BASENAME) ".desktop",
|
||||
str_const_toString(kLauncherBasename),
|
||||
"Telegram.desktop"
|
||||
};
|
||||
|
||||
@@ -573,8 +575,12 @@ void MainWindow::psFirstShow() {
|
||||
LOG(("Could not get Unity Launcher entry!"));
|
||||
}
|
||||
} else {
|
||||
LOG(("SNAP Environment detected, setting Launcher entry to %1-telegramdesktop.desktop!").arg(snapName));
|
||||
_desktopFile = snapName + "_telegramdesktop.desktop";
|
||||
LOG(("SNAP Environment detected, setting Launcher entry to %1_%2.desktop!")
|
||||
.arg(snapName)
|
||||
.arg(str_const_toString(kLauncherBasename)));
|
||||
_desktopFile = snapName
|
||||
+ '_'
|
||||
+ str_const_toString(kLauncherBasename);
|
||||
useUnityCount=true;
|
||||
}
|
||||
_dbusPath = "/com/canonical/unity/launcherentry/" + QString::number(djbStringHash("application://" + _desktopFile));
|
||||
|
Reference in New Issue
Block a user