diff options
author | Daniel Narvaez <dwnarvaez@gmail.com> | 2013-04-27 23:34:00 (GMT) |
---|---|---|
committer | Simon Schampijer <simon@laptop.org> | 2013-05-30 10:21:02 (GMT) |
commit | 5740372822e09246bb727a182ba06e799d318b05 (patch) | |
tree | 3f8805273480ba90ec4cd1c262591602498e90b0 | |
parent | 9e86779b4ed0cc2463a2588b4a4215cce9273de3 (diff) |
Add a binding for gconf_client_set_list (using strings)
-rw-r--r-- | configure.ac | 3 | ||||
-rw-r--r-- | src/sugar3/Makefile.am | 8 | ||||
-rw-r--r-- | src/sugar3/sugar-gconf.c | 34 | ||||
-rw-r--r-- | src/sugar3/sugar-gconf.h | 34 |
4 files changed, 76 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index 57f8212..0935c7c 100644 --- a/configure.ac +++ b/configure.ac @@ -20,7 +20,8 @@ AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)]) AC_PATH_PROG(PYGTK_CODEGEN, pygtk-codegen-2.0, no) -PKG_CHECK_MODULES(EXT, gtk+-3.0 gdk-3.0 gdk-pixbuf-2.0 sm ice alsa librsvg-2.0) +PKG_CHECK_MODULES(EXT, gtk+-3.0 gdk-3.0 gdk-pixbuf-2.0 sm ice alsa + librsvg-2.0 gconf-2.0) PYGTK_DEFSDIR=`$PKG_CONFIG --variable=defsdir pygtk-2.0` AC_SUBST(PYGTK_DEFSDIR) diff --git a/src/sugar3/Makefile.am b/src/sugar3/Makefile.am index 5db2c20..4a5b05c 100644 --- a/src/sugar3/Makefile.am +++ b/src/sugar3/Makefile.am @@ -50,6 +50,8 @@ libsugarext_la_SOURCES = \ sugar-grid.h \ sugar-cursor-tracker.c \ sugar-cursor-tracker.h \ + sugar-gconf.c \ + sugar-gconf.h \ sugar-gesture-grabber.c \ sugar-gesture-grabber.h \ sugar-key-grabber.c \ @@ -139,13 +141,15 @@ SugarExt_1_0_gir_FILES = \ sugar-gesture-grabber.h \ sugar-key-grabber.c \ sugar-key-grabber.h \ + sugar-gconf.c \ + sugar-gconf.h \ sugar-grid.c \ sugar-grid.h \ sugar-wm.c \ sugar-wm.h -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..c2d7ee3 --- /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__ */ |