[gnome-flashback] screensaver: initial version
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-flashback] screensaver: initial version
- Date: Thu, 18 Feb 2016 12:21:40 +0000 (UTC)
commit 01f67d9fec4000ffe1684fd96af530d13d8f844b
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Thu Feb 18 12:51:24 2016 +0200
screensaver: initial version
configure.ac | 5 ++
data/schemas/org.gnome.gnome-flashback.gschema.xml | 6 +++
gnome-flashback/Makefile.am | 2 +
gnome-flashback/gf-application.c | 4 ++
gnome-flashback/libscreensaver/Makefile.am | 31 ++++++++++++++
gnome-flashback/libscreensaver/gf-screensaver.c | 43 ++++++++++++++++++++
gnome-flashback/libscreensaver/gf-screensaver.h | 32 +++++++++++++++
7 files changed, 123 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 12bb2bf..533be39 100644
--- a/configure.ac
+++ b/configure.ac
@@ -193,6 +193,10 @@ PKG_CHECK_MODULES([SCREENCAST], [
gtk+-3.0 >= $GTK_REQUIRED
])
+PKG_CHECK_MODULES([SCREENSAVER], [
+ glib-2.0 >= $GLIB_REQUIRED
+])
+
PKG_CHECK_MODULES([SCREENSHOT], [
gtk+-3.0 >= $GTK_REQUIRED
x11
@@ -286,6 +290,7 @@ AC_CONFIG_FILES([
gnome-flashback/libpolkit/Makefile
gnome-flashback/libpower-applet/Makefile
gnome-flashback/libscreencast/Makefile
+ gnome-flashback/libscreensaver/Makefile
gnome-flashback/libscreenshot/Makefile
gnome-flashback/libshell/Makefile
gnome-flashback/libsound-applet/Makefile
diff --git a/data/schemas/org.gnome.gnome-flashback.gschema.xml
b/data/schemas/org.gnome.gnome-flashback.gschema.xml
index 664be02..d93009d 100644
--- a/data/schemas/org.gnome.gnome-flashback.gschema.xml
+++ b/data/schemas/org.gnome.gnome-flashback.gschema.xml
@@ -67,6 +67,12 @@
<description>If set to true, then GNOME Flashback application will be used to record the
screen.</description>
</key>
+ <key name="screensaver" type="b">
+ <default>true</default>
+ <summary>Screensaver</summary>
+ <description>If set to true, then GNOME Flashback application will be used as
Screensaver.</description>
+ </key>
+
<key name="screenshot" type="b">
<default>true</default>
<summary>Screenshots</summary>
diff --git a/gnome-flashback/Makefile.am b/gnome-flashback/Makefile.am
index 69ea2fd..9f5d69e 100644
--- a/gnome-flashback/Makefile.am
+++ b/gnome-flashback/Makefile.am
@@ -13,6 +13,7 @@ SUBDIRS = \
libpolkit \
libpower-applet \
libscreencast \
+ libscreensaver \
libscreenshot \
libshell \
libsound-applet \
@@ -62,6 +63,7 @@ gnome_flashback_LDADD = \
$(top_builddir)/gnome-flashback/libpolkit/libpolkit.la \
$(top_builddir)/gnome-flashback/libpower-applet/libpower-applet.la \
$(top_builddir)/gnome-flashback/libscreencast/libscreencast.la \
+ $(top_builddir)/gnome-flashback/libscreensaver/libscreensaver.la \
$(top_builddir)/gnome-flashback/libscreenshot/libscreenshot.la \
$(top_builddir)/gnome-flashback/libshell/libshell.la \
$(top_builddir)/gnome-flashback/libsound-applet/libsound-applet.la \
diff --git a/gnome-flashback/gf-application.c b/gnome-flashback/gf-application.c
index 6ef94cb..05e2d69 100644
--- a/gnome-flashback/gf-application.c
+++ b/gnome-flashback/gf-application.c
@@ -32,6 +32,7 @@
#include "libpolkit/flashback-polkit.h"
#include "libpower-applet/gf-power-applet.h"
#include "libscreencast/gf-screencast.h"
+#include "libscreensaver/gf-screensaver.h"
#include "libscreenshot/gf-screenshot.h"
#include "libshell/flashback-shell.h"
#include "libsound-applet/gf-sound-applet.h"
@@ -63,6 +64,7 @@ struct _GfApplication
GfNotifications *notifications;
GfPowerApplet *power;
GfScreencast *screencast;
+ GfScreensaver *screensaver;
GfScreenshot *screenshot;
GfSoundApplet *sound;
GfWorkarounds *workarounds;
@@ -159,6 +161,7 @@ settings_changed (GSettings *settings,
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 (screensaver, "screensaver", gf_screensaver_new)
SETTING_CHANGED (screenshot, "screenshot", gf_screenshot_new)
SETTING_CHANGED (sound, "sound-applet", gf_sound_applet_new)
SETTING_CHANGED (workarounds, "workarounds", gf_workarounds_new)
@@ -203,6 +206,7 @@ gf_application_dispose (GObject *object)
g_clear_object (&application->power);
g_clear_object (&application->screencast);
g_clear_object (&application->screenshot);
+ g_clear_object (&application->screensaver);
g_clear_object (&application->sound);
g_clear_object (&application->workarounds);
diff --git a/gnome-flashback/libscreensaver/Makefile.am b/gnome-flashback/libscreensaver/Makefile.am
new file mode 100644
index 0000000..2d3464c
--- /dev/null
+++ b/gnome-flashback/libscreensaver/Makefile.am
@@ -0,0 +1,31 @@
+NULL =
+
+noinst_LTLIBRARIES = \
+ libscreensaver.la \
+ $(NULL)
+
+libscreensaver_la_CPPFLAGS = \
+ -I$(top_builddir)/gnome-flashback/libscreensaver \
+ $(NULL)
+
+libscreensaver_la_CFLAGS = \
+ $(SCREENSAVER_CFLAGS) \
+ $(WARN_CFLAGS) \
+ $(AM_CFLAGS) \
+ $(NULL)
+
+libscreensaver_la_SOURCES = \
+ gf-screensaver.c \
+ gf-screensaver.h \
+ $(NULL)
+
+libscreensaver_la_LDFLAGS = \
+ $(WARN_LDFLAGS) \
+ $(AM_LDFLAGS) \
+ $(NULL)
+
+libscreensaver_la_LIBADD = \
+ $(SCREENSAVER_LIBS) \
+ $(NULL)
+
+-include $(top_srcdir)/git.mk
diff --git a/gnome-flashback/libscreensaver/gf-screensaver.c b/gnome-flashback/libscreensaver/gf-screensaver.c
new file mode 100644
index 0000000..672384c
--- /dev/null
+++ b/gnome-flashback/libscreensaver/gf-screensaver.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-screensaver.h"
+
+struct _GfScreensaver
+{
+ GObject parent;
+};
+
+G_DEFINE_TYPE (GfScreensaver, gf_screensaver, G_TYPE_OBJECT)
+
+static void
+gf_screensaver_class_init (GfScreensaverClass *screensaver_class)
+{
+}
+
+static void
+gf_screensaver_init (GfScreensaver *screensaver)
+{
+}
+
+GfScreensaver *
+gf_screensaver_new (void)
+{
+ return g_object_new (GF_TYPE_SCREENSAVER, NULL);
+}
diff --git a/gnome-flashback/libscreensaver/gf-screensaver.h b/gnome-flashback/libscreensaver/gf-screensaver.h
new file mode 100644
index 0000000..b9899f6
--- /dev/null
+++ b/gnome-flashback/libscreensaver/gf-screensaver.h
@@ -0,0 +1,32 @@
+/*
+ * 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_SCREENSAVER_H
+#define GF_SCREENSAVER_H
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define GF_TYPE_SCREENSAVER gf_screensaver_get_type ()
+G_DECLARE_FINAL_TYPE (GfScreensaver, gf_screensaver, GF, SCREENSAVER, GObject)
+
+GfScreensaver *gf_screensaver_new (void);
+
+G_END_DECLS
+
+#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]