mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
GApplication as GNotification option scope
This commit is contained in:
parent
ccbab25fae
commit
40b79dec12
2 changed files with 12 additions and 2 deletions
|
@ -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,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 723df5d5109bd5c07f30e05f0b0a0520643ef41b
|
Subproject commit 7f129171548a3828693d7f79fbdb783464f31b97
|
Loading…
Add table
Reference in a new issue