diff options
author | Havoc Pennington <hp@pobox.com> | 2002-01-23 19:56:25 +0000 |
---|---|---|
committer | Havoc Pennington <hp@src.gnome.org> | 2002-01-23 19:56:25 +0000 |
commit | 8daf05fb80fc71bf4401bebda6e13a0309a1e8dc (patch) | |
tree | a2f457312d9b3acf363b8415bce3eee3716bcbe3 | |
parent | f37e18fcbaa3a99d7f7de539df7616db73cebfda (diff) | |
download | gconf-8daf05fb80fc71bf4401bebda6e13a0309a1e8dc.tar.gz |
add gconf-enum-types.h/gconf-enum-types.c files, thanks to Johan Dahlin
2002-01-20 Havoc Pennington <hp@pobox.com>
* gconf/Makefile.am: add gconf-enum-types.h/gconf-enum-types.c
files, thanks to Johan Dahlin
* gconf-2.0.pc.in (Libs): oops, we had Requires: bonobo-activation
still
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | gconf-2.0.pc.in | 2 | ||||
-rw-r--r-- | gconf/Makefile.am | 45 | ||||
-rw-r--r-- | gconf/gconf-client.h | 4 | ||||
-rw-r--r-- | gconf/gconf-error.h | 2 | ||||
-rw-r--r-- | gconf/gconf-value.h | 2 | ||||
-rw-r--r-- | gconf/gconf.h | 1 |
7 files changed, 56 insertions, 8 deletions
@@ -1,3 +1,11 @@ +2002-01-20 Havoc Pennington <hp@pobox.com> + + * gconf/Makefile.am: add gconf-enum-types.h/gconf-enum-types.c + files, thanks to Johan Dahlin + + * gconf-2.0.pc.in (Libs): oops, we had Requires: bonobo-activation + still + 2002-01-16 Anders Carlsson <andersca@gnu.org> * gconf/gconf-client.c (gconf_client_get_full): Plug a leak. diff --git a/gconf-2.0.pc.in b/gconf-2.0.pc.in index 378cac81..475ce373 100644 --- a/gconf-2.0.pc.in +++ b/gconf-2.0.pc.in @@ -7,6 +7,6 @@ includedir=@includedir@ Name: gconf Description: GNOME Config System. Version: @VERSION@ -Requires: bonobo-activation-2.0 +Requires: ORBit-2.0 Libs: -L${libdir} -lgconf-@MAJOR_VERSION@ Cflags: -I${includedir}/gconf/@MAJOR_VERSION@ diff --git a/gconf/Makefile.am b/gconf/Makefile.am index e4cf2f2d..a090aa27 100644 --- a/gconf/Makefile.am +++ b/gconf/Makefile.am @@ -29,10 +29,12 @@ CORBA_SOURCES = GConf-common.c GConf-skels.c GConf-stubs.c GConf.h BUILT_SOURCES = \ $(CORBA_SOURCES) \ + gconf-enum-types.h \ + gconf-enum-types.c \ gconfmarshal.h \ gconfmarshal.c -$(OBJECTS): $(BUILT_SOURCES) +$(OBJECTS) $(libgconf_2_la_OBJECTS): $(BUILT_SOURCES) CLEANFILES = \ $(BUILT_SOURCES) \ @@ -42,8 +44,7 @@ CLEANFILES = \ dist-hook: cd $(distdir) ; rm -f $(CLEANFILES) -gconfincludedir = $(includedir)/gconf/$(MAJOR_VERSION)/gconf -gconfinclude_HEADERS = \ +gconf_headers = \ gconf.h \ gconf-changeset.h \ gconf-listeners.h \ @@ -53,6 +54,11 @@ gconfinclude_HEADERS = \ gconf-engine.h \ gconf-client.h +gconfincludedir = $(includedir)/gconf/$(MAJOR_VERSION)/gconf +gconfinclude_HEADERS = \ + $(gconf_headers) \ + gconf-enum-types.h + ## This is broken I know, I'm going to break the server/client up and have a library later gconfd_2_SOURCES = \ @@ -92,6 +98,7 @@ libgconf_2_la_SOURCES = \ gconf-value.c \ gconf.c \ gconf-client.c \ + gconf-enum-types.c \ $(CORBA_SOURCES) libgconf_2_la_LDFLAGS = -version-info $(GCONF_CURRENT):$(GCONF_REVISION):$(GCONF_AGE) @@ -125,3 +132,35 @@ stamp-gconfmarshal.c: @REBUILD@ gconfmarshal.list && (cmp -s xgen-gmc gconfmarshal.c || cp xgen-gmc gconfmarshal.c) \ && rm -f xgen-gmc xgen-gmc~ + +gconf-enum-types.h: s-enum-types-h + @true + +FIX_ENUM_FILES=sed -e 's/g_conf/gconf/g' -e 's/TYPE_CONF/TYPE/g' + +s-enum-types-h: @REBUILD@ $(gconf_headers) + ( cd $(srcdir) && glib-mkenums \ + --fhead "#ifndef __GCONF_ENUM_TYPES_H__\n#define __GCONF_ENUM_TYPES_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \ + --fprod "/* enumerations from \"@filename@\" */\n" \ + --vhead "GType @enum_name@_get_type (void);\n#define GCONF_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \ + --ftail "G_END_DECLS\n\n#endif /* __GCONF_ENUM_TYPES_H__ */" \ + $(gconf_headers) | $(FIX_ENUM_FILES) ) > tmp-gconf-enum-types.h \ + && (cmp -s tmp-gconf-enum-types.h $(srcdir)/gconf-enum-types.h || cp tmp-gconf-enum-types.h $(srcdir)/gconf-enum-types.h ) \ + && rm -f tmp-gconf-enum-types.h \ + && echo timestamp > $(@F) + +gconf-enum-types.c: s-enum-types-c + @true + +s-enum-types-c: @REBUILD@ $(gconf_headers) + ( cd $(srcdir) && glib-mkenums \ + --fhead "#include \"gconf-client.h\"" \ + --fprod "\n/* enumerations from \"@filename@\" */" \ + --vhead "GType\n@enum_name@_get_type (void)\n{\n static GType etype = 0;\n if (etype == 0) {\n static const G@Type@Value values[] = {" \ + --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \ + --vtail " { 0, NULL, NULL }\n };\n etype = g_@type@_register_static (\"@EnumName@\", values);\n }\n return etype;\n}\n" \ + $(gconf_headers) ) | $(FIX_ENUM_FILES) > tmp-gconf-enum-types.c \ + && (cmp -s tmp-gconf-enum-types.c $(srcdir)/gconf-enum-types.c || cp tmp-gconf-enum-types.c $(srcdir)/gconf-enum-types.c ) \ + && rm -f tmp-gconf-enum-types.c \ + && echo timestamp > $(@F) + diff --git a/gconf/gconf-client.h b/gconf/gconf-client.h index 9622144e..bd88dfac 100644 --- a/gconf/gconf-client.h +++ b/gconf/gconf-client.h @@ -56,13 +56,13 @@ extern "C" { * underneath it. */ -typedef enum { +typedef enum { /*< prefix=GCONF_CLIENT >*/ GCONF_CLIENT_PRELOAD_NONE, /* don't preload anything */ GCONF_CLIENT_PRELOAD_ONELEVEL, /* load entries directly under the directory. */ GCONF_CLIENT_PRELOAD_RECURSIVE /* recurse the directory tree; possibly quite expensive! */ } GConfClientPreloadType; -typedef enum { +typedef enum { /*< prefix=GCONF_CLIENT >*/ GCONF_CLIENT_HANDLE_NONE, GCONF_CLIENT_HANDLE_UNRETURNED, GCONF_CLIENT_HANDLE_ALL diff --git a/gconf/gconf-error.h b/gconf/gconf-error.h index 5f84df3d..c3b30d5f 100644 --- a/gconf/gconf-error.h +++ b/gconf/gconf-error.h @@ -31,7 +31,7 @@ extern "C" { /* Error Numbers */ /* Sync with ConfigErrorType in GConf.idl, and some switch statements in the code */ -typedef enum { +typedef enum { /*< prefix=GCONF_ERROR >*/ GCONF_ERROR_SUCCESS = 0, GCONF_ERROR_FAILED = 1, /* Something didn't work, don't know why, probably unrecoverable so there's no point having a more specific errno */ diff --git a/gconf/gconf-value.h b/gconf/gconf-value.h index 2e93359f..5127d1fd 100644 --- a/gconf/gconf-value.h +++ b/gconf/gconf-value.h @@ -28,7 +28,7 @@ * A GConfValue is used to pass configuration values around */ -typedef enum { +typedef enum { /*< prefix=GCONF_VALUE >*/ GCONF_VALUE_INVALID, GCONF_VALUE_STRING, GCONF_VALUE_INT, diff --git a/gconf/gconf.h b/gconf/gconf.h index 024e9753..5eb70202 100644 --- a/gconf/gconf.h +++ b/gconf/gconf.h @@ -29,6 +29,7 @@ extern "C" { #include <gconf/gconf-schema.h> #include <gconf/gconf-engine.h> #include <gconf/gconf-error.h> +#include <gconf/gconf-enum-types.h> typedef void (*GConfNotifyFunc) (GConfEngine* conf, guint cnxn_id, |