[ghex] Use the generic marshaller
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ghex] Use the generic marshaller
- Date: Thu, 1 Mar 2012 23:52:01 +0000 (UTC)
commit 02d36f50776076c2e3c7aa291b3703de73cfbb88
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Thu Feb 2 04:04:35 2012 -0500
Use the generic marshaller
The specific marshallers, along with glib-genmarshal, are deprecated.
https://bugzilla.gnome.org/show_bug.cgi?id=671101
.gitignore | 2 --
src/Makefile.am | 9 ---------
src/ghex-marshal.list | 4 ----
src/gtkhex.c | 16 +++++-----------
src/hex-document.c | 9 ++++-----
5 files changed, 9 insertions(+), 31 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 0cf0c94..9c04581 100644
--- a/.gitignore
+++ b/.gitignore
@@ -45,8 +45,6 @@ po/POTFILES
po/Rules-quot
po/stamp-it
src/ghex
-src/ghex-marshal.c
-src/ghex-marshal.h
src/ghex-resources.c
src/ghex-resources.h
stamp-h1
diff --git a/src/Makefile.am b/src/Makefile.am
index 8958d00..6e38e57 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -17,8 +17,6 @@ ghex-resources.h: ghex.gresource.xml
glib-compile-resources --target=$@ --generate-header --c-name ghex --sourcedir=$(srcdir) $<
BUILT_SOURCES = \
- ghex-marshal.c \
- ghex-marshal.h \
ghex-resources.c \
ghex-resources.h \
$(NULL)
@@ -57,14 +55,7 @@ ghex_SOURCES = \
configuration.h preferences.h findreplace.h print.h \
converter.h chartable.h ui.h
-ghex-marshal.h: ghex-marshal.list $(GLIB_GENMARSHAL)
- $(GLIB_GENMARSHAL) $< --header --prefix=ghex_marshal > $@
-ghex-marshal.c: ghex-marshal.list $(GLIB_GENMARSHAL)
- echo "#include \"ghex-marshal.h\"" > $@ && \
- $(GLIB_GENMARSHAL) $< --body --prefix=ghex_marshal >> $@
-
EXTRA_DIST = \
- ghex-marshal.list \
ghex-ui.xml \
ghex.gresource.xml
diff --git a/src/gtkhex.c b/src/gtkhex.c
index 7ec1dba..7e48821 100644
--- a/src/gtkhex.c
+++ b/src/gtkhex.c
@@ -32,7 +32,6 @@
#include "hex-document.h"
#include "gtkhex.h"
#include "gtkhex-private.h"
-#include "ghex-marshal.h"
#define DISPLAY_BORDER 4
@@ -2054,16 +2053,14 @@ static void gtk_hex_class_init(GtkHexClass *klass, gpointer data) {
G_TYPE_FROM_CLASS (widget_class),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (GtkHexClass, cursor_moved),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
+ NULL, NULL, NULL, G_TYPE_NONE, 0);
gtkhex_signals[DATA_CHANGED_SIGNAL] =
g_signal_new ("data_changed",
G_TYPE_FROM_CLASS (widget_class),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (GtkHexClass, data_changed),
- NULL, NULL,
- g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1,
+ NULL, NULL, NULL, G_TYPE_NONE, 1,
G_TYPE_POINTER);
gtkhex_signals[CUT_CLIPBOARD_SIGNAL] =
@@ -2071,16 +2068,14 @@ static void gtk_hex_class_init(GtkHexClass *klass, gpointer data) {
G_TYPE_FROM_CLASS (widget_class),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (GtkHexClass, cut_clipboard),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
+ NULL, NULL, NULL, G_TYPE_NONE, 0);
gtkhex_signals[COPY_CLIPBOARD_SIGNAL] =
g_signal_new ("copy_clipboard",
G_TYPE_FROM_CLASS (widget_class),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (GtkHexClass, copy_clipboard),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
+ NULL, NULL, NULL, G_TYPE_NONE, 0);
gtkhex_signals[PASTE_CLIPBOARD_SIGNAL] =
@@ -2088,8 +2083,7 @@ static void gtk_hex_class_init(GtkHexClass *klass, gpointer data) {
G_TYPE_FROM_CLASS (widget_class),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (GtkHexClass, paste_clipboard),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
+ NULL, NULL, NULL, G_TYPE_NONE, 0);
klass->cursor_moved = NULL;
klass->data_changed = gtk_hex_real_data_changed;
diff --git a/src/hex-document.c b/src/hex-document.c
index eb5fc08..a23ff0b 100644
--- a/src/hex-document.c
+++ b/src/hex-document.c
@@ -26,7 +26,6 @@
#include <glib/gi18n.h>
#include <gtkhex.h>
-#include <ghex-marshal.h>
#include <stdio.h>
#include <unistd.h>
@@ -340,7 +339,7 @@ hex_document_class_init (HexDocumentClass *klass)
G_STRUCT_OFFSET (HexDocumentClass, document_changed),
NULL,
NULL,
- ghex_marshal_VOID__POINTER_BOOLEAN,
+ NULL,
G_TYPE_NONE,
2, G_TYPE_POINTER, G_TYPE_BOOLEAN);
hex_signals[UNDO] =
@@ -350,7 +349,7 @@ hex_document_class_init (HexDocumentClass *klass)
G_STRUCT_OFFSET (HexDocumentClass, undo),
NULL,
NULL,
- ghex_marshal_VOID__VOID,
+ NULL,
G_TYPE_NONE, 0);
hex_signals[REDO] =
g_signal_new ("redo",
@@ -359,7 +358,7 @@ hex_document_class_init (HexDocumentClass *klass)
G_STRUCT_OFFSET (HexDocumentClass, redo),
NULL,
NULL,
- ghex_marshal_VOID__VOID,
+ NULL,
G_TYPE_NONE, 0);
hex_signals[UNDO_STACK_FORGET] =
g_signal_new ("undo_stack_forget",
@@ -368,7 +367,7 @@ hex_document_class_init (HexDocumentClass *klass)
G_STRUCT_OFFSET (HexDocumentClass, undo_stack_forget),
NULL,
NULL,
- ghex_marshal_VOID__VOID,
+ NULL,
G_TYPE_NONE, 0);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]