[the-board] [tb] Add a temporary workaround for g_signal_stop_emission_by_name



commit 56c5f6114538644db04acb35c760b308c34a7c5e
Author: Lucas Rocha <lucasr gnome org>
Date:   Fri Nov 12 22:53:40 2010 +0000

    [tb] Add a temporary workaround for g_signal_stop_emission_by_name
    
    As gjs is not handling gpointer args very well at the moment.

 .gitignore               |    1 +
 src/Makefile-tb.am       |    6 ++++--
 src/tb/tb-gobject-util.c |   13 +++++++++++++
 src/tb/tb-gobject-util.h |    9 +++++++++
 4 files changed, 27 insertions(+), 2 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 40c87d2..819ccea 100644
--- a/.gitignore
+++ b/.gitignore
@@ -82,6 +82,7 @@ src/libtb_1_0_la-tb-box.lo
 src/libtb_1_0_la-tb-enum-types.lo
 src/libtb_1_0_la-tb-file-util.lo
 src/libtb_1_0_la-tb-gdk-util.lo
+src/libtb_1_0_la-tb-gobject-util.lo
 src/stamp-big-enum-types.h
 src/stamp-tb-enum-types.h
 src/tb-enum-types.c
diff --git a/src/Makefile-tb.am b/src/Makefile-tb.am
index 865c590..3a0d5a6 100644
--- a/src/Makefile-tb.am
+++ b/src/Makefile-tb.am
@@ -16,13 +16,15 @@ THE_BOARD_STAMP_FILES = stamp-tb-marshal.h stamp-tb-enum-types.h
 
 tb_source_h = \
     tb/tb-box.h \
+    tb/tb-file-util.h \
     tb/tb-gdk-util.h \
-    tb/tb-file-util.h
+    tb/tb-gobject-util.h
 
 tb_source_c = \
     tb/tb-box.c \
+    tb/tb-file-util.c \
     tb/tb-gdk-util.c \
-    tb/tb-file-util.c
+    tb/tb-gobject-util.c
 
 tb-enum-types.h: stamp-tb-enum-types.h Makefile
 	@true
diff --git a/src/tb/tb-gobject-util.c b/src/tb/tb-gobject-util.c
new file mode 100644
index 0000000..c3d208e
--- /dev/null
+++ b/src/tb/tb-gobject-util.c
@@ -0,0 +1,13 @@
+#include <glib-object.h>
+
+#include "tb/tb-gobject-util.h"
+
+/* This is only necessary because the g_signal_stop_emission_by_name
+ * is not working well in gjs yet */
+
+void
+tb_signal_stop_emission_by_name(GObject     *object,
+                                const gchar *detailed_signal)
+{
+    g_signal_stop_emission_by_name(object, detailed_signal);
+}
diff --git a/src/tb/tb-gobject-util.h b/src/tb/tb-gobject-util.h
new file mode 100644
index 0000000..e67225a
--- /dev/null
+++ b/src/tb/tb-gobject-util.h
@@ -0,0 +1,9 @@
+#ifndef __TB_GOBJECT_UTIL_H__
+#define __TB_GOBJECT_UTIL_H__
+
+#include <glib-object.h>
+
+void tb_signal_stop_emission_by_name (GObject     *object,
+                                      const gchar *detailed_signal);
+
+#endif /* __TB_GOBJECT_UTIL_H__ */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]