Description: Fix some problems with desktop integration which relate to names of the binaries Author: Nicholas Guriev Last-Update: 2017-01-26 diff --git a/Telegram/SourceFiles/pspecific_linux.cpp b/Telegram/SourceFiles/pspecific_linux.cpp index 8b21afe..258b5bd 100644 --- a/Telegram/SourceFiles/pspecific_linux.cpp +++ b/Telegram/SourceFiles/pspecific_linux.cpp @@ -505,7 +505,7 @@ void psRegisterCustomScheme() { s << "Exec=" << escapeShell(QFile::encodeName(cExeDir() + cExeName())) << " -- %u\n"; s << "Icon=telegram\n"; s << "Terminal=false\n"; - s << "StartupWMClass=Telegram\n"; + s << "StartupWMClass=TelegramDesktop\n"; s << "Type=Application\n"; s << "Categories=Network;\n"; s << "MimeType=x-scheme-handler/tg;\n"; @@ -572,7 +572,7 @@ bool _execUpdater(bool update = true, const QString &crashreport = QString()) { static const int MaxLen = 65536, MaxArgsCount = 128; char path[MaxLen] = {0}; - QByteArray data(QFile::encodeName(cExeDir() + "Updater")); + QByteArray data(QFile::encodeName(cExeDir() + (update ? "Updater" : gExeName))); memcpy(path, data.constData(), data.size()); char *args[MaxArgsCount] = {0}, p_noupdate[] = "-noupdate", p_autostart[] = "-autostart", p_debug[] = "-debug", p_tosettings[] = "-tosettings", p_key[] = "-key", p_path[] = "-workpath", p_startintray[] = "-startintray", p_testmode[] = "-testmode", p_crashreport[] = "-crashreport"; diff --git a/lib/xdg/telegramdesktop.desktop b/lib/xdg/telegramdesktop.desktop index 35a5c61..da7a35a 100644 --- a/lib/xdg/telegramdesktop.desktop +++ b/lib/xdg/telegramdesktop.desktop @@ -4,9 +4,9 @@ Version=1.0 Name=Telegram Desktop Comment=Official desktop version of Telegram messaging app Exec=/usr/bin/telegram-desktop -- %u -Icon=telegram-desktop +Icon=telegram Terminal=false -StartupWMClass=Telegram +StartupWMClass=TelegramDesktop Type=Application Categories=Network; MimeType=x-scheme-handler/tg;