aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt18
-rw-r--r--src/main.c3
-rw-r--r--src/service.c11
3 files changed, 14 insertions, 18 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 9a19244..2e6f4ae 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,6 +1,5 @@
set (SERVICE_LIB "ayatanaindicatornotificationsservice")
set (SERVICE_EXEC "ayatana-indicator-notifications-service")
-
add_definitions(-DG_LOG_DOMAIN="ayatana-indicator-notifications")
# handwritten sources
@@ -10,28 +9,15 @@ set(SERVICE_MANUAL_SOURCES
dbus-spy.c
service.c)
-# generated sources
-include(GdbusCodegen)
-set(SERVICE_GENERATED_SOURCES)
-
# add the bin dir to our include path so the code can find the generated header files
include_directories(${CMAKE_CURRENT_BINARY_DIR})
-
-# add warnings/coverage info on handwritten files
-# but not the autogenerated ones...
-set(C_WARNING_ARGS "${C_WARNING_ARGS} -Wno-bad-function-cast") # g_clear_object()
-set(C_WARNING_ARGS "${C_WARNING_ARGS} -Wno-switch-enum")
-set_source_files_properties(${SERVICE_MANUAL_SOURCES}
- PROPERTIES COMPILE_FLAGS "${C_WARNING_ARGS} -g -std=c99")
-
# the service library for tests to link against (basically, everything except main())
-add_library(${SERVICE_LIB} STATIC ${SERVICE_MANUAL_SOURCES} ${SERVICE_GENERATED_SOURCES})
+add_library(${SERVICE_LIB} STATIC ${SERVICE_MANUAL_SOURCES})
include_directories(${CMAKE_SOURCE_DIR})
link_directories(${SERVICE_DEPS_LIBRARY_DIRS})
# the executable: lib + main()
add_executable (${SERVICE_EXEC} main.c)
-set_source_files_properties(${SERVICE_SOURCES} main.c PROPERTIES COMPILE_FLAGS "${C_WARNING_ARGS} -std=c99")
target_link_libraries (${SERVICE_EXEC} ${SERVICE_LIB} ${SERVICE_DEPS_LIBRARIES})
-install (TARGETS ${SERVICE_EXEC} RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_PKGLIBEXECDIR})
+install (TARGETS ${SERVICE_EXEC} RUNTIME DESTINATION "${CMAKE_INSTALL_FULL_LIBEXECDIR}/${CMAKE_PROJECT_NAME}")
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)