From acc5445faffbaca14c2b325318e034cd6d8a5d73 Mon Sep 17 00:00:00 2001 From: Jasmine Hassan Date: Sat, 27 Oct 2012 08:58:31 +0200 Subject: [file-manager] autogenerate marshallers http://git.gnome.org/browse/nautilus/commit/?id=21e75511d2466bd814a31031472323d3cd8ae6c1 --- src/file-manager/Makefile.am | 37 +++++++++++++++++++++++++++++++++++- src/file-manager/fm-directory-view.c | 12 ++++++------ 2 files changed, 42 insertions(+), 7 deletions(-) diff --git a/src/file-manager/Makefile.am b/src/file-manager/Makefile.am index e73afbed..a08d01ad 100644 --- a/src/file-manager/Makefile.am +++ b/src/file-manager/Makefile.am @@ -12,6 +12,11 @@ INCLUDES = \ $(DISABLE_DEPRECATED_CFLAGS) \ $(NULL) +BUILT_SOURCES = \ + fm-marshal.c \ + fm-marshal.h \ + $(NULL) + libcaja_file_manager_la_SOURCES = \ fm-actions.h \ fm-desktop-icon-view.c \ @@ -40,6 +45,28 @@ libcaja_file_manager_la_SOURCES = \ caja-audio-mime-types.h \ $(NULL) +nodist_libcaja_file_manager_la_SOURCES=\ + $(BUILT_SOURCES) \ + $(NULL) + +fm-marshal.list: $(libcaja_file_manager_la_SOURCES) Makefile.am + $(AM_V_GEN)( cd $(srcdir) && \ + sed -n -e 's/.*fm_marshal_\([[:upper:][:digit:]]*__[[:upper:][:digit:]_]*\).*/\1/p' \ + $(libcaja_file_manager_la_SOURCES) ) \ + | sed -e 's/__/:/' -e 'y/_/,/' | sort -u > $@.tmp + @if cmp -s $@.tmp $@; then \ + rm $@.tmp; \ + else \ + mv $@.tmp $@; \ + fi + +%-marshal.c: %-marshal.list Makefile + $(AM_V_GEN)echo "#include \"fm-marshal.h\"" > $@ && \ + $(GLIB_GENMARSHAL) --body --prefix=$(subst -,_,$*)_marshal $< >> $*-marshal.c + +%-marshal.h: %-marshal.list Makefile + $(AM_V_GEN)$(GLIB_GENMARSHAL) --header --prefix=$(subst -,_,$*)_marshal $< > $*-marshal.h + EMPTY_VIEW_SOURCES = \ fm-empty-view.c \ fm-empty-view.h @@ -56,4 +83,12 @@ ui_DATA = \ caja-list-view-ui.xml \ $(NULL) -EXTRA_DIST = $(ui_DATA) +EXTRA_DIST = \ + $(ui_DATA) \ + fm-marshal.list + +CLEANFILES = \ + $(BUILT_SOURCES) \ + fm-marshal.list \ + $(NULL) + diff --git a/src/file-manager/fm-directory-view.c b/src/file-manager/fm-directory-view.c index 55b1e5bb..72a41a31 100644 --- a/src/file-manager/fm-directory-view.c +++ b/src/file-manager/fm-directory-view.c @@ -35,6 +35,7 @@ #include "fm-actions.h" #include "fm-error-reporting.h" +#include "fm-marshal.h" #include "fm-properties-window.h" #include "libcaja-private/caja-open-with-dialog.h" @@ -71,7 +72,6 @@ #include /* for caja_file_get_existing_by_uri */ #include #include -#include #include #include #include @@ -10815,7 +10815,7 @@ fm_directory_view_class_init (FMDirectoryViewClass *klass) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (FMDirectoryViewClass, add_file), NULL, NULL, - caja_marshal_VOID__OBJECT_OBJECT, + fm_marshal_VOID__OBJECT_OBJECT, G_TYPE_NONE, 2, CAJA_TYPE_FILE, CAJA_TYPE_DIRECTORY); signals[BEGIN_FILE_CHANGES] = g_signal_new ("begin_file_changes", @@ -10871,7 +10871,7 @@ fm_directory_view_class_init (FMDirectoryViewClass *klass) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (FMDirectoryViewClass, file_changed), NULL, NULL, - caja_marshal_VOID__OBJECT_OBJECT, + fm_marshal_VOID__OBJECT_OBJECT, G_TYPE_NONE, 2, CAJA_TYPE_FILE, CAJA_TYPE_DIRECTORY); signals[LOAD_ERROR] = g_signal_new ("load_error", @@ -10887,7 +10887,7 @@ fm_directory_view_class_init (FMDirectoryViewClass *klass) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (FMDirectoryViewClass, remove_file), NULL, NULL, - caja_marshal_VOID__OBJECT_OBJECT, + fm_marshal_VOID__OBJECT_OBJECT, G_TYPE_NONE, 2, CAJA_TYPE_FILE, CAJA_TYPE_DIRECTORY); klass->accepts_dragged_files = real_accepts_dragged_files; @@ -10944,7 +10944,7 @@ fm_directory_view_class_init (FMDirectoryViewClass *klass) G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET (FMDirectoryViewClass, trash), g_signal_accumulator_true_handled, NULL, - eel_marshal_BOOLEAN__VOID, + fm_marshal_BOOLEAN__VOID, G_TYPE_BOOLEAN, 0); signals[DELETE] = g_signal_new ("delete", @@ -10952,7 +10952,7 @@ fm_directory_view_class_init (FMDirectoryViewClass *klass) G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET (FMDirectoryViewClass, delete), g_signal_accumulator_true_handled, NULL, - eel_marshal_BOOLEAN__VOID, + fm_marshal_BOOLEAN__VOID, G_TYPE_BOOLEAN, 0); binding_set = gtk_binding_set_by_class (klass); -- cgit v1.2.1