aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Conti <jason.conti@gmail.com>2019-06-07 16:26:23 -0400
committerJason Conti <jason.conti@gmail.com>2019-06-07 16:26:23 -0400
commitc86a42ea6ab8f995d9ee34359769ed934336fe7a (patch)
tree43a5765a05bbce6c44f4b531a24114bd7e52719c
parente704cbf0b4aaf4c71341c5b585ae01ede2fed4b6 (diff)
downloadayatana-indicator-notifications-c86a42ea6ab8f995d9ee34359769ed934336fe7a.tar.gz
ayatana-indicator-notifications-c86a42ea6ab8f995d9ee34359769ed934336fe7a.tar.bz2
ayatana-indicator-notifications-c86a42ea6ab8f995d9ee34359769ed934336fe7a.zip
* Pull out gsettings schema keys to settings.h to avoid duplication
-rw-r--r--src/Makefile.am2
-rw-r--r--src/indicator-notifications-settings.c6
-rw-r--r--src/indicator-notifications.c6
-rw-r--r--src/settings.h14
4 files changed, 18 insertions, 10 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 2e6751c..94c0c07 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -9,6 +9,7 @@ libnotifications_la_SOURCES = \
urlregex.h \
notification-menuitem.c \
notification-menuitem.h \
+ settings.h \
indicator-notifications.c \
notification.c \
notification.h
@@ -28,6 +29,7 @@ libnotifications_la_LDFLAGS = \
libexec_PROGRAMS = indicator-notifications-settings
indicator_notifications_settings_SOURCES = \
+ settings.h \
indicator-notifications-settings.c
indicator_notifications_settings_CFLAGS = \
diff --git a/src/indicator-notifications-settings.c b/src/indicator-notifications-settings.c
index 04e9209..e7cc04f 100644
--- a/src/indicator-notifications-settings.c
+++ b/src/indicator-notifications-settings.c
@@ -1,10 +1,6 @@
#include <gtk/gtk.h>
-#define NOTIFICATIONS_SCHEMA "net.launchpad.indicator.notifications"
-#define NOTIFICATIONS_KEY_BLACKLIST "blacklist"
-#define NOTIFICATIONS_KEY_CLEAR_MC "clear-on-middle-click"
-#define NOTIFICATIONS_KEY_HIDE_INDICATOR "hide-indicator"
-#define NOTIFICATIONS_KEY_MAX_ITEMS "max-items"
+#include "settings.h"
#define SCHEMA_KEY "schema-key"
diff --git a/src/indicator-notifications.c b/src/indicator-notifications.c
index 41164c9..72db13d 100644
--- a/src/indicator-notifications.c
+++ b/src/indicator-notifications.c
@@ -87,11 +87,7 @@ struct _IndicatorNotificationsPrivate {
#define INDICATOR_NOTIFICATIONS_GET_PRIVATE(o) \
(G_TYPE_INSTANCE_GET_PRIVATE ((o), INDICATOR_NOTIFICATIONS_TYPE, IndicatorNotificationsPrivate))
-#define NOTIFICATIONS_SCHEMA "net.launchpad.indicator.notifications"
-#define NOTIFICATIONS_KEY_BLACKLIST "blacklist"
-#define NOTIFICATIONS_KEY_CLEAR_MC "clear-on-middle-click"
-#define NOTIFICATIONS_KEY_HIDE_INDICATOR "hide-indicator"
-#define NOTIFICATIONS_KEY_MAX_ITEMS "max-items"
+#include "settings.h"
#define INDICATOR_ICON_SIZE 22
#define INDICATOR_ICON_READ "indicator-notification-read"
diff --git a/src/settings.h b/src/settings.h
new file mode 100644
index 0000000..92521e5
--- /dev/null
+++ b/src/settings.h
@@ -0,0 +1,14 @@
+/*
+ * settings.h - Definitions of settings keys and schema.
+ */
+
+#ifndef __SETTINGS_H__
+#define __SETTINGS_H__
+
+#define NOTIFICATIONS_SCHEMA "net.launchpad.indicator.notifications"
+#define NOTIFICATIONS_KEY_BLACKLIST "blacklist"
+#define NOTIFICATIONS_KEY_CLEAR_MC "clear-on-middle-click"
+#define NOTIFICATIONS_KEY_HIDE_INDICATOR "hide-indicator"
+#define NOTIFICATIONS_KEY_MAX_ITEMS "max-items"
+
+#endif