[gtksourceview] Use g_signal_new_class_handler() instead of newv()
- From: Garrett Regier <gregier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview] Use g_signal_new_class_handler() instead of newv()
- Date: Sun, 18 Jan 2015 10:08:07 +0000 (UTC)
commit 77010a8b8fb683284226264ce6df4f918439e2ff
Author: Garrett Regier <garrettregier gmail com>
Date: Sun Jan 18 02:07:50 2015 -0800
Use g_signal_new_class_handler() instead of newv()
This does the same thing but is much easier to use
and roughly follows the normal g_signal_new() API.
gtksourceview/gtksourcebuffer.c | 18 ++++++++----------
1 files changed, 8 insertions(+), 10 deletions(-)
---
diff --git a/gtksourceview/gtksourcebuffer.c b/gtksourceview/gtksourcebuffer.c
index 0fd9e79..1714548 100644
--- a/gtksourceview/gtksourcebuffer.c
+++ b/gtksourceview/gtksourcebuffer.c
@@ -252,7 +252,6 @@ gtk_source_buffer_class_init (GtkSourceBufferClass *klass)
{
GObjectClass *object_class;
GtkTextBufferClass *tb_class;
- GType param_types[2];
object_class = G_OBJECT_CLASS (klass);
tb_class = GTK_TEXT_BUFFER_CLASS (klass);
@@ -380,9 +379,6 @@ gtk_source_buffer_class_init (GtkSourceBufferClass *klass)
G_PARAM_READWRITE | G_PARAM_CONSTRUCT |
G_PARAM_STATIC_STRINGS));
- param_types[0] = GTK_TYPE_TEXT_ITER | G_SIGNAL_TYPE_STATIC_SCOPE;
- param_types[1] = GTK_TYPE_TEXT_ITER | G_SIGNAL_TYPE_STATIC_SCOPE;
-
/**
* GtkSourceBuffer::highlight-updated:
* @buffer: the buffer that received the signal
@@ -395,12 +391,14 @@ gtk_source_buffer_class_init (GtkSourceBufferClass *klass)
* updated (e.g. the no-spell-check context class).
*/
buffer_signals[HIGHLIGHT_UPDATED] =
- g_signal_newv ("highlight_updated",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- NULL, NULL, NULL, NULL,
- G_TYPE_NONE,
- 2, param_types);
+ g_signal_new_class_handler ("highlight_updated",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ NULL, NULL, NULL, NULL,
+ G_TYPE_NONE,
+ 2,
+ GTK_TYPE_TEXT_ITER | G_SIGNAL_TYPE_STATIC_SCOPE,
+ GTK_TYPE_TEXT_ITER | G_SIGNAL_TYPE_STATIC_SCOPE);
/**
* GtkSourceBuffer::source-mark-updated:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]