Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwalterbender <walter@sugarlabs.org>2013-04-29 18:06:25 (GMT)
committer walterbender <walter@sugarlabs.org>2013-04-29 18:06:25 (GMT)
commit79fa03e846d4a816790bb589de3d7ee0ca52520d (patch)
tree9210659065b481286c50cc860a72c44297d959eb
parentc9a6a36567b671d15d489884f0c42036d35e5e6d (diff)
parent680c501ad67d787db61e56aa93d7fa3ab22c1095 (diff)
Merge pull request #14 from dnarvaez/gconf-list-v2
Gconf list v2 Signed off by Walter (tested in the context of cpsection/keyboard)
-rw-r--r--configure.ac2
-rw-r--r--src/sugar3/Makefile.am13
-rw-r--r--src/sugar3/sugar-gconf.c34
-rw-r--r--src/sugar3/sugar-gconf.h34
4 files changed, 77 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index d7efc06..764476a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -19,7 +19,7 @@ AM_PATH_PYTHON
AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)])
PKG_CHECK_MODULES(EXT, gtk+-3.0 gdk-3.0 gdk-pixbuf-2.0 sm ice alsa
- librsvg-2.0 xfixes xi x11)
+ librsvg-2.0 xfixes xi x11 gconf-2.0)
GLIB_MKENUMS=`$PKG_CONFIG glib-2.0 --variable=glib_mkenums`
AC_SUBST(GLIB_MKENUMS)
diff --git a/src/sugar3/Makefile.am b/src/sugar3/Makefile.am
index 650bf8e..24630fe 100644
--- a/src/sugar3/Makefile.am
+++ b/src/sugar3/Makefile.am
@@ -79,6 +79,7 @@ libsugarext_la_SOURCES = \
sugar-key-grabber.c \
sugar-key-grabber.h \
sugar-wm.c \
+ sugar-gconf.c \
$(XDG_MIME_SOURCES)
BUILT_SOURCES = \
@@ -99,7 +100,7 @@ EXTRA_DIST = sugar-marshal.list
-include $(INTROSPECTION_MAKEFILE)
INTROSPECTION_GIRS = SugarExt-1.0.gir
INTROSPECTION_SCANNER_ARGS = \
- -D XDG_PREFIX=sugar_mime \
+ -D XDG_PREFIX=sugar_mime \
--identifier-prefix=Sugar --symbol-prefix=sugar \
--identifier-prefix=EggSM --symbol-prefix=egg_sm \
--identifier-prefix=Gsm --symbol-prefix=gsm \
@@ -128,12 +129,14 @@ SugarExt_1_0_gir_FILES = \
sugar-key-grabber.h \
sugar-grid.c \
sugar-grid.h \
- sugar-wm.c \
- sugar-wm.h \
+ sugar-wm.c \
+ sugar-wm.h \
+ sugar-gconf.c \
+ sugar-gconf.h \
$(XDG_MIME_SOURCES)
-SugarExt_1_0_gir_INCLUDES = Gtk-3.0 Gdk-3.0
-SugarExt_1_0_gir_PACKAGES = gtk+-3.0 gdk-3.0
+SugarExt_1_0_gir_INCLUDES = Gtk-3.0 Gdk-3.0 GConf-2.0
+SugarExt_1_0_gir_PACKAGES = gtk+-3.0 gdk-3.0 gconf-2.0
SugarExt_1_0_gir_EXPORT_PACKAGES = SugarExt-1.0
girdir = $(datadir)/gir-1.0
diff --git a/src/sugar3/sugar-gconf.c b/src/sugar3/sugar-gconf.c
new file mode 100644
index 0000000..158bea1
--- /dev/null
+++ b/src/sugar3/sugar-gconf.c
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2013, Daniel Narvaez
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include "sugar-gconf.h"
+
+
+/**
+ * sugar_gconf_client_set_string_list:
+ * @list: (element-type utf8) (transfer container)
+ */
+void
+sugar_gconf_client_set_string_list(GConfClient *client,
+ const char *key,
+ GSList *list,
+ GError *err)
+{
+ gconf_client_set_list(client, key, GCONF_VALUE_STRING, list, NULL);
+}
diff --git a/src/sugar3/sugar-gconf.h b/src/sugar3/sugar-gconf.h
new file mode 100644
index 0000000..823ba2a
--- /dev/null
+++ b/src/sugar3/sugar-gconf.h
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2013, Daniel Narvaez
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __SUGAR_GCONF_H__
+#define __SUGAR_GCONF_H__
+
+#include <gconf/gconf-client.h>
+
+G_BEGIN_DECLS
+
+void sugar_gconf_client_set_string_list (GConfClient *client,
+ const char *key,
+ GSList *list,
+ GError *err);
+
+G_END_DECLS
+
+#endif /* __SUGAR_GCONF_H__ */