From 7978eacb5d49b518a7f7b4e7b92c8a7bfb8fc400 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Wed, 28 Sep 2011 13:41:11 +0200 Subject: Use g_cclosure_marshal_generic for all signals No more ugly marshallers \o/ --- libempathy-gtk/Makefile.am | 21 --------------------- libempathy-gtk/empathy-account-chooser.c | 2 +- libempathy-gtk/empathy-account-widget.c | 6 +++--- libempathy-gtk/empathy-avatar-chooser.c | 2 +- libempathy-gtk/empathy-cell-renderer-activatable.c | 2 +- libempathy-gtk/empathy-chat.c | 7 +++---- libempathy-gtk/empathy-contact-chooser.c | 2 +- libempathy-gtk/empathy-contact-list-view.c | 3 +-- libempathy-gtk/empathy-individual-menu.c | 2 +- libempathy-gtk/empathy-individual-view.c | 5 ++--- libempathy-gtk/empathy-irc-network-chooser.c | 2 +- libempathy-gtk/empathy-live-search.c | 5 ++--- libempathy-gtk/empathy-persona-view.c | 3 +-- libempathy-gtk/empathy-theme-manager.c | 2 +- 14 files changed, 19 insertions(+), 45 deletions(-) (limited to 'libempathy-gtk') diff --git a/libempathy-gtk/Makefile.am b/libempathy-gtk/Makefile.am index 31e0ec8cc..7d790a81a 100644 --- a/libempathy-gtk/Makefile.am +++ b/libempathy-gtk/Makefile.am @@ -19,9 +19,6 @@ AM_CPPFLAGS = \ $(DISABLE_DEPRECATED) BUILT_SOURCES = \ - empathy-gtk-marshal.h \ - empathy-gtk-marshal.c \ - empathy-gtk-marshal.list \ empathy-gtk-enum-types.h \ empathy-gtk-enum-types.c @@ -216,24 +213,6 @@ ui_DATA = \ empathy-search-bar.ui \ empathy-individual-widget.ui -empathy-gtk-marshal.list: $(libempathy_gtk_la_SOURCES) Makefile.am - $(AM_V_GEN)( cd $(srcdir) && \ - sed -n -e 's/.*empathy_gtk_marshal_\([[:upper:][:digit:]]*__[[:upper:][:digit:]_]*\).*/\1/p' \ - $(libempathy_gtk_la_SOURCES) ) \ - | sed -e 's/__/:/' -e 'y/_/,/' | sort -u > $@.tmp - @if cmp -s $@.tmp $@; then \ - rm $@.tmp; \ - else \ - mv $@.tmp $@; \ - fi - -%-marshal.h: %-marshal.list Makefile - $(AM_V_GEN)$(GLIB_GENMARSHAL) --header --prefix=_$(subst -,_,$*)_marshal $< > $*-marshal.h - -%-marshal.c: %-marshal.list Makefile - $(AM_V_GEN)echo "#include \"empathy-gtk-marshal.h\"" > $@ && \ - $(GLIB_GENMARSHAL) --body --prefix=_$(subst -,_,$*)_marshal $< >> $*-marshal.c - empathy-gtk-enum-types.h: stamp-empathy-gtk-enum-types.h $(AM_V_GEN)true stamp-empathy-gtk-enum-types.h: Makefile $(libempathy_gtk_headers) diff --git a/libempathy-gtk/empathy-account-chooser.c b/libempathy-gtk/empathy-account-chooser.c index ad4f77846..863992871 100644 --- a/libempathy-gtk/empathy-account-chooser.c +++ b/libempathy-gtk/empathy-account-chooser.c @@ -205,7 +205,7 @@ empathy_account_chooser_class_init (EmpathyAccountChooserClass *klass) G_SIGNAL_RUN_LAST, 0, NULL, NULL, - g_cclosure_marshal_VOID__VOID, + g_cclosure_marshal_generic, G_TYPE_NONE, 0); diff --git a/libempathy-gtk/empathy-account-widget.c b/libempathy-gtk/empathy-account-widget.c index 911304c86..897b9bbf2 100644 --- a/libempathy-gtk/empathy-account-widget.c +++ b/libempathy-gtk/empathy-account-widget.c @@ -2363,7 +2363,7 @@ empathy_account_widget_class_init (EmpathyAccountWidgetClass *klass) signals[HANDLE_APPLY] = g_signal_new ("handle-apply", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - g_cclosure_marshal_VOID__BOOLEAN, + g_cclosure_marshal_generic, G_TYPE_NONE, 1, G_TYPE_BOOLEAN); @@ -2371,14 +2371,14 @@ empathy_account_widget_class_init (EmpathyAccountWidgetClass *klass) signals[ACCOUNT_CREATED] = g_signal_new ("account-created", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - g_cclosure_marshal_VOID__OBJECT, + g_cclosure_marshal_generic, G_TYPE_NONE, 1, G_TYPE_OBJECT); signals[CANCELLED] = g_signal_new ("cancelled", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - g_cclosure_marshal_VOID__VOID, + g_cclosure_marshal_generic, G_TYPE_NONE, 0); diff --git a/libempathy-gtk/empathy-avatar-chooser.c b/libempathy-gtk/empathy-avatar-chooser.c index 0fe972481..0a04fe0c0 100644 --- a/libempathy-gtk/empathy-avatar-chooser.c +++ b/libempathy-gtk/empathy-avatar-chooser.c @@ -201,7 +201,7 @@ empathy_avatar_chooser_class_init (EmpathyAvatarChooserClass *klass) G_SIGNAL_RUN_LAST, 0, NULL, NULL, - g_cclosure_marshal_VOID__VOID, + g_cclosure_marshal_generic, G_TYPE_NONE, 0); /** diff --git a/libempathy-gtk/empathy-cell-renderer-activatable.c b/libempathy-gtk/empathy-cell-renderer-activatable.c index 9c1a6e53b..c2325adec 100644 --- a/libempathy-gtk/empathy-cell-renderer-activatable.c +++ b/libempathy-gtk/empathy-cell-renderer-activatable.c @@ -183,7 +183,7 @@ empathy_cell_renderer_activatable_class_init ( G_SIGNAL_RUN_LAST, 0, NULL, NULL, - g_cclosure_marshal_VOID__STRING, + g_cclosure_marshal_generic, G_TYPE_NONE, 1, G_TYPE_STRING); diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c index c9f6dd9d5..a8903b476 100644 --- a/libempathy-gtk/empathy-chat.c +++ b/libempathy-gtk/empathy-chat.c @@ -52,7 +52,6 @@ #include "empathy-contact-list-store.h" #include "empathy-contact-list-view.h" #include "empathy-contact-menu.h" -#include "empathy-gtk-marshal.h" #include "empathy-input-text-view.h" #include "empathy-search-bar.h" #include "empathy-theme-manager.h" @@ -3241,7 +3240,7 @@ empathy_chat_class_init (EmpathyChatClass *klass) G_SIGNAL_RUN_LAST, 0, NULL, NULL, - g_cclosure_marshal_VOID__BOOLEAN, + g_cclosure_marshal_generic, G_TYPE_NONE, 1, G_TYPE_BOOLEAN); @@ -3251,7 +3250,7 @@ empathy_chat_class_init (EmpathyChatClass *klass) G_SIGNAL_RUN_LAST, 0, NULL, NULL, - _empathy_gtk_marshal_VOID__OBJECT_BOOLEAN, + g_cclosure_marshal_generic, G_TYPE_NONE, 2, EMPATHY_TYPE_MESSAGE, G_TYPE_BOOLEAN); @@ -3261,7 +3260,7 @@ empathy_chat_class_init (EmpathyChatClass *klass) G_SIGNAL_RUN_LAST, 0, NULL, NULL, - g_cclosure_marshal_VOID__POINTER, + g_cclosure_marshal_generic, G_TYPE_NONE, 1, G_TYPE_STRV); diff --git a/libempathy-gtk/empathy-contact-chooser.c b/libempathy-gtk/empathy-contact-chooser.c index 7faee3e09..e9269a9b6 100644 --- a/libempathy-gtk/empathy-contact-chooser.c +++ b/libempathy-gtk/empathy-contact-chooser.c @@ -118,7 +118,7 @@ empathy_contact_chooser_class_init ( G_SIGNAL_RUN_LAST, 0, NULL, NULL, - g_cclosure_marshal_VOID__OBJECT, + g_cclosure_marshal_generic, G_TYPE_NONE, 1, FOLKS_TYPE_INDIVIDUAL); } diff --git a/libempathy-gtk/empathy-contact-list-view.c b/libempathy-gtk/empathy-contact-list-view.c index 277842ff5..f8c055c7e 100644 --- a/libempathy-gtk/empathy-contact-list-view.c +++ b/libempathy-gtk/empathy-contact-list-view.c @@ -49,7 +49,6 @@ #include "empathy-cell-renderer-activatable.h" #include "empathy-ui-utils.h" #include "empathy-gtk-enum-types.h" -#include "empathy-gtk-marshal.h" #define DEBUG_FLAG EMPATHY_DEBUG_CONTACT #include @@ -1784,7 +1783,7 @@ empathy_contact_list_view_class_init (EmpathyContactListViewClass *klass) G_SIGNAL_RUN_LAST, 0, NULL, NULL, - _empathy_gtk_marshal_VOID__OBJECT_STRING_STRING, + g_cclosure_marshal_generic, G_TYPE_NONE, 3, EMPATHY_TYPE_CONTACT, G_TYPE_STRING, G_TYPE_STRING); diff --git a/libempathy-gtk/empathy-individual-menu.c b/libempathy-gtk/empathy-individual-menu.c index 5d24cf120..77cbc57d5 100644 --- a/libempathy-gtk/empathy-individual-menu.c +++ b/libempathy-gtk/empathy-individual-menu.c @@ -664,7 +664,7 @@ empathy_individual_menu_class_init (EmpathyIndividualMenuClass *klass) signals[SIGNAL_LINK_CONTACTS_ACTIVATED] = g_signal_new ("link-contacts-activated", G_OBJECT_CLASS_TYPE (klass), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - g_cclosure_marshal_VOID__OBJECT, + g_cclosure_marshal_generic, G_TYPE_NONE, 1, EMPATHY_TYPE_LINKING_DIALOG); g_type_class_add_private (object_class, sizeof (EmpathyIndividualMenuPriv)); diff --git a/libempathy-gtk/empathy-individual-view.c b/libempathy-gtk/empathy-individual-view.c index 03fe897ea..51c9dfc29 100644 --- a/libempathy-gtk/empathy-individual-view.c +++ b/libempathy-gtk/empathy-individual-view.c @@ -55,7 +55,6 @@ #include "empathy-cell-renderer-activatable.h" #include "empathy-ui-utils.h" #include "empathy-gtk-enum-types.h" -#include "empathy-gtk-marshal.h" #define DEBUG_FLAG EMPATHY_DEBUG_CONTACT #include @@ -2152,7 +2151,7 @@ empathy_individual_view_class_init (EmpathyIndividualViewClass *klass) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (EmpathyIndividualViewClass, drag_individual_received), NULL, NULL, - _empathy_gtk_marshal_VOID__UINT_OBJECT_STRING_STRING, + g_cclosure_marshal_generic, G_TYPE_NONE, 4, G_TYPE_UINT, FOLKS_TYPE_INDIVIDUAL, G_TYPE_STRING, G_TYPE_STRING); @@ -2162,7 +2161,7 @@ empathy_individual_view_class_init (EmpathyIndividualViewClass *klass) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (EmpathyIndividualViewClass, drag_persona_received), NULL, NULL, - _empathy_gtk_marshal_BOOLEAN__UINT_OBJECT_OBJECT, + g_cclosure_marshal_generic, G_TYPE_BOOLEAN, 3, G_TYPE_UINT, FOLKS_TYPE_PERSONA, FOLKS_TYPE_INDIVIDUAL); g_object_class_install_property (object_class, diff --git a/libempathy-gtk/empathy-irc-network-chooser.c b/libempathy-gtk/empathy-irc-network-chooser.c index 0fbd7b5fd..7a6bd7898 100644 --- a/libempathy-gtk/empathy-irc-network-chooser.c +++ b/libempathy-gtk/empathy-irc-network-chooser.c @@ -348,7 +348,7 @@ empathy_irc_network_chooser_class_init (EmpathyIrcNetworkChooserClass *klass) G_SIGNAL_RUN_LAST, 0, NULL, NULL, - g_cclosure_marshal_VOID__VOID, + g_cclosure_marshal_generic, G_TYPE_NONE, 0); diff --git a/libempathy-gtk/empathy-live-search.c b/libempathy-gtk/empathy-live-search.c index 422bfcb73..968adca77 100644 --- a/libempathy-gtk/empathy-live-search.c +++ b/libempathy-gtk/empathy-live-search.c @@ -30,7 +30,6 @@ #include #include "empathy-live-search.h" -#include "empathy-gtk-marshal.h" G_DEFINE_TYPE (EmpathyLiveSearch, empathy_live_search, GTK_TYPE_HBOX) @@ -546,7 +545,7 @@ empathy_live_search_class_init (EmpathyLiveSearchClass *klass) G_SIGNAL_RUN_LAST, 0, NULL, NULL, - g_cclosure_marshal_VOID__VOID, + g_cclosure_marshal_generic, G_TYPE_NONE, 0); signals[KEYNAV] = g_signal_new ("key-navigation", @@ -554,7 +553,7 @@ empathy_live_search_class_init (EmpathyLiveSearchClass *klass) G_SIGNAL_RUN_LAST, 0, g_signal_accumulator_true_handled, NULL, - _empathy_gtk_marshal_BOOLEAN__BOXED, + g_cclosure_marshal_generic, G_TYPE_BOOLEAN, 1, GDK_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE); param_spec = g_param_spec_object ("hook-widget", "Live Search Hook Widget", diff --git a/libempathy-gtk/empathy-persona-view.c b/libempathy-gtk/empathy-persona-view.c index d5a8c69ab..7df94a630 100644 --- a/libempathy-gtk/empathy-persona-view.c +++ b/libempathy-gtk/empathy-persona-view.c @@ -46,7 +46,6 @@ #include "empathy-cell-renderer-text.h" #include "empathy-cell-renderer-activatable.h" #include "empathy-gtk-enum-types.h" -#include "empathy-gtk-marshal.h" #include "empathy-ui-utils.h" #define DEBUG_FLAG EMPATHY_DEBUG_CONTACT @@ -715,7 +714,7 @@ empathy_persona_view_class_init (EmpathyPersonaViewClass *klass) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (EmpathyPersonaViewClass, drag_individual_received), NULL, NULL, - _empathy_gtk_marshal_BOOLEAN__UINT_OBJECT, + g_cclosure_marshal_generic, G_TYPE_BOOLEAN, 2, G_TYPE_UINT, FOLKS_TYPE_INDIVIDUAL); /* We override the "model" property so that we can wrap it in a diff --git a/libempathy-gtk/empathy-theme-manager.c b/libempathy-gtk/empathy-theme-manager.c index c771392b9..28cbbf3bc 100644 --- a/libempathy-gtk/empathy-theme-manager.c +++ b/libempathy-gtk/empathy-theme-manager.c @@ -590,7 +590,7 @@ empathy_theme_manager_class_init (EmpathyThemeManagerClass *klass) G_SIGNAL_RUN_LAST, 0, NULL, NULL, - g_cclosure_marshal_VOID__VOID, + g_cclosure_marshal_generic, G_TYPE_NONE, 0); -- cgit v1.2.3