Index: ChangeLog
===================================================================
RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Glib/ChangeLog,v
retrieving revision 1.329
diff -u -r1.329 ChangeLog
--- ChangeLog	4 Apr 2005 05:00:25 -0000	1.329
+++ ChangeLog	19 Apr 2005 10:11:14 -0000
@@ -1,3 +1,13 @@
+2005/04/19	ebassi
+
+	A GKeyFile.xs
+	A t/g.t
+	M MANIFEST
+
+	* GKeyFile.xs, t/g.t, typemap, doctypes, Makefile.PL, MANIFEST,
+	gperl-types.c, gperl-types.h, gperl.h: Bind, document and test
+	GKeyFile, the parser object for ini-like files.
+
 2005/04/04	muppetman
 
 	* GSignal.xs, t/signal_emission_hooks.t, MANIFEST:
Index: GError.xs
===================================================================
RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Glib/GError.xs,v
retrieving revision 1.8
diff -u -r1.8 GError.xs
--- GError.xs	14 Apr 2004 17:59:23 -0000	1.8
+++ GError.xs	19 Apr 2005 10:11:20 -0000
@@ -341,6 +341,12 @@
 	gperl_register_error_domain (G_IO_CHANNEL_ERROR,
 	                             GPERL_TYPE_IO_CHANNEL_ERROR,
 	                             "Glib::IOChannel::Error");
+#if GLIB_CHECK_VERSION (2, 6, 0)
+	/* gkeyfile.h */
+	gperl_register_error_domain (G_KEY_FILE_ERROR,
+				     GPERL_TYPE_KEY_FILE_ERROR,
+				     "Glib::KeyFile::Error");
+#endif
 	/* gmarkup.h */
 	gperl_register_error_domain (G_MARKUP_ERROR,
 	                             GPERL_TYPE_MARKUP_ERROR,
Index: Glib.xs
===================================================================
RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Glib/Glib.xs,v
retrieving revision 1.39
diff -u -r1.39 Glib.xs
--- Glib.xs	10 Jan 2005 04:17:09 -0000	1.39
+++ Glib.xs	19 Apr 2005 10:11:54 -0000
@@ -329,6 +329,9 @@
 	GPERL_CALL_BOOT (boot_Glib__MainLoop);
 	GPERL_CALL_BOOT (boot_Glib__ParamSpec);
 	GPERL_CALL_BOOT (boot_Glib__IO__Channel);
+#if GLIB_CHECK_VERSION (2, 6, 0)
+	GPERL_CALL_BOOT (boot_Glib__KeyFile);
+#endif
 	/* make sure that we're running/linked against a version at least as 
 	 * new as we built against, otherwise bad things will happen. */
 	if ((((int)glib_major_version) < GLIB_MAJOR_VERSION)
Index: MANIFEST
===================================================================
RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Glib/MANIFEST,v
retrieving revision 1.31
diff -u -r1.31 MANIFEST
--- MANIFEST	4 Apr 2005 05:00:25 -0000	1.31
+++ MANIFEST	19 Apr 2005 10:11:54 -0000
@@ -1,12 +1,15 @@
 apidoc.pl
 AUTHORS
 ChangeLog
+copyright.pod
 devel.pod
+doctypes
 GBoxed.xs
 GClosure.xs
 GenPod.pm
 GError.xs
 GIOChannel.xs
+GKeyFile.xs
 Glib.exports
 Glib.pm
 Glib.xs
@@ -14,9 +17,8 @@
 GMainLoop.xs
 GObject.xs
 GParamSpec.xs
-gperl.h
-gperl-gtypes.c
 gperl-gtypes.h
+gperl.h
 gperl_marshal.h
 GSignal.xs
 GType.xs
@@ -30,8 +32,6 @@
 META.yml			Module meta-data in YAML
 NEWS
 ParseXSDoc.pm
-copyright.pod
-doctypes
 perl-Glib.spec.in
 ppport.h
 README
@@ -52,6 +52,7 @@
 t/d.t
 t/e.t
 t/f.t
+t/g.t
 t/signal_emission_hooks.t
 t/signal_query.t
 TODO
Index: Makefile.PL
===================================================================
RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Glib/Makefile.PL,v
retrieving revision 1.51
diff -u -r1.51 Makefile.PL
--- Makefile.PL	7 Mar 2005 20:34:23 -0000	1.51
+++ Makefile.PL	19 Apr 2005 10:11:59 -0000
@@ -56,6 +56,12 @@
 	GIOChannel.xs
 	GParamSpec.xs
 );
+
+# Check before including this module
+if (ExtUtils::PkgConfig->atleast_version ('glib-2.0', '2.6.0')) {
+	push @xs_files, 'GKeyFile.xs';
+}
+
 our %pm_files = (
      'Glib.pm'         => '$(INST_LIBDIR)/Glib.pm',
      'Subclass.pm'     => '$(INST_LIBDIR)/Glib/Object/Subclass.pm',
Index: doctypes
===================================================================
RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Glib/doctypes,v
retrieving revision 1.2
diff -u -r1.2 doctypes
--- doctypes	17 Oct 2004 10:28:02 -0000	1.2
+++ doctypes	19 Apr 2005 10:12:07 -0000
@@ -13,3 +13,5 @@
 GParamSpec	Glib::ParamSpec
 GParamFlags	Glib::ParamFlags
 gunichar	character
+GKeyFile	Glib::KeyFile
+GKeyFileFlags	Glib::KeyFileFlags
Index: gperl-gtypes.c
===================================================================
RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Glib/gperl-gtypes.c,v
retrieving revision 1.1
diff -u -r1.1 gperl-gtypes.c
--- gperl-gtypes.c	19 Feb 2004 05:31:54 -0000	1.1
+++ gperl-gtypes.c	19 Apr 2005 10:12:10 -0000
@@ -128,6 +128,34 @@
 
 
 
+#if GLIB_CHECK_VERSION (2, 6, 0)
+static const GEnumValue _gperl_g_key_file_error_values[] = {
+  { G_KEY_FILE_ERROR_UNKNOWN_ENCODING, "G_KEY_FILE_ERROR_UNKNOWN_ENCODING", "unknwon-encoding" },
+  { G_KEY_FILE_ERROR_PARSE, "G_KEY_FILE_ERROR_PARSE", "parse" },
+  { G_KEY_FILE_ERROR_NOT_FOUND, "G_KEY_FILE_ERROR_NOT_FOUND", "not-found" },
+  { G_KEY_FILE_ERROR_KEY_NOT_FOUND, "G_KEY_FILE_ERROR_KEY_NOT_FOUND", "key-not-found" },
+  { G_KEY_FILE_ERROR_GROUP_NOT_FOUND, "G_KEY_FILE_ERROR_GROUP_NOT_FOUND", "group-not-found" },
+  { G_KEY_FILE_ERROR_INVALID_VALUE, "G_KEY_FILE_ERROR_INVALID_VALUE", "invalid-value" },
+  { 0, NULL, NULL }
+};
+
+GType
+gperl_g_key_file_error_get_type (void)
+{
+  static GType type = 0;
+
+  if (!type)
+    type = g_enum_register_static ("GKeyFileError", _gperl_g_key_file_error_values);
+
+  return type;
+}
+
+#define GPERL_TYPE_KEY_FILE_ERROR gperl_g_key_file_error_get_type()
+GType gperl_g_key_file_error_get_type (void);
+#endif /* GLIB_CHECK_VERSION >= 2.6.0 */
+
+
+
 static const GEnumValue _gperl_g_markup_error_values[] = {
   { G_MARKUP_ERROR_BAD_UTF8, "G_MARKUP_ERROR_BAD_UTF8", "bad-utf8" },
   { G_MARKUP_ERROR_EMPTY, "G_MARKUP_ERROR_EMPTY", "empty" },
Index: gperl-gtypes.h
===================================================================
RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Glib/gperl-gtypes.h,v
retrieving revision 1.1
diff -u -r1.1 gperl-gtypes.h
--- gperl-gtypes.h	19 Feb 2004 05:31:54 -0000	1.1
+++ gperl-gtypes.h	19 Apr 2005 10:12:10 -0000
@@ -21,6 +21,11 @@
 #define GPERL_TYPE_IO_CHANNEL_ERROR gperl_g_io_channel_error_get_type()
 GType gperl_g_io_channel_error_get_type (void);
 
+#if GLIB_CHECK_VERSION (2, 6, 0)
+#define GPERL_TYPE_KEY_FILE_ERROR gperl_g_key_file_error_get_type()
+GType gperl_g_key_file_error_get_type (void);
+#endif /* GLIB_CHECK_VERSION >= 2.6.0 */
+
 #define GPERL_TYPE_MARKUP_ERROR gperl_g_markup_error_get_type()
 GType gperl_g_markup_error_get_type (void);
 
@@ -33,7 +38,6 @@
 #define GPERL_TYPE_THREAD_ERROR gperl_g_thread_error_get_type()
 GType gperl_g_thread_error_get_type (void);
 
-
 G_END_DECLS
 
 #endif /* __GPERL_GTYPES_H__ */
Index: gperl.h
===================================================================
RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Glib/gperl.h,v
retrieving revision 1.40
diff -u -r1.40 gperl.h
--- gperl.h	24 Mar 2005 09:23:38 -0000	1.40
+++ gperl.h	19 Apr 2005 10:12:10 -0000
@@ -334,6 +334,16 @@
 
 const char * gperl_param_spec_package_from_type (GType gtype);
 
+#if GLIB_CHECK_VERSION (2, 6, 0)
+/*
+ * gkeyfile.h / GKeyFile.xs
+ */
+SV * newSVGKeyFile (GKeyFile * key_file);
+GKeyFile * SvGKeyFile (SV * sv);
+SV * newSVGKeyFileFlags (GKeyFileFlags flags);
+GKeyFileFlags SvGKeyFileFlags (SV * sv);
+#endif
+
 /*
  * helpful debugging stuff
  */
Index: typemap
===================================================================
RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Glib/typemap,v
retrieving revision 1.28
diff -u -r1.28 typemap
--- typemap	1 Aug 2004 16:02:57 -0000	1.28
+++ typemap	19 Apr 2005 10:12:10 -0000
@@ -63,6 +63,9 @@
 GParamSpec*	T_GPERL_GENERIC_WRAPPER
 GParamFlags	T_GPERL_GENERIC_WRAPPER
 
+GKeyFile*	T_GPERL_GENERIC_WRAPPER
+GKeyFileFlags	T_GPERL_GENERIC_WRAPPER
+
 GIOCondition	T_G_TYPE_IO_CONDITION
 
 GMainContext*	T_G_MAIN_CONTEXT
