[glib: 1/2] docs: Improved documentation of GNotification
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 1/2] docs: Improved documentation of GNotification
- Date: Mon, 17 May 2021 10:30:57 +0000 (UTC)
commit e727a69a8bd6a8cecee7b753d88716b4c5e040e7
Author: Nitin Wartkar <nitinwartkar58 gmail com>
Date: Mon May 17 10:30:54 2021 +0000
docs: Improved documentation of GNotification
gio/gnotification.c | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
---
diff --git a/gio/gnotification.c b/gio/gnotification.c
index 27efed3f4..aa7df7f7b 100644
--- a/gio/gnotification.c
+++ b/gio/gnotification.c
@@ -43,6 +43,29 @@
* not running, applications using #GNotification should be able to be
* started as a D-Bus service, using #GApplication.
*
+ * In order for #GNotification to work, the application must have installed
+ * a `.desktop` file. For example:
+ * |[
+ * [Desktop Entry]
+ * Name=Test Application
+ * Comment=Description of what Test Application does
+ * Exec=gnome-test-application
+ * Icon=org.gnome.TestApplication
+ * Terminal=false
+ * Type=Application
+ * Categories=GNOME;GTK;TestApplication Category;
+ * StartupNotify=true
+ * DBusActivatable=true
+ * X-GNOME-UsesNotifications=true
+ * ]|
+ *
+ * The `X-GNOME-UsesNotifications` key indicates to GNOME Control Center
+ * that this application uses notifications, so it can be listed in the
+ * Control Center’s ‘Notifications’ panel.
+ *
+ * The `.desktop` file must be named as `org.gnome.TestApplication.desktop`,
+ * where `org.gnome.TestApplication` is the ID passed to g_application_new().
+ *
* User interaction with a notification (either the default action, or
* buttons) must be associated with actions on the application (ie:
* "app." actions). It is not possible to route user interaction
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]