Commit 67baa4b4 authored by Elliot Lee's avatar Elliot Lee

Allow GTK_DEBUG=signals - VERY useful ;-)



Allow GTK_DEBUG=signals - VERY useful ;-)
parent 75650b4e
......@@ -25,7 +25,8 @@ extern "C" {
typedef enum {
GTK_DEBUG_OBJECTS = 1<<0,
GTK_DEBUG_MISC = 1<<1
GTK_DEBUG_MISC = 1<<1,
GTK_DEBUG_SIGNALS = 1<<2
} GtkDebugFlag;
#ifdef G_ENABLE_DEBUG
......
......@@ -217,7 +217,8 @@ guint gtk_debug_flags = 0; /* Global GTK debug flag */
#ifdef G_ENABLE_DEBUG
static GDebugKey gtk_debug_keys[] = {
{"objects", GTK_DEBUG_OBJECTS},
{"misc", GTK_DEBUG_MISC}
{"misc", GTK_DEBUG_MISC},
{"signals", GTK_DEBUG_SIGNALS}
};
static const guint gtk_ndebug_keys = sizeof (gtk_debug_keys) / sizeof (GDebugKey);
......
......@@ -1350,6 +1350,10 @@ gtk_signal_real_emit (GtkObject *object,
GtkHandlerInfo info;
guchar **signal_func_offset;
register guint signal_id = signal->signal_id;
if(gtk_debug_flags & GTK_DEBUG_SIGNALS)
g_print("Sending signal %s to object %p (%s)\n",
signal->name, object, gtk_type_name(object->klass->type));
if ((signal->run_type & GTK_RUN_NO_RECURSE) &&
gtk_emission_check (current_emissions, object, signal_id))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment