From 921920e1dc19da3f7a6c50e7f6add9f4b42aa6ab Mon Sep 17 00:00:00 2001 From: rbuj Date: Tue, 17 Nov 2020 10:07:18 +0100 Subject: Group common constants in a single file --- src/capplet/Makefile.am | 4 ++++ src/capplet/mate-notification-applet.c | 3 +-- src/capplet/mate-notification-properties.c | 8 +------- 3 files changed, 6 insertions(+), 9 deletions(-) (limited to 'src/capplet') diff --git a/src/capplet/Makefile.am b/src/capplet/Makefile.am index 2e27e00..bf2ad40 100644 --- a/src/capplet/Makefile.am +++ b/src/capplet/Makefile.am @@ -9,6 +9,7 @@ NULL = mate_notification_properties_CFLAGS = \ -I$(top_srcdir) \ + -I$(top_srcdir)/src/common \ -I$(top_srcdir)/src/daemon \ $(NOTIFICATION_CAPPLET_CFLAGS) \ -DENGINES_DIR=\"$(libdir)/mate-notification-daemon/engines\" \ @@ -28,12 +29,14 @@ $(mate_notification_properties_resources_files): $(mate_notification_properties_ --target $@ --sourcedir $(srcdir) --generate --c-name notification_properties mate_notification_properties_SOURCES = \ $(mate_notification_properties_resources_files) \ + ../common/constants.h \ mate-notification-properties.c \ $(NULL) man_MANS = mate-notification-properties.1 mate_notification_applet_CFLAGS = \ + -I$(top_srcdir)/src/common \ $(NOTIFICATION_APPLET_CFLAGS) \ -DMATELOCALEDIR=\"$(datadir)/locale\" \ -DRESOURCE_PATH=\""/org/mate/panel/applet/notifications/"\" \ @@ -52,6 +55,7 @@ $(mate_notification_applet_resources_files): $(mate_notification_applet_resource --target $@ --sourcedir $(srcdir) --generate --c-name notification_applet mate_notification_applet_SOURCES = \ $(mate_notification_applet_resources_files) \ + ../common/constants.h \ mate-notification-applet.c \ $(NULL) diff --git a/src/capplet/mate-notification-applet.c b/src/capplet/mate-notification-applet.c index e8ef83f..1aeb120 100644 --- a/src/capplet/mate-notification-applet.c +++ b/src/capplet/mate-notification-applet.c @@ -28,8 +28,7 @@ #define MATE_DESKTOP_USE_UNSTABLE_API #include -#define GSETTINGS_SCHEMA "org.mate.NotificationDaemon" -#define GSETTINGS_KEY_DO_NOT_DISTURB "do-not-disturb" +#include "constants.h" typedef struct { diff --git a/src/capplet/mate-notification-properties.c b/src/capplet/mate-notification-properties.c index e058359..154029d 100644 --- a/src/capplet/mate-notification-properties.c +++ b/src/capplet/mate-notification-properties.c @@ -31,13 +31,7 @@ #include #include "stack.h" - -#define GSETTINGS_SCHEMA "org.mate.NotificationDaemon" -#define GSETTINGS_KEY_THEME "theme" -#define GSETTINGS_KEY_POPUP_LOCATION "popup-location" -#define GSETTINGS_KEY_MONITOR_NUMBER "monitor-number" -#define GSETTINGS_KEY_USE_ACTIVE_MONITOR "use-active-monitor" -#define GSETTINGS_KEY_DO_NOT_DISTURB "do-not-disturb" +#include "constants.h" typedef struct { GSettings* gsettings; -- cgit v1.2.1