[giggle] Use g_cclosure_marshal_generic for all signals
- From: Javier JardÃn <jjardon src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [giggle] Use g_cclosure_marshal_generic for all signals
- Date: Fri, 30 Sep 2011 02:36:41 +0000 (UTC)
commit f60935ac26cbff5db25e50647e3e22e5a517daa0
Author: Javier JardÃn <jjardon gnome org>
Date: Wed Sep 28 13:48:21 2011 +0100
Use g_cclosure_marshal_generic for all signals
No more ugly marshallers \o/
configure.ac | 9 +++++----
libgiggle-git/giggle-git-config.c | 2 +-
libgiggle-git/giggle-git.c | 2 +-
libgiggle/.gitignore | 1 -
libgiggle/Makefile.am | 17 -----------------
libgiggle/giggle-clipboard.c | 3 ++-
libgiggle/giggle-history.c | 6 ++++--
libgiggle/giggle-plugin-manager.c | 3 ++-
libgiggle/giggle-view.c | 6 ++++--
src/eggfindbar.c | 8 ++++----
src/giggle-diff-tree-view.c | 2 +-
src/giggle-file-list.c | 6 +++---
src/giggle-rev-list-view.c | 5 ++---
src/giggle-short-list.c | 3 +--
14 files changed, 30 insertions(+), 43 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 891a942..25a56de 100644
--- a/configure.ac
+++ b/configure.ac
@@ -37,7 +37,6 @@ AC_FUNC_MKTIME
AC_CHECK_FUNCS([localtime_r setlocale strchr strrchr strstr])
-AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
AC_PATH_PROG(GLIB_MKENUMS, glib-mkenums)
AC_SUBST([LIBGIGGLE_ABI], [0:0:0])
@@ -48,10 +47,12 @@ dnl ------------------
dnl | Pkgconfig checks |---------------------------------------
dnl ------------------
+GLIB_REQUIRED_VERSION=2.30
+
PKG_CHECK_MODULES(GIGGLE, [
- gio-2.0 >= 2.18
- glib-2.0 >= 2.18
- gthread-2.0 >= 2.16
+ gio-2.0 >= $GLIB_REQUIRED_VERSION
+ glib-2.0 >= $GLIB_REQUIRED_VERSION
+ gthread-2.0 >= $GLIB_REQUIRED_VERSION
gtk+-3.0 >= 2.91
gtksourceview-3.0 >= 2.9
])
diff --git a/libgiggle-git/giggle-git-config.c b/libgiggle-git/giggle-git-config.c
index 1f84d36..ee51c1e 100644
--- a/libgiggle-git/giggle-git-config.c
+++ b/libgiggle-git/giggle-git-config.c
@@ -370,7 +370,7 @@ giggle_git_config_class_init (GiggleGitConfigClass *class)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GiggleGitConfigClass, changed),
NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
+ g_cclosure_marshal_generic,
G_TYPE_NONE, 0);
g_type_class_add_private (object_class, sizeof (GiggleGitConfigPriv));
diff --git a/libgiggle-git/giggle-git.c b/libgiggle-git/giggle-git.c
index 0a79c64..89a3303 100644
--- a/libgiggle-git/giggle-git.c
+++ b/libgiggle-git/giggle-git.c
@@ -155,7 +155,7 @@ giggle_git_class_init (GiggleGitClass *class)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GiggleGitClass, changed),
NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
+ g_cclosure_marshal_generic,
G_TYPE_NONE, 0);
g_type_class_add_private (object_class, sizeof (GiggleGitPriv));
diff --git a/libgiggle/.gitignore b/libgiggle/.gitignore
index 5f76ceb..32eb721 100644
--- a/libgiggle/.gitignore
+++ b/libgiggle/.gitignore
@@ -1,5 +1,4 @@
*.l[oa]
giggle-enums.[ch]
-giggle-marshal.[ch]
libgiggle.la
*~
diff --git a/libgiggle/Makefile.am b/libgiggle/Makefile.am
index 7600c44..c993fc2 100644
--- a/libgiggle/Makefile.am
+++ b/libgiggle/Makefile.am
@@ -58,7 +58,6 @@ libgiggle_la_SOURCES = \
libgiggle_HEADERS = \
$(libgiggle_git_h_files) \
giggle-enums.h \
- giggle-marshal.h \
$(NULL)
libgiggle_la_LIBADD = \
@@ -79,29 +78,13 @@ giggle-enums.c: giggle-enums.c.in $(libgiggle_h_files)
$(AM_V_at)( cmp -s xgen-gtbc $@ || (echo " ENUM $ "; cp xgen-gtbc $@ ))
$(AM_V_at)( rm -f xgen-gtbc )
-giggle-marshal.h: giggle-marshal.list
- $(AM_V_at)( cd $(srcdir) && \
- $(GLIB_GENMARSHAL) --prefix=giggle_marshal $< --header ) > xgen-gmh
- $(AM_V_at)( cmp -s xgen-gmh $@ || (echo " GENM $ "; cp xgen-gmh $@ ))
- $(AM_V_at)( rm -f xgen-gmh )
-
-giggle-marshal.c: giggle-marshal.list
- $(AM_V_at)( cd $(srcdir) && \
- echo "#include \"giggle-marshal.h\"" && \
- $(GLIB_GENMARSHAL) --prefix=giggle_marshal $< --body ) > xgen-gmc
- $(AM_V_at)( cmp -s xgen-gmc $@ || (echo " GENM $ "; cp xgen-gmc $@ ))
- $(AM_V_at)( rm -f xgen-gmc )
-
BUILT_SOURCES = \
- giggle-marshal.h \
- giggle-marshal.c \
giggle-enums.h \
giggle-enums.c
CLEANFILES = $(BUILT_SOURCES)
EXTRA_DIST = \
- giggle-marshal.list \
giggle-enums.c.in \
giggle-enums.h.in
diff --git a/libgiggle/giggle-clipboard.c b/libgiggle/giggle-clipboard.c
index 1f29ae2..f7e34a5 100644
--- a/libgiggle/giggle-clipboard.c
+++ b/libgiggle/giggle-clipboard.c
@@ -36,7 +36,8 @@ giggle_clipboard_iface_init (gpointer iface,
GIGGLE_TYPE_CLIPBOARD,
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GiggleClipboardIface, clipboard_changed),
- NULL, NULL, g_cclosure_marshal_VOID__VOID,
+ NULL, NULL,
+ g_cclosure_marshal_generic,
G_TYPE_NONE, 0);
}
diff --git a/libgiggle/giggle-history.c b/libgiggle/giggle-history.c
index 6f857b8..70e0281 100644
--- a/libgiggle/giggle-history.c
+++ b/libgiggle/giggle-history.c
@@ -37,7 +37,8 @@ giggle_history_iface_init (gpointer iface,
GIGGLE_TYPE_HISTORY,
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GiggleHistoryIface, changed),
- NULL, NULL, g_cclosure_marshal_VOID__VOID,
+ NULL, NULL,
+ g_cclosure_marshal_generic,
G_TYPE_NONE, 0);
signals[HISTORY_RESET] =
@@ -45,7 +46,8 @@ giggle_history_iface_init (gpointer iface,
GIGGLE_TYPE_HISTORY,
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GiggleHistoryIface, reset),
- NULL, NULL, g_cclosure_marshal_VOID__VOID,
+ NULL, NULL,
+ g_cclosure_marshal_generic,
G_TYPE_NONE, 0);
}
diff --git a/libgiggle/giggle-plugin-manager.c b/libgiggle/giggle-plugin-manager.c
index 9e9acd6..109368e 100644
--- a/libgiggle/giggle-plugin-manager.c
+++ b/libgiggle/giggle-plugin-manager.c
@@ -181,7 +181,8 @@ giggle_plugin_manager_class_init (GigglePluginManagerClass *class)
g_signal_new ("plugin-added",
GIGGLE_TYPE_PLUGIN_MANAGER, G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (GigglePluginManagerClass, plugin_added),
- NULL, NULL, g_cclosure_marshal_VOID__OBJECT,
+ NULL, NULL,
+ g_cclosure_marshal_generic,
G_TYPE_NONE, 1, GIGGLE_TYPE_PLUGIN);
g_type_class_add_private (class, sizeof (GigglePluginManagerPriv));
diff --git a/libgiggle/giggle-view.c b/libgiggle/giggle-view.c
index 373857b..ae154b3 100644
--- a/libgiggle/giggle-view.c
+++ b/libgiggle/giggle-view.c
@@ -251,12 +251,14 @@ giggle_view_class_init (GiggleViewClass *class)
signals[ADD_UI] = g_signal_new ("add-ui", GIGGLE_TYPE_VIEW, G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (GiggleViewClass, add_ui),
- NULL, NULL, g_cclosure_marshal_VOID__OBJECT,
+ NULL, NULL,
+ g_cclosure_marshal_generic,
G_TYPE_NONE, 1, GTK_TYPE_UI_MANAGER);
signals[REMOVE_UI] = g_signal_new ("remove-ui", GIGGLE_TYPE_VIEW, G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GiggleViewClass, remove_ui),
- NULL, NULL, g_cclosure_marshal_VOID__VOID,
+ NULL, NULL,
+ g_cclosure_marshal_generic,
G_TYPE_NONE, 0);
g_type_class_add_private (class, sizeof (GiggleViewPriv));
diff --git a/src/eggfindbar.c b/src/eggfindbar.c
index 9920fd6..c6f7746 100644
--- a/src/eggfindbar.c
+++ b/src/eggfindbar.c
@@ -105,7 +105,7 @@ egg_find_bar_class_init (EggFindBarClass *klass)
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (EggFindBarClass, next),
NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
+ g_cclosure_marshal_generic,
G_TYPE_NONE, 0);
find_bar_signals[PREVIOUS] =
g_signal_new ("previous",
@@ -113,7 +113,7 @@ egg_find_bar_class_init (EggFindBarClass *klass)
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (EggFindBarClass, previous),
NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
+ g_cclosure_marshal_generic,
G_TYPE_NONE, 0);
find_bar_signals[CLOSE] =
g_signal_new ("close",
@@ -121,7 +121,7 @@ egg_find_bar_class_init (EggFindBarClass *klass)
G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION,
G_STRUCT_OFFSET (EggFindBarClass, close),
NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
+ g_cclosure_marshal_generic,
G_TYPE_NONE, 0);
find_bar_signals[SCROLL] =
g_signal_new ("scroll",
@@ -129,7 +129,7 @@ egg_find_bar_class_init (EggFindBarClass *klass)
G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION,
G_STRUCT_OFFSET (EggFindBarClass, scroll),
NULL, NULL,
- g_cclosure_marshal_VOID__ENUM,
+ g_cclosure_marshal_generic,
G_TYPE_NONE, 1,
GTK_TYPE_SCROLL_TYPE);
diff --git a/src/giggle-diff-tree-view.c b/src/giggle-diff-tree-view.c
index 13e0110..9988284 100644
--- a/src/giggle-diff-tree-view.c
+++ b/src/giggle-diff-tree-view.c
@@ -80,7 +80,7 @@ giggle_diff_tree_view_class_init (GiggleDiffTreeViewClass *class)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GiggleDiffTreeViewClass, path_selected),
NULL, NULL,
- g_cclosure_marshal_VOID__STRING,
+ g_cclosure_marshal_generic,
G_TYPE_NONE,
1, G_TYPE_STRING);
diff --git a/src/giggle-file-list.c b/src/giggle-file-list.c
index a95f3f1..8b5bde2 100644
--- a/src/giggle-file-list.c
+++ b/src/giggle-file-list.c
@@ -498,7 +498,7 @@ giggle_file_list_class_init (GiggleFileListClass *class)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GiggleFileListClass, path_selected),
NULL, NULL,
- g_cclosure_marshal_VOID__STRING,
+ g_cclosure_marshal_generic,
G_TYPE_NONE,
1, G_TYPE_STRING);
@@ -508,7 +508,7 @@ giggle_file_list_class_init (GiggleFileListClass *class)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GiggleFileListClass, project_loaded),
NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
+ g_cclosure_marshal_generic,
G_TYPE_NONE, 0);
signals[STATUS_CHANGED] =
@@ -517,7 +517,7 @@ giggle_file_list_class_init (GiggleFileListClass *class)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GiggleFileListClass, status_changed),
NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
+ g_cclosure_marshal_generic,
G_TYPE_NONE, 0);
g_type_class_add_private (object_class, sizeof (GiggleFileListPriv));
diff --git a/src/giggle-rev-list-view.c b/src/giggle-rev-list-view.c
index 6b39683..8ccae33 100644
--- a/src/giggle-rev-list-view.c
+++ b/src/giggle-rev-list-view.c
@@ -28,7 +28,6 @@
#include <libgiggle/giggle-branch.h>
#include <libgiggle/giggle-clipboard.h>
#include <libgiggle/giggle-job.h>
-#include <libgiggle/giggle-marshal.h>
#include <libgiggle/giggle-revision.h>
#include <libgiggle/giggle-searchable.h>
#include <libgiggle/giggle-tag.h>
@@ -658,7 +657,7 @@ giggle_rev_list_view_class_init (GiggleRevListViewClass *class)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GiggleRevListViewClass, selection_changed),
NULL, NULL,
- giggle_marshal_VOID__OBJECT_OBJECT,
+ g_cclosure_marshal_generic,
G_TYPE_NONE,
2, GIGGLE_TYPE_REVISION, GIGGLE_TYPE_REVISION);
@@ -668,7 +667,7 @@ giggle_rev_list_view_class_init (GiggleRevListViewClass *class)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GiggleRevListViewClass, revision_activated),
NULL, NULL,
- g_cclosure_marshal_VOID__OBJECT,
+ g_cclosure_marshal_generic,
G_TYPE_NONE,
1, GIGGLE_TYPE_REVISION);
diff --git a/src/giggle-short-list.c b/src/giggle-short-list.c
index dfd2ec0..5d5bf73 100644
--- a/src/giggle-short-list.c
+++ b/src/giggle-short-list.c
@@ -24,7 +24,6 @@
#include <gtk/gtk.h>
#include "giggle-short-list.h"
-#include "libgiggle/giggle-marshal.h"
typedef struct GiggleShortListPriv GiggleShortListPriv;
@@ -105,7 +104,7 @@ giggle_short_list_class_init (GiggleShortListClass *class)
g_signal_new ("display-object", GIGGLE_TYPE_SHORT_LIST,
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GiggleShortListClass, display_object),
NULL, NULL,
- giggle_marshal_STRING__OBJECT,
+ g_cclosure_marshal_generic,
G_TYPE_STRING, 1,
G_TYPE_OBJECT);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]