]> www.fi.muni.cz Git - evince.git/commitdiff
Make EvJobPriority a proper GType. Fixes bug #567788.
authorTomeu Vizoso <tomeu@sugarlabs.org>
Sun, 18 Jan 2009 15:59:21 +0000 (15:59 +0000)
committerCarlos Garcia Campos <carlosgc@src.gnome.org>
Sun, 18 Jan 2009 15:59:21 +0000 (15:59 +0000)
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.

svn path=/trunk/; revision=3353

ChangeLog
libview/Makefile.am
libview/ev-view-type-builtins.c.template [new file with mode: 0644]
libview/ev-view-type-builtins.h.template [new file with mode: 0644]

index 4c17c4e069bdf0a2b43a052bf2329bdab54ea69c..3766f15723bb0f41f086c0eedc095e2175c4694e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+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.
+       
 2009-01-18  Carlos Garcia Campos  <carlosgc@gnome.org>
 
        * configure.ac:
index dfdb20e882940a0f3a3b88d14af074743c7cbea8..e41b3a80668d96b019341da23eb6b504b343f707 100644 (file)
@@ -22,7 +22,8 @@ NOINST_H_FILES =                      \
 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 @@ libevview_la_SOURCES =                      \
        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 @@ ev-view-marshal.c: $(srcdir)/ev-view-marshal.list
        $(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
+
diff --git a/libview/ev-view-type-builtins.c.template b/libview/ev-view-type-builtins.c.template
new file mode 100644 (file)
index 0000000..2365a44
--- /dev/null
@@ -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 ***/
diff --git a/libview/ev-view-type-builtins.h.template b/libview/ev-view-type-builtins.h.template
new file mode 100644 (file)
index 0000000..a6ac309
--- /dev/null
@@ -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 ***/