[gnome-flashback] move desktop background to libdesktop-background
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-flashback] move desktop background to libdesktop-background
- Date: Fri, 29 Aug 2014 17:33:54 +0000 (UTC)
commit 16a6f65ae88efc8bc8ed6e2007656c6368a36b6e
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Fri Aug 29 15:37:15 2014 +0300
move desktop background to libdesktop-background
configure.ac | 7 ++++++-
gnome-flashback/Makefile.am | 11 ++++++-----
gnome-flashback/flashback-application.c | 2 +-
gnome-flashback/flashback-gsettings.h | 5 -----
gnome-flashback/libdesktop-background/Makefile.am | 16 ++++++++++++++++
.../flashback-desktop-background.c | 6 ++++--
.../flashback-desktop-background.h | 0
7 files changed, 33 insertions(+), 14 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 299f36d..9dc8522 100644
--- a/configure.ac
+++ b/configure.ac
@@ -34,13 +34,18 @@ GTK_REQUIRED=3.10.0
LIBGNOME_DESKTOP_REQUIRED=3.8.0
# Dependencies
-PKG_CHECK_MODULES(GNOME_FLASHBACK, gtk+-3.0 >= $GTK_REQUIRED gnome-desktop-3.0 >= $LIBGNOME_DESKTOP_REQUIRED)
+PKG_CHECK_MODULES(GNOME_FLASHBACK, gtk+-3.0 >= $GTK_REQUIRED)
AC_SUBST(GNOME_FLASHBACK_CFLAGS)
AC_SUBST(GNOME_FLASHBACK_LIBS)
+PKG_CHECK_MODULES(DESKTOP_BACKGROUND, gtk+-3.0 >= $GTK_REQUIRED gnome-desktop-3.0 >=
$LIBGNOME_DESKTOP_REQUIRED)
+AC_SUBST(DESKTOP_BACKGROUND_CFLAGS)
+AC_SUBST(DESKTOP_BACKGROUND_LIBS)
+
AC_CONFIG_FILES([
Makefile
gnome-flashback/Makefile
+gnome-flashback/libdesktop-background/Makefile
po/Makefile.in
sessions/Makefile
])
diff --git a/gnome-flashback/Makefile.am b/gnome-flashback/Makefile.am
index e29890d..06df93c 100644
--- a/gnome-flashback/Makefile.am
+++ b/gnome-flashback/Makefile.am
@@ -1,11 +1,13 @@
+SUBDIRS = \
+ libdesktop-background
+
bin_PROGRAMS = \
gnome-flashback
AM_CPPFLAGS = \
$(GNOME_FLASHBACK_CFLAGS) \
-I$(top_builddir)/gnome-flashback \
- -DGNOMELOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
- -DGNOME_DESKTOP_USE_UNSTABLE_API
+ -DGNOMELOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\"
gnome_flashback_SOURCES = \
dbus-display-config.c \
@@ -16,8 +18,6 @@ gnome_flashback_SOURCES = \
dbus-idle-monitor.h \
flashback-application.c \
flashback-application.h \
- flashback-desktop-background.c \
- flashback-desktop-background.h \
flashback-display-config.c \
flashback-display-config.h \
flashback-end-session-dialog.c \
@@ -32,7 +32,8 @@ gnome_flashback_SOURCES = \
flashback-resources.h
gnome_flashback_LDADD = \
- $(GNOME_FLASHBACK_LIBS)
+ $(GNOME_FLASHBACK_LIBS) \
+ $(top_builddir)/gnome-flashback/libdesktop-background/libdesktop-background.la
desktopdir = $(datadir)/applications
desktop_in_files = gnome-flashback.desktop.in
diff --git a/gnome-flashback/flashback-application.c b/gnome-flashback/flashback-application.c
index 08a5f45..0f1c3a9 100644
--- a/gnome-flashback/flashback-application.c
+++ b/gnome-flashback/flashback-application.c
@@ -19,7 +19,7 @@
#include <gtk/gtk.h>
#include "config.h"
#include "flashback-application.h"
-#include "flashback-desktop-background.h"
+#include "libdesktop-background/flashback-desktop-background.h"
#include "flashback-display-config.h"
#include "flashback-end-session-dialog.h"
#include "flashback-gsettings.h"
diff --git a/gnome-flashback/flashback-gsettings.h b/gnome-flashback/flashback-gsettings.h
index ff7e060..f18660c 100644
--- a/gnome-flashback/flashback-gsettings.h
+++ b/gnome-flashback/flashback-gsettings.h
@@ -25,9 +25,4 @@
#define KEY_IDLE_MONITOR "idle-monitor"
#define KEY_SOUND_APPLET "sound-applet"
-/*#define FLASHBACK_BACKGROUND_SCHEMA "org.gnome.gnome-flashback.background"
-#define KEY_FADE "fade"*/
-
-#define GNOME_DESKTOP_BACKGROUND_SCHEMA "org.gnome.desktop.background"
-
#endif
diff --git a/gnome-flashback/libdesktop-background/Makefile.am
b/gnome-flashback/libdesktop-background/Makefile.am
new file mode 100644
index 0000000..caba574
--- /dev/null
+++ b/gnome-flashback/libdesktop-background/Makefile.am
@@ -0,0 +1,16 @@
+noinst_LTLIBRARIES = \
+ libdesktop-background.la
+
+AM_CPPFLAGS = \
+ $(DESKTOP_BACKGROUND_CFLAGS) \
+ -I$(top_builddir)/gnome-flashback/libdesktop-background \
+ -DGNOME_DESKTOP_USE_UNSTABLE_API
+
+libdesktop_background_la_SOURCES = \
+ flashback-desktop-background.c \
+ flashback-desktop-background.h
+
+libdesktop_background_la_LIBADD = \
+ $(DESKTOP_BACKGROUND_LIBS)
+
+-include $(top_srcdir)/git.mk
diff --git a/gnome-flashback/flashback-desktop-background.c
b/gnome-flashback/libdesktop-background/flashback-desktop-background.c
similarity index 96%
rename from gnome-flashback/flashback-desktop-background.c
rename to gnome-flashback/libdesktop-background/flashback-desktop-background.c
index 4db65f9..00bd34e 100644
--- a/gnome-flashback/flashback-desktop-background.c
+++ b/gnome-flashback/libdesktop-background/flashback-desktop-background.c
@@ -18,7 +18,9 @@
#include <gtk/gtk.h>
#include <libgnome-desktop/gnome-bg.h>
#include "flashback-desktop-background.h"
-#include "flashback-gsettings.h"
+
+/*#define FLASHBACK_BACKGROUND_SCHEMA "org.gnome.gnome-flashback.background"
+#define KEY_FADE "fade"*/
struct _FlashbackDesktopBackgroundPrivate {
GnomeBG *gnome_bg;
@@ -120,7 +122,7 @@ flashback_desktop_background_init (FlashbackDesktopBackground *background)
background->priv = G_TYPE_INSTANCE_GET_PRIVATE (background, FLASHBACK_TYPE_DESKTOP_BACKGROUND,
FlashbackDesktopBackgroundPrivate);
background->priv->gnome_bg = gnome_bg_new ();
- background->priv->gnome_settings = g_settings_new (GNOME_DESKTOP_BACKGROUND_SCHEMA);
+ background->priv->gnome_settings = g_settings_new ("org.gnome.desktop.background");
g_signal_connect (background->priv->gnome_bg, "changed",
G_CALLBACK (flashback_desktop_background_changed), background);
diff --git a/gnome-flashback/flashback-desktop-background.h
b/gnome-flashback/libdesktop-background/flashback-desktop-background.h
similarity index 100%
rename from gnome-flashback/flashback-desktop-background.h
rename to gnome-flashback/libdesktop-background/flashback-desktop-background.h
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]