summaryrefslogtreecommitdiff
path: root/src/capplet
diff options
context:
space:
mode:
authorrbuj <[email protected]>2020-11-17 10:07:18 +0100
committerraveit65 <[email protected]>2020-11-26 11:50:18 +0100
commit921920e1dc19da3f7a6c50e7f6add9f4b42aa6ab (patch)
tree06400a1c76c6d24426f936f72edc92c8e043c0c8 /src/capplet
parentc1dd04d294e329da95c515d7f5a9ac7a00d269cc (diff)
downloadmate-notification-daemon-921920e1dc19da3f7a6c50e7f6add9f4b42aa6ab.tar.bz2
mate-notification-daemon-921920e1dc19da3f7a6c50e7f6add9f4b42aa6ab.tar.xz
Group common constants in a single file
Diffstat (limited to 'src/capplet')
-rw-r--r--src/capplet/Makefile.am4
-rw-r--r--src/capplet/mate-notification-applet.c3
-rw-r--r--src/capplet/mate-notification-properties.c8
3 files changed, 6 insertions, 9 deletions
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 <libmate-desktop/mate-desktop-utils.h>
-#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 <libnotify/notify.h>
#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;