[gnome-settings-daemon/wip/xsettings-manager] xsettings: add test-xsettings program



commit 3f25b4b852054374c82d833ec9e7c90b06089f42
Author: Ryan Lortie <desrt desrt ca>
Date:   Thu Mar 8 11:13:57 2012 -0500

    xsettings: add test-xsettings program
    
    This allows for testing the xsettings plugin without killing
    gnome-settings-daemon.

 plugins/xsettings/Makefile.am      |   14 +++++++++++++-
 plugins/xsettings/test-xsettings.c |   19 +++++++++++++++++++
 2 files changed, 32 insertions(+), 1 deletions(-)
---
diff --git a/plugins/xsettings/Makefile.am b/plugins/xsettings/Makefile.am
index cc6f985..2dcdd1d 100644
--- a/plugins/xsettings/Makefile.am
+++ b/plugins/xsettings/Makefile.am
@@ -2,7 +2,7 @@ NULL =
 
 plugin_name = xsettings
 
-noinst_PROGRAMS = test-gtk-modules
+noinst_PROGRAMS = test-gtk-modules test-xsettings
 
 test_gtk_modules_SOURCES =	\
 	gsd-xsettings-gtk.c	\
@@ -24,6 +24,18 @@ test_gtk_modules_CPPFLAGS =				\
 	-DGTK_MODULES_DIRECTORY=\""$(libdir)/gnome-settings-daemon- GSD_API_VERSION@/gtk-modules/"\" \
 	$(AM_CPPFLAGS)
 
+test_xsettings_SOURCES = \
+	gsd-xsettings-gtk.c	\
+	gsd-xsettings-manager.c	\
+	xsettings-common.c	\
+	xsettings-manager.c	\
+	fontconfig-monitor.c	\
+	test-xsettings.c
+
+test_xsettings_CFLAGS = $(test_gtk_modules_CFLAGS)
+test_xsettings_CPPFLAGS = $(test_gtk_modules_CPPFLAGS)
+test_xsettings_LDADD = $(test_gtk_modules_LDADD)
+
 plugin_LTLIBRARIES = \
 	libxsettings.la		\
 	$(NULL)
diff --git a/plugins/xsettings/test-xsettings.c b/plugins/xsettings/test-xsettings.c
new file mode 100644
index 0000000..a2b9893
--- /dev/null
+++ b/plugins/xsettings/test-xsettings.c
@@ -0,0 +1,19 @@
+#include "gsd-xsettings-manager.h"
+#include <gtk/gtk.h>
+
+int
+main (void)
+{
+  GnomeXSettingsManager *manager;
+  GError *error = NULL;
+
+  gtk_init (NULL, NULL);
+
+  manager = gnome_xsettings_manager_new ();
+  gnome_xsettings_manager_start (manager, &error);
+  g_assert_no_error (error);
+
+  gtk_main ();
+
+  return 0;
+}



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