aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.c3
-rw-r--r--src/service.c11
2 files changed, 12 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index f57237a..14c032f 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1,5 +1,6 @@
/*
* Copyright 2013 Canonical Ltd.
+ * Copyright 2023 Robert Tari <robert@tari.in>
*
* Authors:
* Charles Kerr <charles.kerr@canonical.com>
@@ -39,7 +40,7 @@ int main (int argc G_GNUC_UNUSED, char ** argv G_GNUC_UNUSED)
textdomain (GETTEXT_PACKAGE);
/* run */
- service = indicator_notifications_service_new (NULL);
+ service = indicator_notifications_service_new ();
loop = g_main_loop_new (NULL, FALSE);
g_signal_connect (service, INDICATOR_NOTIFICATIONS_SERVICE_SIGNAL_NAME_LOST, G_CALLBACK(on_name_lost), loop);
g_main_loop_run (loop);
diff --git a/src/service.c b/src/service.c
index ea81a65..f3922de 100644
--- a/src/service.c
+++ b/src/service.c
@@ -20,6 +20,7 @@
#include <glib/gi18n.h>
#include <gio/gio.h>
+#include <ayatana/common/utils.h>
#include "service.h"
#include "dbus-spy.h"
#include "urlregex.h"
@@ -268,8 +269,16 @@ static GVariant *createHeaderState(IndicatorNotificationsService *self)
g_variant_builder_init (&b, G_VARIANT_TYPE("a{sv}"));
g_variant_builder_add (&b, "{sv}", "title", g_variant_new_string (_("Notifications")));
- g_variant_builder_add (&b, "{sv}", "visible", g_variant_new_boolean (TRUE));
+ g_variant_builder_add (&b, "{sv}", "tooltip", g_variant_new_string (_("List of past system notifications, do-not-disturb switch")));
+ /* notifications indicator is not designed for running in Lomiri, so let's hide it when running in Lomiri */
+ if (ayatana_common_utils_is_lomiri()) {
+ g_variant_builder_add (&b, "{sv}", "visible", g_variant_new_boolean (FALSE));
+ }
+ else
+ {
+ g_variant_builder_add (&b, "{sv}", "visible", g_variant_new_boolean (TRUE));
+ }
gchar *sIcon = NULL;
if (self->priv->bHasUnread)