[gnome-flashback] move display config and idle monitor to library



commit 89b043db6adcfd3b185cd09ac4f191ced0d1d477
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Fri Aug 29 16:24:21 2014 +0300

    move display config and idle monitor to library

 configure.ac                                       |   10 ++++
 gnome-flashback/Makefile.am                        |   44 +++----------------
 gnome-flashback/flashback-application.c            |    4 +-
 gnome-flashback/libdisplay-config/Makefile.am      |   36 ++++++++++++++++
 .../flashback-display-config.c                     |    0
 .../flashback-display-config.h                     |    0
 .../org.gnome.Mutter.DisplayConfig.xml             |    0
 gnome-flashback/libidle-monitor/Makefile.am        |   37 ++++++++++++++++
 .../{ => libidle-monitor}/flashback-idle-monitor.c |    0
 .../{ => libidle-monitor}/flashback-idle-monitor.h |    0
 .../org.gnome.Mutter.IdleMonitor.xml               |    0
 11 files changed, 92 insertions(+), 39 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 0be6ccf..8e624d1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -46,11 +46,21 @@ PKG_CHECK_MODULES(DESKTOP_BACKGROUND, gtk+-3.0 >= $GTK_REQUIRED gnome-desktop-3.
 AC_SUBST(DESKTOP_BACKGROUND_CFLAGS)
 AC_SUBST(DESKTOP_BACKGROUND_LIBS)
 
+PKG_CHECK_MODULES(DISPLAY_CONFIG, gtk+-3.0 >= $GTK_REQUIRED)
+AC_SUBST(DISPLAY_CONFIG_CFLAGS)
+AC_SUBST(DISPLAY_CONFIG_LIBS)
+
+PKG_CHECK_MODULES(IDLE_MONITOR, gtk+-3.0 >= $GTK_REQUIRED)
+AC_SUBST(IDLE_MONITOR_CFLAGS)
+AC_SUBST(IDLE_MONITOR_LIBS)
+
 AC_CONFIG_FILES([
 Makefile
 gnome-flashback/Makefile
 gnome-flashback/libdesktop-background/Makefile
+gnome-flashback/libdisplay-config/Makefile
 gnome-flashback/libend-session-dialog/Makefile
+gnome-flashback/libidle-monitor/Makefile
 po/Makefile.in
 sessions/Makefile
 ])
diff --git a/gnome-flashback/Makefile.am b/gnome-flashback/Makefile.am
index b072a95..56bc4a8 100644
--- a/gnome-flashback/Makefile.am
+++ b/gnome-flashback/Makefile.am
@@ -1,6 +1,8 @@
 SUBDIRS = \
        libdesktop-background \
-       libend-session-dialog
+       libdisplay-config \
+       libend-session-dialog \
+       libidle-monitor
 
 bin_PROGRAMS = \
        gnome-flashback
@@ -11,22 +13,16 @@ AM_CPPFLAGS = \
        -DGNOMELOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\"
 
 gnome_flashback_SOURCES = \
-       dbus-display-config.c \
-       dbus-display-config.h \
-       dbus-idle-monitor.c \
-       dbus-idle-monitor.h \
        flashback-application.c \
        flashback-application.h \
-       flashback-display-config.c \
-       flashback-display-config.h \
-       flashback-idle-monitor.c \
-       flashback-idle-monitor.h \
        flashback-main.c
 
 gnome_flashback_LDADD = \
        $(GNOME_FLASHBACK_LIBS) \
        $(top_builddir)/gnome-flashback/libdesktop-background/libdesktop-background.la \
-       $(top_builddir)/gnome-flashback/libend-session-dialog/libend-session-dialog.la
+       $(top_builddir)/gnome-flashback/libdisplay-config/libdisplay-config.la \
+       $(top_builddir)/gnome-flashback/libend-session-dialog/libend-session-dialog.la \
+       $(top_builddir)/gnome-flashback/libidle-monitor/libidle-monitor.la
 
 desktopdir       = $(datadir)/applications
 desktop_in_files = gnome-flashback.desktop.in
@@ -34,29 +30,6 @@ desktop_DATA     = $(desktop_in_files:.desktop.in=.desktop)
 
 %.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d 
-u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
 
-dbus-display-config.h:
-dbus-display-config.c: org.gnome.Mutter.DisplayConfig.xml
-       $(AM_V_GEN) gdbus-codegen \
-               --interface-prefix org.gnome.Mutter \
-               --c-namespace DBus \
-               --generate-c-code dbus-display-config \
-               $(srcdir)/org.gnome.Mutter.DisplayConfig.xml
-
-dbus-idle-monitor.h:
-dbus-idle-monitor.c: org.gnome.Mutter.IdleMonitor.xml
-       $(AM_V_GEN) gdbus-codegen \
-               --interface-prefix org.gnome.Mutter \
-               --c-namespace DBus \
-               --generate-c-code dbus-idle-monitor \
-               --c-generate-object-manager \
-               $(srcdir)/org.gnome.Mutter.IdleMonitor.xml
-
-BUILT_SOURCES = \
-       dbus-display-config.h \
-       dbus-display-config.c \
-       dbus-idle-monitor.h \
-       dbus-idle-monitor.c
-
 @INTLTOOL_XML_NOMERGE_RULE@
 
 gsettings_schemas_in_in = org.gnome.gnome-flashback.gschema.xml.in.in
@@ -70,13 +43,10 @@ gsettings_SCHEMAS       = $(gsettings_schemas_in:.xml.in=.xml)
 
 EXTRA_DIST = \
        $(desktop_in_files) \
-       $(gsettings_schemas_in_in) \
-       org.gnome.Mutter.DisplayConfig.xml \
-       org.gnome.Mutter.IdleMonitor.xml
+       $(gsettings_schemas_in_in)
 
 CLEANFILES = \
        $(desktop_DATA) \
-       $(BUILT_SOURCES) \
        $(gsettings_schemas_in) \
        $(gsettings_SCHEMAS) \
        *.gschema.valid
diff --git a/gnome-flashback/flashback-application.c b/gnome-flashback/flashback-application.c
index 5922c6b..ca14b5a 100644
--- a/gnome-flashback/flashback-application.c
+++ b/gnome-flashback/flashback-application.c
@@ -20,9 +20,9 @@
 #include "config.h"
 #include "flashback-application.h"
 #include "libdesktop-background/flashback-desktop-background.h"
-#include "flashback-display-config.h"
+#include "libdisplay-config/flashback-display-config.h"
 #include "libend-session-dialog/flashback-end-session-dialog.h"
-#include "flashback-idle-monitor.h"
+#include "libidle-monitor/flashback-idle-monitor.h"
 
 #define FLASHBACK_SCHEMA       "org.gnome.gnome-flashback"
 #define KEY_DESKTOP_BACKGROUND "desktop-background"
diff --git a/gnome-flashback/libdisplay-config/Makefile.am b/gnome-flashback/libdisplay-config/Makefile.am
new file mode 100644
index 0000000..5c6b2ee
--- /dev/null
+++ b/gnome-flashback/libdisplay-config/Makefile.am
@@ -0,0 +1,36 @@
+noinst_LTLIBRARIES = \
+       libdisplay-config.la
+
+AM_CPPFLAGS = \
+       $(DISPLAY_CONFIG_CFLAGS) \
+       -I$(top_builddir)/gnome-flashback/libdisplay-config \
+       -DGNOMELOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\"
+
+libdisplay_config_la_SOURCES = \
+       dbus-display-config.c \
+       dbus-display-config.h \
+       flashback-display-config.c \
+       flashback-display-config.h
+
+libdisplay_config_la_LIBADD = \
+       $(DISPLAY_CONFIG_LIBS)
+
+dbus-display-config.h:
+dbus-display-config.c: org.gnome.Mutter.DisplayConfig.xml
+       $(AM_V_GEN) gdbus-codegen \
+               --interface-prefix org.gnome.Mutter \
+               --c-namespace DBus \
+               --generate-c-code dbus-display-config \
+               $(srcdir)/org.gnome.Mutter.DisplayConfig.xml
+
+BUILT_SOURCES = \
+       dbus-display-config.h \
+       dbus-display-config.c
+
+EXTRA_DIST = \
+       org.gnome.Mutter.DisplayConfig.xml
+
+CLEANFILES = \
+       $(BUILT_SOURCES)
+
+-include $(top_srcdir)/git.mk
diff --git a/gnome-flashback/flashback-display-config.c 
b/gnome-flashback/libdisplay-config/flashback-display-config.c
similarity index 100%
rename from gnome-flashback/flashback-display-config.c
rename to gnome-flashback/libdisplay-config/flashback-display-config.c
diff --git a/gnome-flashback/flashback-display-config.h 
b/gnome-flashback/libdisplay-config/flashback-display-config.h
similarity index 100%
rename from gnome-flashback/flashback-display-config.h
rename to gnome-flashback/libdisplay-config/flashback-display-config.h
diff --git a/gnome-flashback/org.gnome.Mutter.DisplayConfig.xml 
b/gnome-flashback/libdisplay-config/org.gnome.Mutter.DisplayConfig.xml
similarity index 100%
rename from gnome-flashback/org.gnome.Mutter.DisplayConfig.xml
rename to gnome-flashback/libdisplay-config/org.gnome.Mutter.DisplayConfig.xml
diff --git a/gnome-flashback/libidle-monitor/Makefile.am b/gnome-flashback/libidle-monitor/Makefile.am
new file mode 100644
index 0000000..e3f71d2
--- /dev/null
+++ b/gnome-flashback/libidle-monitor/Makefile.am
@@ -0,0 +1,37 @@
+noinst_LTLIBRARIES = \
+       libidle-monitor.la
+
+AM_CPPFLAGS = \
+       $(IDLE_MONITOR_CFLAGS) \
+       -I$(top_builddir)/gnome-flashback/libidle-monitor \
+       -DGNOMELOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\"
+
+libidle_monitor_la_SOURCES = \
+       dbus-idle-monitor.c \
+       dbus-idle-monitor.h \
+       flashback-idle-monitor.c \
+       flashback-idle-monitor.h
+
+libidle_monitor_la_LIBADD = \
+       $(IDLE_MONITOR_LIBS)
+
+dbus-idle-monitor.h:
+dbus-idle-monitor.c: org.gnome.Mutter.IdleMonitor.xml
+       $(AM_V_GEN) gdbus-codegen \
+               --interface-prefix org.gnome.Mutter \
+               --c-namespace DBus \
+               --generate-c-code dbus-idle-monitor \
+               --c-generate-object-manager \
+               $(srcdir)/org.gnome.Mutter.IdleMonitor.xml
+
+BUILT_SOURCES = \
+       dbus-idle-monitor.h \
+       dbus-idle-monitor.c
+
+EXTRA_DIST = \
+       org.gnome.Mutter.IdleMonitor.xml
+
+CLEANFILES = \
+       $(BUILT_SOURCES)
+
+-include $(top_srcdir)/git.mk
diff --git a/gnome-flashback/flashback-idle-monitor.c 
b/gnome-flashback/libidle-monitor/flashback-idle-monitor.c
similarity index 100%
rename from gnome-flashback/flashback-idle-monitor.c
rename to gnome-flashback/libidle-monitor/flashback-idle-monitor.c
diff --git a/gnome-flashback/flashback-idle-monitor.h 
b/gnome-flashback/libidle-monitor/flashback-idle-monitor.h
similarity index 100%
rename from gnome-flashback/flashback-idle-monitor.h
rename to gnome-flashback/libidle-monitor/flashback-idle-monitor.h
diff --git a/gnome-flashback/org.gnome.Mutter.IdleMonitor.xml 
b/gnome-flashback/libidle-monitor/org.gnome.Mutter.IdleMonitor.xml
similarity index 100%
rename from gnome-flashback/org.gnome.Mutter.IdleMonitor.xml
rename to gnome-flashback/libidle-monitor/org.gnome.Mutter.IdleMonitor.xml


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]