2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-30 22:16:14 +00:00

Get rid of DESKTOP_APP_DISABLE_DBUS_INTEGRATION

Desktop App Toolkit uses GLib as the D-Bus library for quite long time, but GLib is not only a D-Bus library, it's more a basic library providing native Linux APIs implementing various specs. The situation right now is that DESKTOP_APP_DISABLE_DBUS_INTEGRATION disables not only D-Bus code but all the native API integration such as MIME handling or .desktop file parsing. In other words, the option disables native Linux APIs on Linux what is absurd and doesn't have any sense.
This commit is contained in:
Ilya Fedin
2023-05-06 02:34:14 +04:00
committed by John Preston
parent 37f5576c38
commit 0a011db483
11 changed files with 17 additions and 129 deletions

View File

@@ -40,9 +40,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include <QtGui/QWindow>
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
#if __has_include(<giomm.h>)
#include <giomm.h>
#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION
#endif // __has_include(<giomm.h>)
namespace Window {
namespace Notifications {
@@ -90,11 +90,11 @@ base::options::toggle OptionGNotification({
.description = "Force enable GLib's GNotification."
" When disabled, autodetect is used.",
.scope = [] {
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
#if __has_include(<giomm.h>)
return bool(Gio::Application::get_default());
#else // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION
#else // __has_include(<giomm.h>)
return false;
#endif // DESKTOP_APP_DISABLE_DBUS_INTEGRATION
#endif // __has_include(<giomm.h>)
},
.restartRequired = true,
});