diff options
author | Tomeu Vizoso <tomeu@sugarlabs.org> | 2009-01-18 19:43:07 (GMT) |
---|---|---|
committer | Carlos Garcia Campos <carlosgc@src.gnome.org> | 2009-01-18 19:43:07 (GMT) |
commit | e12e13eb0eabdc8dfbe99e958380df6779473c27 (patch) | |
tree | 3e16808354361740d122203216daeed98abd1978 /libdocument/ev-document-type-builtins.c.template | |
parent | 9d52040ae91a6cd561bd5acf25c4a725a57b27b8 (diff) |
Make EvDocumentInfo and enums definded in ev-document-info.h GTypes. Fixes
2009-01-18 Tomeu Vizoso <tomeu@sugarlabs.org>
* libdocument/Makefile.am:
* libdocument/ev-document-info.h:
* libdocument/ev-document-type-builtins.c.template:
* libdocument/ev-document-type-builtins.h.template:
* libdocument/ev-document.c: (ev_document_info_get_type),
(ev_document_info_copy):
Make EvDocumentInfo and enums definded in ev-document-info.h
GTypes. Fixes bug #567789.
svn path=/trunk/; revision=3356
Diffstat (limited to 'libdocument/ev-document-type-builtins.c.template')
-rw-r--r-- | libdocument/ev-document-type-builtins.c.template | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/libdocument/ev-document-type-builtins.c.template b/libdocument/ev-document-type-builtins.c.template new file mode 100644 index 0000000..1996838 --- /dev/null +++ b/libdocument/ev-document-type-builtins.c.template @@ -0,0 +1,42 @@ +/*** BEGIN file-header ***/ +#include "ev-document-type-builtins.h" + +/*** END file-header ***/ + +/*** BEGIN file-production ***/ +/* enumerations from "@filename@" */ +#include "@filename@" +/*** END file-production ***/ + + +/*** BEGIN value-header ***/ +GType +@enum_name@_get_type (void) +{ + static volatile gsize g_define_type_id__volatile = 0; + + if (g_once_init_enter (&g_define_type_id__volatile)) { + static const G@Type@Value values[] = { +/*** END value-header ***/ + +/*** BEGIN value-production ***/ + { @VALUENAME@, "@VALUENAME@", "@valuenick@" }, +/*** END value-production ***/ + +/*** BEGIN value-tail ***/ + { 0, NULL, NULL } + }; + GType g_define_type_id = \ + g_@type@_register_static (/* g_intern_static_string */ ("@EnumName@"), values); + + g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); + } + + return g_define_type_id__volatile; +} + +/*** END value-tail ***/ + +/*** BEGIN file-tail ***/ + +/*** END file-tail ***/ |