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...
This commit is contained in:
parent
db33fbac27
commit
6a80b1b94c
|
@ -435,12 +435,6 @@ void AutostartToggle(bool enabled, Fn<void(bool)> done) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
#ifdef __HAIKU__
|
|
||||||
|
|
||||||
HaikuAutostart(enabled);
|
|
||||||
|
|
||||||
#else // __HAIKU__
|
|
||||||
|
|
||||||
const auto silent = !done;
|
const auto silent = !done;
|
||||||
if (InFlatpak()) {
|
if (InFlatpak()) {
|
||||||
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||||
|
@ -457,8 +451,6 @@ void AutostartToggle(bool enabled, Fn<void(bool)> done) {
|
||||||
QFile::remove(autostart + QGuiApplication::desktopFileName());
|
QFile::remove(autostart + QGuiApplication::desktopFileName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // __HAIKU__
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AutostartSkip() {
|
bool AutostartSkip() {
|
||||||
|
@ -490,37 +482,6 @@ void psActivateProcess(uint64 pid) {
|
||||||
// objc_activateProgram();
|
// 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() {
|
QString psAppDataPath() {
|
||||||
// Previously we used ~/.TelegramDesktop, so look there first.
|
// Previously we used ~/.TelegramDesktop, so look there first.
|
||||||
// If we find data there, we should still use it.
|
// If we find data there, we should still use it.
|
||||||
|
@ -700,9 +661,6 @@ bool OpenSystemSettings(SystemSettingsType type) {
|
||||||
add("mate-volume-control");
|
add("mate-volume-control");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef __HAIKU__
|
|
||||||
add("Media");
|
|
||||||
#endif // __ HAIKU__
|
|
||||||
add("pavucontrol-qt");
|
add("pavucontrol-qt");
|
||||||
add("pavucontrol");
|
add("pavucontrol");
|
||||||
add("alsamixergui");
|
add("alsamixergui");
|
||||||
|
@ -734,9 +692,7 @@ void finish() {
|
||||||
} // namespace Platform
|
} // namespace Platform
|
||||||
|
|
||||||
void psNewVersion() {
|
void psNewVersion() {
|
||||||
#ifndef __HAIKU__
|
|
||||||
Platform::InstallLauncher();
|
Platform::InstallLauncher();
|
||||||
#endif // __HAIKU__
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void psSendToMenu(bool send, bool silent) {
|
void psSendToMenu(bool send, bool silent) {
|
||||||
|
|
Loading…
Reference in New Issue