mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-02 15:35:51 +00:00
GApplication as GNotification option scope
This commit is contained in:
@@ -40,6 +40,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||||||
|
|
||||||
#include <QtGui/QWindow>
|
#include <QtGui/QWindow>
|
||||||
|
|
||||||
|
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||||
|
#include <giomm.h>
|
||||||
|
#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||||
|
|
||||||
namespace Window {
|
namespace Window {
|
||||||
namespace Notifications {
|
namespace Notifications {
|
||||||
namespace {
|
namespace {
|
||||||
@@ -85,7 +89,13 @@ base::options::toggle OptionGNotification({
|
|||||||
.name = "GNotification",
|
.name = "GNotification",
|
||||||
.description = "Force enable GLib's GNotification."
|
.description = "Force enable GLib's GNotification."
|
||||||
" When disabled, autodetect is used.",
|
" When disabled, autodetect is used.",
|
||||||
.scope = base::options::linux,
|
.scope = [] {
|
||||||
|
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||||
|
return bool(Gio::Application::get_default());
|
||||||
|
#else // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||||
|
return false;
|
||||||
|
#endif // DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||||
|
},
|
||||||
.restartRequired = true,
|
.restartRequired = true,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Submodule Telegram/lib_base updated: 723df5d510...7f12917154
Reference in New Issue
Block a user