evince r3353 - in trunk: . libview



Author: carlosgc
Date: Sun Jan 18 15:59:21 2009
New Revision: 3353
URL: http://svn.gnome.org/viewvc/evince?rev=3353&view=rev

Log:
2009-01-18  Tomeu Vizoso  <tomeu sugarlabs org>

	* libview/Makefile.am:
	* libview/ev-view-type-builtins.c.template:
	* libview/ev-view-type-builtins.h.template:

	Make EvJobPriority a proper GType. Fixes bug #567788.

Added:
   trunk/libview/ev-view-type-builtins.c.template
   trunk/libview/ev-view-type-builtins.h.template
Modified:
   trunk/ChangeLog
   trunk/libview/Makefile.am

Modified: trunk/libview/Makefile.am
==============================================================================
--- trunk/libview/Makefile.am	(original)
+++ trunk/libview/Makefile.am	Sun Jan 18 15:59:21 2009
@@ -22,7 +22,8 @@
 INST_H_FILES = 				\
 	ev-jobs.h			\
 	ev-page-cache.h			\
-	ev-view.h
+	ev-view.h			\
+	ev-view-type-builtins.h
 
 headerdir = $(prefix)/include/evince/@EV_API_VERSION@/ev-view
 header_DATA = $(INST_H_FILES)
@@ -37,12 +38,15 @@
 	ev-view.c			\
 	ev-view-accessible.c		\
 	ev-view-marshal.c		\
+	ev-view-type-builtins.c		\
 	$(NOINST_H_FILES)		\
 	$(INST_H_FILES)
 
 BUILT_SOURCES = 			\
 	ev-view-marshal.h		\
-	ev-view-marshal.c
+	ev-view-marshal.c		\
+	ev-view-type-builtins.c		\
+	ev-view-type-builtins.h
 
 CLEANFILES = $(BUILT_SOURCES)
 
@@ -54,3 +58,18 @@
 	$(GLIB_GENMARSHAL) --prefix=ev_view_marshal $(srcdir)/ev-view-marshal.list --body >> $@
 
 EXTRA_DIST = ev-view-marshal.list
+
+ev-view-type-builtins.h: stamp-ev-view-type-builtins.h
+	@true
+
+stamp-ev-view-type-builtins.h: ev-view-type-builtins.h.template ev-job-scheduler.h
+	$(GLIB_MKENUMS) --template $< $(filter-out $<,$^) > xgen-etbh \
+	&& (cmp -s xgen-etbh ev-view-type-builtins.h || cp xgen-etbh ev-view-type-builtins.h ) \
+	&& rm -f xgen-etbh \
+	&& echo timestamp > $(@F)
+
+ev-view-type-builtins.c: ev-view-type-builtins.c.template ev-job-scheduler.h
+	$(GLIB_MKENUMS) --template $< $(filter-out $<,$^) > xgen-etbc \
+	&& (cmp -s xgen-etbc ev-view-type-builtins.c || cp xgen-etbc ev-view-type-builtins.c ) \
+	&& rm -f xgen-etbc
+

Added: trunk/libview/ev-view-type-builtins.c.template
==============================================================================
--- (empty file)
+++ trunk/libview/ev-view-type-builtins.c.template	Sun Jan 18 15:59:21 2009
@@ -0,0 +1,42 @@
+/*** BEGIN file-header ***/
+#include "ev-view-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 ***/

Added: trunk/libview/ev-view-type-builtins.h.template
==============================================================================
--- (empty file)
+++ trunk/libview/ev-view-type-builtins.h.template	Sun Jan 18 15:59:21 2009
@@ -0,0 +1,25 @@
+/*** BEGIN file-header ***/
+
+#ifndef EV_VIEW_TYPE_BUILTINS_H
+#define EV_VIEW_TYPE_BUILTINS_H
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+/*** END file-header ***/
+
+/*** BEGIN file-production ***/
+
+/* enumerations from "@filename@" */
+/*** END file-production ***/
+
+/*** BEGIN value-header ***/
+GType @enum_name _get_type (void) G_GNUC_CONST;
+#define EV_TYPE_ ENUMSHORT@ (@enum_name _get_type ())
+/*** END value-header ***/
+
+/*** BEGIN file-tail ***/
+G_END_DECLS
+
+#endif /* !EV_VIEW_TYPE_BUILTINS_H */
+/*** END file-tail ***/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]