From 6a80b1b94c44f9799c7af3b0983f3f5bbc2d45f9 Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Thu, 19 May 2022 09:11:37 +0400 Subject: [PATCH] Get rid of __HAIKU__ checks This is a leftover of something that wasn't finiched and looks like won't be finished. It also feels that's not a good idea to mix Linux and Haiku in the same file though... --- .../platform/linux/specific_linux.cpp | 44 ------------------- 1 file changed, 44 deletions(-) diff --git a/Telegram/SourceFiles/platform/linux/specific_linux.cpp b/Telegram/SourceFiles/platform/linux/specific_linux.cpp index 5450495000..9658115878 100644 --- a/Telegram/SourceFiles/platform/linux/specific_linux.cpp +++ b/Telegram/SourceFiles/platform/linux/specific_linux.cpp @@ -435,12 +435,6 @@ void AutostartToggle(bool enabled, Fn done) { } }); -#ifdef __HAIKU__ - - HaikuAutostart(enabled); - -#else // __HAIKU__ - const auto silent = !done; if (InFlatpak()) { #ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION @@ -457,8 +451,6 @@ void AutostartToggle(bool enabled, Fn done) { QFile::remove(autostart + QGuiApplication::desktopFileName()); } } - -#endif // __HAIKU__ } bool AutostartSkip() { @@ -490,37 +482,6 @@ void psActivateProcess(uint64 pid) { // objc_activateProgram(); } -namespace { - -#ifdef __HAIKU__ -void HaikuAutostart(bool start) { - const auto home = QDir::homePath(); - if (home.isEmpty()) { - return; - } - - QFile file(home + "/config/settings/boot/launch/telegram-desktop"); - if (start) { - if (file.open(QIODevice::WriteOnly | QIODevice::Text)) { - QTextStream out(&file); - out - << "#!/bin/bash" << Qt::endl - << "cd /system/apps" << Qt::endl - << "./Telegram -autostart" << " &" << Qt::endl; - file.close(); - file.setPermissions(file.permissions() - | QFileDevice::ExeOwner - | QFileDevice::ExeGroup - | QFileDevice::ExeOther); - } - } else { - file.remove(); - } -} -#endif // __HAIKU__ - -} // namespace - QString psAppDataPath() { // Previously we used ~/.TelegramDesktop, so look there first. // If we find data there, we should still use it. @@ -700,9 +661,6 @@ bool OpenSystemSettings(SystemSettingsType type) { add("mate-volume-control"); } } -#ifdef __HAIKU__ - add("Media"); -#endif // __ HAIKU__ add("pavucontrol-qt"); add("pavucontrol"); add("alsamixergui"); @@ -734,9 +692,7 @@ void finish() { } // namespace Platform void psNewVersion() { -#ifndef __HAIKU__ Platform::InstallLauncher(); -#endif // __HAIKU__ } void psSendToMenu(bool send, bool silent) {