[gnome-flashback] notifications: initial version
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-flashback] notifications: initial version
- Date: Thu, 18 Feb 2016 12:21:35 +0000 (UTC)
commit 413691f621dd7b9e69a169d26e4ca2007ac251b9
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Thu Feb 18 12:40:59 2016 +0200
notifications: initial version
configure.ac | 8 ++++
data/schemas/org.gnome.gnome-flashback.gschema.xml | 6 +++
gnome-flashback/Makefile.am | 2 +
gnome-flashback/gf-application.c | 4 ++
gnome-flashback/libnotifications/Makefile.am | 31 ++++++++++++++
.../libnotifications/gf-notifications.c | 43 ++++++++++++++++++++
.../libnotifications/gf-notifications.h | 33 +++++++++++++++
7 files changed, 127 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index dc05908..12bb2bf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -170,6 +170,13 @@ PKG_CHECK_MODULES([INPUT_SOURCES], [
xkeyboard-config
])
+PKG_CHECK_MODULES([NOTIFICATIONS], [
+ gtk+-3.0 >= $GTK_REQUIRED
+ glib-2.0 >= $GLIB_REQUIRED
+ gio-2.0 >= $GLIB_REQUIRED
+ x11
+])
+
PKG_CHECK_MODULES([POLKIT], [
gtk+-3.0 >= $GTK_REQUIRED
glib-2.0 >= $GLIB_REQUIRED
@@ -275,6 +282,7 @@ AC_CONFIG_FILES([
gnome-flashback/libend-session-dialog/Makefile
gnome-flashback/libidle-monitor/Makefile
gnome-flashback/libinput-sources/Makefile
+ gnome-flashback/libnotifications/Makefile
gnome-flashback/libpolkit/Makefile
gnome-flashback/libpower-applet/Makefile
gnome-flashback/libscreencast/Makefile
diff --git a/data/schemas/org.gnome.gnome-flashback.gschema.xml
b/data/schemas/org.gnome.gnome-flashback.gschema.xml
index 5d6b56c..664be02 100644
--- a/data/schemas/org.gnome.gnome-flashback.gschema.xml
+++ b/data/schemas/org.gnome.gnome-flashback.gschema.xml
@@ -43,6 +43,12 @@
<description>If set to true, then GNOME Flashback application will be used to manage keyboard layouts
and input methods.</description>
</key>
+ <key name="notifications" type="b">
+ <default>true</default>
+ <summary>Notification daemon</summary>
+ <description>If set to true, then GNOME Flashback application will be used to manage
notifications.</description>
+ </key>
+
<key name="polkit" type="b">
<default>true</default>
<summary>Authentication agent for polkit</summary>
diff --git a/gnome-flashback/Makefile.am b/gnome-flashback/Makefile.am
index 41c6a94..69ea2fd 100644
--- a/gnome-flashback/Makefile.am
+++ b/gnome-flashback/Makefile.am
@@ -9,6 +9,7 @@ SUBDIRS = \
libend-session-dialog \
libidle-monitor \
libinput-sources \
+ libnotifications \
libpolkit \
libpower-applet \
libscreencast \
@@ -57,6 +58,7 @@ gnome_flashback_LDADD = \
$(top_builddir)/gnome-flashback/libend-session-dialog/libend-session-dialog.la \
$(top_builddir)/gnome-flashback/libidle-monitor/libidle-monitor.la \
$(top_builddir)/gnome-flashback/libinput-sources/libinput-sources.la \
+ $(top_builddir)/gnome-flashback/libnotifications/libnotifications.la \
$(top_builddir)/gnome-flashback/libpolkit/libpolkit.la \
$(top_builddir)/gnome-flashback/libpower-applet/libpower-applet.la \
$(top_builddir)/gnome-flashback/libscreencast/libscreencast.la \
diff --git a/gnome-flashback/gf-application.c b/gnome-flashback/gf-application.c
index 7b22e0e..6ef94cb 100644
--- a/gnome-flashback/gf-application.c
+++ b/gnome-flashback/gf-application.c
@@ -28,6 +28,7 @@
#include "libend-session-dialog/gf-end-session-dialog.h"
#include "libidle-monitor/flashback-idle-monitor.h"
#include "libinput-sources/gf-input-sources.h"
+#include "libnotifications/gf-notifications.h"
#include "libpolkit/flashback-polkit.h"
#include "libpower-applet/gf-power-applet.h"
#include "libscreencast/gf-screencast.h"
@@ -59,6 +60,7 @@ struct _GfApplication
GfDesktopBackground *background;
GfEndSessionDialog *dialog;
GfInputSources *input_sources;
+ GfNotifications *notifications;
GfPowerApplet *power;
GfScreencast *screencast;
GfScreenshot *screenshot;
@@ -154,6 +156,7 @@ settings_changed (GSettings *settings,
SETTING_CHANGED (background, "desktop-background", gf_desktop_background_new)
SETTING_CHANGED (dialog, "end-session-dialog", gf_end_session_dialog_new)
SETTING_CHANGED (input_sources, "input-sources", gf_input_sources_new)
+ SETTING_CHANGED (notifications, "notifications", gf_notifications_new)
SETTING_CHANGED (power, "power-applet", gf_power_applet_new)
SETTING_CHANGED (screencast, "screencast", gf_screencast_new)
SETTING_CHANGED (screenshot, "screenshot", gf_screenshot_new)
@@ -196,6 +199,7 @@ gf_application_dispose (GObject *object)
g_clear_object (&application->background);
g_clear_object (&application->dialog);
g_clear_object (&application->input_sources);
+ g_clear_object (&application->notifications);
g_clear_object (&application->power);
g_clear_object (&application->screencast);
g_clear_object (&application->screenshot);
diff --git a/gnome-flashback/libnotifications/Makefile.am b/gnome-flashback/libnotifications/Makefile.am
new file mode 100644
index 0000000..d1dae35
--- /dev/null
+++ b/gnome-flashback/libnotifications/Makefile.am
@@ -0,0 +1,31 @@
+NULL =
+
+noinst_LTLIBRARIES = \
+ libnotifications.la \
+ $(NULL)
+
+libnotifications_la_CPPFLAGS = \
+ -I$(top_builddir)/gnome-flashback/libnotifications \
+ $(NULL)
+
+libnotifications_la_CFLAGS = \
+ $(NOTIFICATIONS_CFLAGS) \
+ $(WARN_CFLAGS) \
+ $(AM_CFLAGS) \
+ $(NULL)
+
+libnotifications_la_SOURCES = \
+ gf-notifications.c \
+ gf-notifications.h \
+ $(NULL)
+
+libnotifications_la_LDFLAGS = \
+ $(WARN_LDFLAGS) \
+ $(AM_LDFLAGS) \
+ $(NULL)
+
+libnotifications_la_LIBADD = \
+ $(NOTIFICATIONS_LIBS) \
+ $(NULL)
+
+-include $(top_srcdir)/git.mk
diff --git a/gnome-flashback/libnotifications/gf-notifications.c
b/gnome-flashback/libnotifications/gf-notifications.c
new file mode 100644
index 0000000..ac09757
--- /dev/null
+++ b/gnome-flashback/libnotifications/gf-notifications.c
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2016 Alberts Muktupāvels
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "config.h"
+
+#include "gf-notifications.h"
+
+struct _GfNotifications
+{
+ GObject parent;
+};
+
+G_DEFINE_TYPE (GfNotifications, gf_notifications, G_TYPE_OBJECT)
+
+static void
+gf_notifications_class_init (GfNotificationsClass *notifications_class)
+{
+}
+
+static void
+gf_notifications_init (GfNotifications *notifications)
+{
+}
+
+GfNotifications *
+gf_notifications_new (void)
+{
+ return g_object_new (GF_TYPE_NOTIFICATIONS, NULL);
+}
diff --git a/gnome-flashback/libnotifications/gf-notifications.h
b/gnome-flashback/libnotifications/gf-notifications.h
new file mode 100644
index 0000000..c1dcdac
--- /dev/null
+++ b/gnome-flashback/libnotifications/gf-notifications.h
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2016 Alberts Muktupāvels
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GF_NOTIFICATIONS_H
+#define GF_NOTIFICATIONS_H
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define GF_TYPE_NOTIFICATIONS gf_notifications_get_type ()
+G_DECLARE_FINAL_TYPE (GfNotifications, gf_notifications,
+ GF, NOTIFICATIONS, GObject)
+
+GfNotifications *gf_notifications_new (void);
+
+G_END_DECLS
+
+#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]