From 213c5160914768a5961f76182b701cd08b131cfe Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Thu, 18 Feb 1999 16:43:42 +0000 Subject: [PATCH] Fix glib_config_args gtk_config_args confusion. (pointed out by Roland Thu Feb 18 11:46:57 1999 Owen Taylor * gtk.m4: Fix glib_config_args gtk_config_args confusion. (pointed out by Roland Dreier ) * gtk/gtksocket.c gtk/gtkmain.c gtk/gtkdebug.h (gtk_socket_filter_func): Move the plug-socket debugging code to a new "plugsocket" debug keys from the previous hardcoded DPRINTF. --- ChangeLog | 11 +++++++++++ ChangeLog.pre-2-0 | 11 +++++++++++ ChangeLog.pre-2-10 | 11 +++++++++++ ChangeLog.pre-2-2 | 11 +++++++++++ ChangeLog.pre-2-4 | 11 +++++++++++ ChangeLog.pre-2-6 | 11 +++++++++++ ChangeLog.pre-2-8 | 11 +++++++++++ gtk.m4 | 2 +- gtk/gtkdebug.h | 9 +++++---- gtk/gtkmain.c | 3 ++- gtk/gtksocket.c | 44 ++++++++++++++++++++------------------------ 11 files changed, 105 insertions(+), 30 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6521168728..42964313bd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +Thu Feb 18 11:46:57 1999 Owen Taylor + + * gtk.m4: Fix glib_config_args gtk_config_args + confusion. (pointed out by + Roland Dreier ) + + * gtk/gtksocket.c gtk/gtkmain.c gtk/gtkdebug.h + (gtk_socket_filter_func): Move the plug-socket + debugging code to a new "plugsocket" debug keys + from the previous hardcoded DPRINTF. + Thu Feb 18 00:54:46 1999 Tim Janik * gtk/gtkclist.c: added widget arg ::titles_active. diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 6521168728..42964313bd 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,14 @@ +Thu Feb 18 11:46:57 1999 Owen Taylor + + * gtk.m4: Fix glib_config_args gtk_config_args + confusion. (pointed out by + Roland Dreier ) + + * gtk/gtksocket.c gtk/gtkmain.c gtk/gtkdebug.h + (gtk_socket_filter_func): Move the plug-socket + debugging code to a new "plugsocket" debug keys + from the previous hardcoded DPRINTF. + Thu Feb 18 00:54:46 1999 Tim Janik * gtk/gtkclist.c: added widget arg ::titles_active. diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 6521168728..42964313bd 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,14 @@ +Thu Feb 18 11:46:57 1999 Owen Taylor + + * gtk.m4: Fix glib_config_args gtk_config_args + confusion. (pointed out by + Roland Dreier ) + + * gtk/gtksocket.c gtk/gtkmain.c gtk/gtkdebug.h + (gtk_socket_filter_func): Move the plug-socket + debugging code to a new "plugsocket" debug keys + from the previous hardcoded DPRINTF. + Thu Feb 18 00:54:46 1999 Tim Janik * gtk/gtkclist.c: added widget arg ::titles_active. diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 6521168728..42964313bd 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,14 @@ +Thu Feb 18 11:46:57 1999 Owen Taylor + + * gtk.m4: Fix glib_config_args gtk_config_args + confusion. (pointed out by + Roland Dreier ) + + * gtk/gtksocket.c gtk/gtkmain.c gtk/gtkdebug.h + (gtk_socket_filter_func): Move the plug-socket + debugging code to a new "plugsocket" debug keys + from the previous hardcoded DPRINTF. + Thu Feb 18 00:54:46 1999 Tim Janik * gtk/gtkclist.c: added widget arg ::titles_active. diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 6521168728..42964313bd 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,14 @@ +Thu Feb 18 11:46:57 1999 Owen Taylor + + * gtk.m4: Fix glib_config_args gtk_config_args + confusion. (pointed out by + Roland Dreier ) + + * gtk/gtksocket.c gtk/gtkmain.c gtk/gtkdebug.h + (gtk_socket_filter_func): Move the plug-socket + debugging code to a new "plugsocket" debug keys + from the previous hardcoded DPRINTF. + Thu Feb 18 00:54:46 1999 Tim Janik * gtk/gtkclist.c: added widget arg ::titles_active. diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 6521168728..42964313bd 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,14 @@ +Thu Feb 18 11:46:57 1999 Owen Taylor + + * gtk.m4: Fix glib_config_args gtk_config_args + confusion. (pointed out by + Roland Dreier ) + + * gtk/gtksocket.c gtk/gtkmain.c gtk/gtkdebug.h + (gtk_socket_filter_func): Move the plug-socket + debugging code to a new "plugsocket" debug keys + from the previous hardcoded DPRINTF. + Thu Feb 18 00:54:46 1999 Tim Janik * gtk/gtkclist.c: added widget arg ::titles_active. diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 6521168728..42964313bd 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,14 @@ +Thu Feb 18 11:46:57 1999 Owen Taylor + + * gtk.m4: Fix glib_config_args gtk_config_args + confusion. (pointed out by + Roland Dreier ) + + * gtk/gtksocket.c gtk/gtkmain.c gtk/gtkdebug.h + (gtk_socket_filter_func): Move the plug-socket + debugging code to a new "plugsocket" debug keys + from the previous hardcoded DPRINTF. + Thu Feb 18 00:54:46 1999 Tim Janik * gtk/gtkclist.c: added widget arg ::titles_active. diff --git a/gtk.m4 b/gtk.m4 index 9f6b766e12..b8cf4024af 100644 --- a/gtk.m4 +++ b/gtk.m4 @@ -19,7 +19,7 @@ AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run do case "$module" in gthread) - glib_config_args="$glib_config_args gthread" + gtk_config_args="$gtk_config_args gthread" ;; esac done diff --git a/gtk/gtkdebug.h b/gtk/gtkdebug.h index d85ebfef06..44e27676ee 100644 --- a/gtk/gtkdebug.h +++ b/gtk/gtkdebug.h @@ -24,10 +24,11 @@ extern "C" { #endif /* __cplusplus */ typedef enum { - GTK_DEBUG_OBJECTS = 1 << 0, - GTK_DEBUG_MISC = 1 << 1, - GTK_DEBUG_SIGNALS = 1 << 2, - GTK_DEBUG_DND = 1 << 3 + GTK_DEBUG_OBJECTS = 1 << 0, + GTK_DEBUG_MISC = 1 << 1, + GTK_DEBUG_SIGNALS = 1 << 2, + GTK_DEBUG_DND = 1 << 3, + GTK_DEBUG_PLUGSOCKET = 1 << 4 } GtkDebugFlag; #ifdef G_ENABLE_DEBUG diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c index 62f337fa6e..a2417a9981 100644 --- a/gtk/gtkmain.c +++ b/gtk/gtkmain.c @@ -137,7 +137,8 @@ static const GDebugKey gtk_debug_keys[] = { {"objects", GTK_DEBUG_OBJECTS}, {"misc", GTK_DEBUG_MISC}, {"signals", GTK_DEBUG_SIGNALS}, - {"dnd", GTK_DEBUG_DND} + {"dnd", GTK_DEBUG_DND}, + {"plugsocket", GTK_DEBUG_PLUGSOCKET} }; static const guint gtk_ndebug_keys = sizeof (gtk_debug_keys) / sizeof (GDebugKey); diff --git a/gtk/gtksocket.c b/gtk/gtksocket.c index c673f617e8..11fb450252 100644 --- a/gtk/gtksocket.c +++ b/gtk/gtksocket.c @@ -47,14 +47,6 @@ static GdkFilterReturn gtk_socket_filter_func (GdkXEvent *gdk_xevent, GdkEvent *event, gpointer data); -#define DEBUG_PLUGSOCKET - -#ifdef DEBUG_PLUGSOCKET -#define DPRINTF(arg) g_print arg -#else -#define DPRINTF(arg) -#endif - /* From Tk */ #define EMBEDDED_APP_WANTS_FOCUS NotifyNormal+20 @@ -320,16 +312,18 @@ gtk_socket_size_allocate (GtkWidget *widget, (allocation->height == socket->current_height)) { gtk_socket_send_configure_event (socket); - DPRINTF(( "No change: %d %d\n", - allocation->width, allocation->height)); + GTK_NOTE(PLUGSOCKET, + g_message ("GtkSocket - allocated no change: %d %d", + allocation->width, allocation->height)); } else { gdk_window_move_resize (socket->plug_window, 0, 0, allocation->width, allocation->height); - DPRINTF(("configuring: %d %d\n", - allocation->width, allocation->height)); + GTK_NOTE(PLUGSOCKET, + g_message ("GtkSocket - allocated: %d %d", + allocation->width, allocation->height)); socket->current_width = allocation->width; socket->current_height = allocation->height; } @@ -351,8 +345,6 @@ gtk_socket_focus_in_event (GtkWidget *widget, GdkEventFocus *event) g_return_val_if_fail (GTK_IS_SOCKET (widget), FALSE); socket = GTK_SOCKET (widget); - DPRINTF (( "Got focus\n")); - if (socket->focus_in && socket->plug_window) XSetInputFocus (GDK_DISPLAY (), GDK_WINDOW_XWINDOW (socket->plug_window), @@ -565,10 +557,11 @@ gtk_socket_filter_func (GdkXEvent *gdk_xevent, GdkEvent *event, gpointer data) socket->request_width = xcwe->width; socket->request_height = xcwe->height; socket->have_size = TRUE; - - DPRINTF(("Window created with size: %d %d\n", - socket->request_width, - socket->request_height)); + + GTK_NOTE(PLUGSOCKET, + g_message ("GtkSocket - window created with size: %d %d", + socket->request_width, + socket->request_height)); gtk_widget_queue_resize (widget); } @@ -593,9 +586,10 @@ gtk_socket_filter_func (GdkXEvent *gdk_xevent, GdkEvent *event, gpointer data) socket->request_height = xcre->height; socket->have_size = TRUE; - DPRINTF(("Configure request: %d %d\n", - socket->request_width, - socket->request_height)); + GTK_NOTE(PLUGSOCKET, + g_message ("GtkSocket - configure request: %d %d", + socket->request_width, + socket->request_height)); gtk_widget_queue_resize (widget); } @@ -618,8 +612,9 @@ gtk_socket_filter_func (GdkXEvent *gdk_xevent, GdkEvent *event, gpointer data) (xdwe->window == GDK_WINDOW_XWINDOW (socket->plug_window))) { GtkWidget *toplevel; - - DPRINTF(("Destroy Notify\n")); + + GTK_NOTE(PLUGSOCKET, + g_message ("GtkSocket - destroy notify")); toplevel = gtk_widget_get_toplevel (GTK_WIDGET (socket)); if (toplevel && GTK_IS_WINDOW (toplevel)) @@ -665,7 +660,8 @@ gtk_socket_filter_func (GdkXEvent *gdk_xevent, GdkEvent *event, gpointer data) if (xevent->xmaprequest.window == GDK_WINDOW_XWINDOW (socket->plug_window)) { - DPRINTF(("Map Request\n")); + GTK_NOTE(PLUGSOCKET, + g_message ("GtkSocket - Map Request")); gdk_window_show (socket->plug_window);