mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Use GNotification only in flatpak by default
The UX is not the best without sound, so there's no advantage in using GNotification on GNOME. Remove mention about being native to GNOME as it's not true anymore.
This commit is contained in:
@@ -1198,7 +1198,7 @@ void Manager::doClearFromSession(not_null<Main::Session*> session) {
|
||||
}
|
||||
|
||||
bool Manager::doSkipAudio() const {
|
||||
return _private->inhibited() || Gio::Application::get_default();
|
||||
return _private->inhibited();
|
||||
}
|
||||
|
||||
bool Manager::doSkipToast() const {
|
||||
@@ -1206,7 +1206,7 @@ bool Manager::doSkipToast() const {
|
||||
}
|
||||
|
||||
bool Manager::doSkipFlashBounce() const {
|
||||
return _private->inhibited() || Gio::Application::get_default();
|
||||
return _private->inhibited();
|
||||
}
|
||||
|
||||
} // namespace Notifications
|
||||
|
@@ -268,25 +268,7 @@ void LaunchGApplication() {
|
||||
return false;
|
||||
};
|
||||
|
||||
const auto gtkNotifications = [&] {
|
||||
try {
|
||||
if (connection && NameHasOwner(
|
||||
connection,
|
||||
"org.gtk.Notifications")) {
|
||||
return true;
|
||||
}
|
||||
} catch (...) {
|
||||
}
|
||||
|
||||
if (ranges::contains(activatableNames, "org.gtk.Notifications")) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
if (OptionGApplication.value()
|
||||
|| (!KSandbox::isSnap() && gtkNotifications())
|
||||
|| (KSandbox::isFlatpak() && !freedesktopNotifications())) {
|
||||
Glib::signal_idle().connect_once([] {
|
||||
const auto appId = QGuiApplication::desktopFileName()
|
||||
|
@@ -16,8 +16,7 @@ const char kOptionGApplication[] = "gapplication";
|
||||
base::options::toggle OptionGApplication({
|
||||
.id = kOptionGApplication,
|
||||
.name = "GApplication",
|
||||
.description = "Force enable GNOME's GApplication and GNotification."
|
||||
" This changes notification behavior to be native to GNOME."
|
||||
.description = "Force enable GLib's GApplication and GNotification."
|
||||
" When disabled, autodetect is used.",
|
||||
.scope = base::options::linux,
|
||||
.restartRequired = true,
|
||||
|
Reference in New Issue
Block a user