[totem] Use g_cclosure_marshal_generic() instead custom marshallers



commit de8ec4ad07c48d572ccc8af4f347a37afa22f9f5
Author: Javier JardÃn <jjardon gnome org>
Date:   Fri Nov 23 11:34:54 2012 +0900

    Use g_cclosure_marshal_generic() instead custom marshallers

 browser-plugin/Makefile.am                         |   15 +----------
 browser-plugin/marshal.list                        |    3 --
 browser-plugin/totem-plugin-viewer.c               |    7 ++---
 configure.in                                       |    1 -
 docs/reference/Makefile.am                         |    5 ---
 src/Makefile.am                                    |   27 +-------------------
 src/backend/Makefile.am                            |   11 --------
 src/backend/bacon-video-widget.c                   |    7 ++---
 src/backend/baconvideowidget-marshal.list          |    3 --
 src/plugins/media-player-keys/Makefile.am          |   15 -----------
 .../media-player-keys/totem-media-player-keys.c    |    1 -
 src/totem-object.c                                 |    7 ++---
 src/totem-playlist.c                               |    5 +--
 src/totemobject-marshal.list                       |    2 -
 src/totemplaylist-marshal.list                     |    1 -
 src/totemvideolist-marshal.list                    |    1 -
 16 files changed, 13 insertions(+), 98 deletions(-)
---
diff --git a/browser-plugin/Makefile.am b/browser-plugin/Makefile.am
index 52bcd13..60798d6 100644
--- a/browser-plugin/Makefile.am
+++ b/browser-plugin/Makefile.am
@@ -47,19 +47,6 @@ plugin_ldflags = \
 	-no-undefined					\
 	$(AM_LDFLAGS)
 
-# Marshaller
-MARSHAL_FILES = \
-	marshal.h	\
-	marshal.c
-
-marshal.h: marshal.list
-	$(AM_V_GEN)($(GLIB_GENMARSHAL) --prefix=totempluginviewer_marshal --internal --header $< > $@)
-marshal.c: marshal.list marshal.h
-	$(AM_V_GEN)($(GLIB_GENMARSHAL) --prefix=totempluginviewer_marshal --internal --body --header $< > $@)
-
-CLEANFILES = $(MARSHAL_FILES)
-EXTRA_DIST += marshal.list
-
 # The Glow button test program
 noinst_PROGRAMS = test-glow-button
 
@@ -112,7 +99,7 @@ totem_plugin_viewer_LDFLAGS = -export-dynamic
 totem-plugin-viewer-interface.h: org_gnome_totem_PluginViewer.xml
 	$(DBUS_BIND) --prefix=totem_embedded --mode=glib-server $< > $@
 
-CLEANFILES += totem-plugin-viewer-interface.h
+CLEANFILES = totem-plugin-viewer-interface.h
 EXTRA_DIST += org_gnome_totem_PluginViewer.xml
 
 # Totem GMP Plugin
diff --git a/browser-plugin/totem-plugin-viewer.c b/browser-plugin/totem-plugin-viewer.c
index d46e936..9ea7361 100644
--- a/browser-plugin/totem-plugin-viewer.c
+++ b/browser-plugin/totem-plugin-viewer.c
@@ -53,7 +53,6 @@
 
 #include "totem-plugin-viewer-constants.h"
 #include "totem-plugin-viewer-options.h"
-#include "marshal.h"
 
 GtkWidget *totem_statusbar_create (void);
 GtkWidget *totem_volume_create (void);
@@ -241,7 +240,7 @@ static void totem_embedded_class_init (TotemEmbeddedClass *klass)
 				G_SIGNAL_RUN_LAST,
 				NULL /* class closure */,
 				NULL /* accu */, NULL /* accu data */,
-				totempluginviewer_marshal_VOID__UINT_UINT,
+				g_cclosure_marshal_generic,
 				G_TYPE_NONE, 2, param_types);
 	signals[START_STREAM] =
 		g_signal_newv ("start-stream",
@@ -267,7 +266,7 @@ static void totem_embedded_class_init (TotemEmbeddedClass *klass)
 				G_SIGNAL_RUN_LAST,
 				NULL /* class closure */,
 				NULL /* accu */, NULL /* accu data */,
-				totempluginviewer_marshal_VOID__UINT_UINT_STRING,
+	                        g_cclosure_marshal_generic,
 				G_TYPE_NONE, 3, param_types);
 	signals[PROPERTY_CHANGE] =
 		g_signal_new ("property-change",
@@ -275,7 +274,7 @@ static void totem_embedded_class_init (TotemEmbeddedClass *klass)
 			      G_SIGNAL_RUN_LAST,
 			      0 /* class offset */,
 			      NULL /* accu */, NULL /* accu data */,
-			      totempluginviewer_marshal_VOID__STRING_BOXED,
+			      g_cclosure_marshal_generic,
 			      G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_VALUE);
 }
 
diff --git a/configure.in b/configure.in
index c6ea562..a18caca 100644
--- a/configure.in
+++ b/configure.in
@@ -39,7 +39,6 @@ m4_ifdef([LT_OUTPUT], [LT_OUTPUT])
 
 PKG_PROG_PKG_CONFIG
 
-AC_PATH_PROG([GLIB_GENMARSHAL],[glib-genmarshal])
 AC_PATH_PROG([GLIB_MKENUMS],[glib-mkenums])
 
 # Requirements
diff --git a/docs/reference/Makefile.am b/docs/reference/Makefile.am
index cba3eee..48bf4ba 100644
--- a/docs/reference/Makefile.am
+++ b/docs/reference/Makefile.am
@@ -59,16 +59,12 @@ IGNORE_HFILES = \
 	eggsmclient-private.h		\
 	gnome-screenshot-widget.h	\
 	gsd-media-keys-window.h		\
-	totemobject-marshal.h		\
-	totemplaylist-marshal.h		\
-	totemvideolist-marshal.h	\
 	totem-profile.h			\
 	totem-sample-vala-plugin.h	\
 	totem-chapters-utils.h		\
 	totem-cmml-parser.h		\
 	totem-edit-chapter.h		\
 	bacon-video-widget-common.h			\
-	baconvideowidget-marshal.h			\
 	bacon-video-widget-gst-missing-plugins.h	\
 	bacon-resize.h					\
 	totem-playlist.h				\
@@ -105,7 +101,6 @@ IGNORE_HFILES = \
 	totem-skipto-plugin.h		\
 	totem-time-entry.h		\
 	totem-tracker-widget.h		\
-	totem-marshal.h			\
 	gsd-media-keys-window.h		\
 	gsd-osd-window.h		\
 	bacon-video-osd-actor.h		\
diff --git a/src/Makefile.am b/src/Makefile.am
index 8f166c6..9222c7c 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -133,31 +133,6 @@ libtotem_la_SOURCES += eggsmclient-osx.c
 endif
 endif
 
-# Marshal files
-TOTEM_MARSHAL_FILES = \
-	totemobject-marshal.c totemobject-marshal.h		\
-	totemplaylist-marshal.c totemplaylist-marshal.h		\
-	totemvideolist-marshal.c totemvideolist-marshal.h
-
-totemobject-marshal.h: totemobject-marshal.list
-	$(AM_V_GEN) ($(GLIB_GENMARSHAL) --prefix=totemobject_marshal $(srcdir)/totemobject-marshal.list --header > $@)
-totemobject-marshal.c: totemobject-marshal.h totemobject-marshal.list
-	$(AM_V_GEN) ($(GLIB_GENMARSHAL) --prefix=totemobject_marshal $(srcdir)/totemobject-marshal.list --header --body > $@)
-totemplaylist-marshal.h: totemplaylist-marshal.list
-	$(AM_V_GEN) ($(GLIB_GENMARSHAL) --prefix=totemplaylist_marshal $(srcdir)/totemplaylist-marshal.list --header > $@)
-totemplaylist-marshal.c: totemplaylist-marshal.h totemobject-marshal.list
-	$(AM_V_GEN) ($(GLIB_GENMARSHAL) --prefix=totemplaylist_marshal $(srcdir)/totemplaylist-marshal.list --header --body > $@)
-totemvideolist-marshal.h: totemvideolist-marshal.list
-	$(AM_V_GEN) ($(GLIB_GENMARSHAL) --prefix=totemvideolist_marshal $(srcdir)/totemvideolist-marshal.list --header > $@)
-totemvideolist-marshal.c: totemvideolist-marshal.h totemobject-marshal.list
-	$(AM_V_GEN) ($(GLIB_GENMARSHAL) --prefix=totemvideolist_marshal $(srcdir)/totemvideolist-marshal.list --header --body > $@)
-
-EXTRA_DIST = \
-	totemobject-marshal.list	\
-	totemvideolist-marshal.list	\
-	totemplaylist-marshal.list
-CLEANFILES = $(TOTEM_MARSHAL_FILES)
-
 # Totem
 totem_SOURCES = totem.c
 
@@ -295,7 +270,7 @@ gir_DATA = $(INTROSPECTION_GIRS)
 typelibdir = $(libdir)/girepository-1.0
 typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
 
-CLEANFILES += $(gir_DATA) $(typelib_DATA)
+CLEANFILES = $(gir_DATA) $(typelib_DATA)
 
 endif
 
diff --git a/src/backend/Makefile.am b/src/backend/Makefile.am
index 8094242..afdd88e 100644
--- a/src/backend/Makefile.am
+++ b/src/backend/Makefile.am
@@ -19,14 +19,6 @@ bvw_test_LDADD =		\
 	libbaconvideowidget.la	\
 	$(BACKEND_LIBS)
 
-# Marshallers
-BVW_MARSHAL_FILES = baconvideowidget-marshal.c baconvideowidget-marshal.h
-
-baconvideowidget-marshal.h: baconvideowidget-marshal.list
-	$(AM_V_GEN)($(GLIB_GENMARSHAL) --prefix=baconvideowidget_marshal $(srcdir)/baconvideowidget-marshal.list --header > $@)
-baconvideowidget-marshal.c: baconvideowidget-marshal.h baconvideowidget-marshal.list
-	$(AM_V_GEN)($(GLIB_GENMARSHAL) --prefix=baconvideowidget_marshal $(srcdir)/baconvideowidget-marshal.list --body --header > $@)
-
 # Enums
 BVW_ENUM_FILES = bacon-video-widget-enums.c bacon-video-widget-enums.h
 
@@ -86,7 +78,4 @@ CLEANFILES = \
 	$(BVW_MARSHAL_FILES)	\
 	$(BVW_ENUM_FILES)
 
-EXTRA_DIST = \
-	baconvideowidget-marshal.list
-
 -include $(top_srcdir)/git.mk
diff --git a/src/backend/bacon-video-widget.c b/src/backend/bacon-video-widget.c
index 212008b..894969a 100644
--- a/src/backend/bacon-video-widget.c
+++ b/src/backend/bacon-video-widget.c
@@ -90,7 +90,6 @@
 #include "bacon-video-widget.h"
 #include "bacon-video-widget-gst-missing-plugins.h"
 #include "bacon-video-osd-actor.h"
-#include "baconvideowidget-marshal.h"
 #include "bacon-video-widget-enums.h"
 #include "video-utils.h"
 
@@ -1035,7 +1034,7 @@ bacon_video_widget_class_init (BaconVideoWidgetClass * klass)
                   G_SIGNAL_RUN_LAST,
                   G_STRUCT_OFFSET (BaconVideoWidgetClass, error),
                   NULL, NULL,
-                  baconvideowidget_marshal_VOID__STRING_BOOLEAN,
+                  g_cclosure_marshal_generic,
                   G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_BOOLEAN);
 
   /**
@@ -1109,7 +1108,7 @@ bacon_video_widget_class_init (BaconVideoWidgetClass * klass)
                   G_SIGNAL_RUN_LAST,
                   G_STRUCT_OFFSET (BaconVideoWidgetClass, tick),
                   NULL, NULL,
-                  baconvideowidget_marshal_VOID__INT64_INT64_DOUBLE_BOOLEAN,
+                  g_cclosure_marshal_generic,
                   G_TYPE_NONE, 4, G_TYPE_INT64, G_TYPE_INT64, G_TYPE_DOUBLE,
                   G_TYPE_BOOLEAN);
 
@@ -1147,7 +1146,7 @@ bacon_video_widget_class_init (BaconVideoWidgetClass * klass)
                   G_SIGNAL_RUN_LAST,
                   0, /* signal is enough, we don't need a vfunc */
                   bvw_boolean_handled_accumulator, NULL,
-                  baconvideowidget_marshal_BOOLEAN__BOXED_BOXED_BOOLEAN,
+                  g_cclosure_marshal_generic,
                   G_TYPE_BOOLEAN, 3, G_TYPE_STRV, G_TYPE_STRV, G_TYPE_BOOLEAN);
 
   /**
diff --git a/src/plugins/media-player-keys/Makefile.am b/src/plugins/media-player-keys/Makefile.am
index cfe8bdf..ba5fa64 100644
--- a/src/plugins/media-player-keys/Makefile.am
+++ b/src/plugins/media-player-keys/Makefile.am
@@ -5,22 +5,7 @@ plugin_LTLIBRARIES = libmedia_player_keys.la
 
 plugin_in_files = media-player-keys.plugin.in
 
-# Marshal files
-marshal_files = \
-	totem-marshal.h		\
-	totem-marshal.c
-
-totem-marshal.c: totem-marshal.list totem-marshal.h
-	$(AM_V_GEN) @GLIB_GENMARSHAL@ --prefix=totem_marshal $< --header --body > $@
-
-totem-marshal.h: totem-marshal.list
-	$(AM_V_GEN) @GLIB_GENMARSHAL@ --prefix=totem_marshal $< --header > $@
-
-EXTRA_DIST += totem-marshal.list
-CLEANFILES += $(marshal_files)
-
 libmedia_player_keys_la_SOURCES = \
-	$(marshal_files)		\
 	totem-media-player-keys.c
 libmedia_player_keys_la_LDFLAGS = $(plugin_ldflags)
 libmedia_player_keys_la_LIBADD = \
diff --git a/src/plugins/media-player-keys/totem-media-player-keys.c b/src/plugins/media-player-keys/totem-media-player-keys.c
index a6cd721..2965f15 100644
--- a/src/plugins/media-player-keys/totem-media-player-keys.c
+++ b/src/plugins/media-player-keys/totem-media-player-keys.c
@@ -37,7 +37,6 @@
 #include <string.h>
 
 #include "totem-plugin.h"
-#include "totem-marshal.h"
 #include "totem.h"
 
 #define TOTEM_TYPE_MEDIA_PLAYER_KEYS_PLUGIN		(totem_media_player_keys_plugin_get_type ())
diff --git a/src/totem-object.c b/src/totem-object.c
index 66edc0e..241dbd4 100644
--- a/src/totem-object.c
+++ b/src/totem-object.c
@@ -48,7 +48,6 @@
 #include <string.h>
 
 #include "totem.h"
-#include "totemobject-marshal.h"
 #include "totem-private.h"
 #include "totem-options.h"
 #include "totem-plugins-engine.h"
@@ -381,7 +380,7 @@ totem_object_class_init (TotemObjectClass *klass)
 				G_SIGNAL_RUN_LAST,
 				G_STRUCT_OFFSET (TotemObjectClass, metadata_updated),
 				NULL, NULL,
-				totemobject_marshal_VOID__STRING_STRING_STRING_UINT,
+	                        g_cclosure_marshal_generic,
 				G_TYPE_NONE, 4, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_UINT);
 
 	/**
@@ -400,7 +399,7 @@ totem_object_class_init (TotemObjectClass *klass)
 			      G_SIGNAL_RUN_LAST,
 			      G_STRUCT_OFFSET (TotemObjectClass, get_user_agent),
 			      accumulator_first_non_null_wins, NULL,
-			      totemobject_marshal_STRING__STRING,
+	                      g_cclosure_marshal_generic,
 			      G_TYPE_STRING, 1, G_TYPE_STRING);
 
 	/**
@@ -419,7 +418,7 @@ totem_object_class_init (TotemObjectClass *klass)
 			      G_SIGNAL_RUN_LAST,
 			      G_STRUCT_OFFSET (TotemObjectClass, get_text_subtitle),
 			      accumulator_first_non_null_wins, NULL,
-			      totemobject_marshal_STRING__STRING,
+	                      g_cclosure_marshal_generic,
 			      G_TYPE_STRING, 1, G_TYPE_STRING);
 }
 
diff --git a/src/totem-playlist.c b/src/totem-playlist.c
index 4adc727..2cc8de2 100644
--- a/src/totem-playlist.c
+++ b/src/totem-playlist.c
@@ -23,7 +23,6 @@
 
 #include "config.h"
 #include "totem-playlist.h"
-#include "totemplaylist-marshal.h"
 
 #include <gtk/gtk.h>
 #include <glib/gi18n.h>
@@ -2990,7 +2989,7 @@ totem_playlist_class_init (TotemPlaylistClass *klass)
 				G_STRUCT_OFFSET (TotemPlaylistClass,
 					item_added),
 				NULL, NULL,
-				totemplaylist_marshal_VOID__STRING_STRING,
+				g_cclosure_marshal_generic,
 				G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_STRING);
 	totem_playlist_table_signals[ITEM_REMOVED] =
 		g_signal_new ("item-removed",
@@ -2999,6 +2998,6 @@ totem_playlist_class_init (TotemPlaylistClass *klass)
 				G_STRUCT_OFFSET (TotemPlaylistClass,
 					item_removed),
 				NULL, NULL,
-				totemplaylist_marshal_VOID__STRING_STRING,
+				g_cclosure_marshal_generic,
 				G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_STRING);
 }



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