diff options
author | Owen Taylor <owt1@cornell.edu> | 1998-03-22 00:07:53 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 1998-03-22 00:07:53 +0000 |
commit | 8cff9d33070545a1b3d5813f0119a91e7257e609 (patch) | |
tree | 4d06363659c188cdfea3eca76dfce7bd5084a419 | |
parent | 995d97b0018ec12aec7d238fa45bb890f90f98a5 (diff) | |
download | gdk-pixbuf-8cff9d33070545a1b3d5813f0119a91e7257e609.tar.gz |
Don't respond to drops when grab is in effect. (workaround)
Sat Mar 21 19:07:01 1998 Owen Taylor <owt1@cornell.edu>
* gtk/testgtk.c (dnd_drop): Don't respond to drops when
grab is in effect. (workaround)
* gdk/gdkfont.c (gdk_fontset_load): More details on
error messages.
* gdk/gdk.c: Translate va_list to XVaNestedList instead
of just casting it.
* gtk/gtkmain.c: Make temporary copy of string returned by
setlocale, since it may be changed by subsequent calls.
-rw-r--r-- | ChangeLog | 14 | ||||
-rw-r--r-- | ChangeLog.pre-2-0 | 14 | ||||
-rw-r--r-- | ChangeLog.pre-2-10 | 14 | ||||
-rw-r--r-- | ChangeLog.pre-2-2 | 14 | ||||
-rw-r--r-- | ChangeLog.pre-2-4 | 14 | ||||
-rw-r--r-- | ChangeLog.pre-2-6 | 14 | ||||
-rw-r--r-- | ChangeLog.pre-2-8 | 14 | ||||
-rw-r--r-- | docs/gtk-config.txt | 2 | ||||
-rw-r--r-- | gdk/gdk.c | 141 | ||||
-rw-r--r-- | gdk/gdkfont.c | 5 | ||||
-rw-r--r-- | gdk/x11/gdkfont-x11.c | 5 | ||||
-rw-r--r-- | gdk/x11/gdkmain-x11.c | 141 | ||||
-rw-r--r-- | gtk/gtkmain.c | 7 | ||||
-rw-r--r-- | gtk/testgtk.c | 14 | ||||
-rw-r--r-- | gtk/testgtkrc | 4 | ||||
-rw-r--r-- | tests/testgtk.c | 14 | ||||
-rw-r--r-- | tests/testgtkrc | 4 |
17 files changed, 384 insertions, 51 deletions
@@ -1,3 +1,17 @@ +Sat Mar 21 19:07:01 1998 Owen Taylor <owt1@cornell.edu> + + * gtk/testgtk.c (dnd_drop): Don't respond to drops when + grab is in effect. (workaround) + + * gdk/gdkfont.c (gdk_fontset_load): More details on + error messages. + + * gdk/gdk.c: Translate va_list to XVaNestedList instead + of just casting it. + + * gtk/gtkmain.c: Make temporary copy of string returned by + setlocale, since it may be changed by subsequent calls. + Sat Mar 21 10:39:02 CET 1998 Paolo Molaro <lupus@debian.org> * gtk/gtkcombo.[ch] "activate" signal can be disabled now diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 9c8e1e87f..3b9f8c026 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,17 @@ +Sat Mar 21 19:07:01 1998 Owen Taylor <owt1@cornell.edu> + + * gtk/testgtk.c (dnd_drop): Don't respond to drops when + grab is in effect. (workaround) + + * gdk/gdkfont.c (gdk_fontset_load): More details on + error messages. + + * gdk/gdk.c: Translate va_list to XVaNestedList instead + of just casting it. + + * gtk/gtkmain.c: Make temporary copy of string returned by + setlocale, since it may be changed by subsequent calls. + Sat Mar 21 10:39:02 CET 1998 Paolo Molaro <lupus@debian.org> * gtk/gtkcombo.[ch] "activate" signal can be disabled now diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 9c8e1e87f..3b9f8c026 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,17 @@ +Sat Mar 21 19:07:01 1998 Owen Taylor <owt1@cornell.edu> + + * gtk/testgtk.c (dnd_drop): Don't respond to drops when + grab is in effect. (workaround) + + * gdk/gdkfont.c (gdk_fontset_load): More details on + error messages. + + * gdk/gdk.c: Translate va_list to XVaNestedList instead + of just casting it. + + * gtk/gtkmain.c: Make temporary copy of string returned by + setlocale, since it may be changed by subsequent calls. + Sat Mar 21 10:39:02 CET 1998 Paolo Molaro <lupus@debian.org> * gtk/gtkcombo.[ch] "activate" signal can be disabled now diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 9c8e1e87f..3b9f8c026 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,17 @@ +Sat Mar 21 19:07:01 1998 Owen Taylor <owt1@cornell.edu> + + * gtk/testgtk.c (dnd_drop): Don't respond to drops when + grab is in effect. (workaround) + + * gdk/gdkfont.c (gdk_fontset_load): More details on + error messages. + + * gdk/gdk.c: Translate va_list to XVaNestedList instead + of just casting it. + + * gtk/gtkmain.c: Make temporary copy of string returned by + setlocale, since it may be changed by subsequent calls. + Sat Mar 21 10:39:02 CET 1998 Paolo Molaro <lupus@debian.org> * gtk/gtkcombo.[ch] "activate" signal can be disabled now diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 9c8e1e87f..3b9f8c026 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,17 @@ +Sat Mar 21 19:07:01 1998 Owen Taylor <owt1@cornell.edu> + + * gtk/testgtk.c (dnd_drop): Don't respond to drops when + grab is in effect. (workaround) + + * gdk/gdkfont.c (gdk_fontset_load): More details on + error messages. + + * gdk/gdk.c: Translate va_list to XVaNestedList instead + of just casting it. + + * gtk/gtkmain.c: Make temporary copy of string returned by + setlocale, since it may be changed by subsequent calls. + Sat Mar 21 10:39:02 CET 1998 Paolo Molaro <lupus@debian.org> * gtk/gtkcombo.[ch] "activate" signal can be disabled now diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 9c8e1e87f..3b9f8c026 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,17 @@ +Sat Mar 21 19:07:01 1998 Owen Taylor <owt1@cornell.edu> + + * gtk/testgtk.c (dnd_drop): Don't respond to drops when + grab is in effect. (workaround) + + * gdk/gdkfont.c (gdk_fontset_load): More details on + error messages. + + * gdk/gdk.c: Translate va_list to XVaNestedList instead + of just casting it. + + * gtk/gtkmain.c: Make temporary copy of string returned by + setlocale, since it may be changed by subsequent calls. + Sat Mar 21 10:39:02 CET 1998 Paolo Molaro <lupus@debian.org> * gtk/gtkcombo.[ch] "activate" signal can be disabled now diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 9c8e1e87f..3b9f8c026 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,17 @@ +Sat Mar 21 19:07:01 1998 Owen Taylor <owt1@cornell.edu> + + * gtk/testgtk.c (dnd_drop): Don't respond to drops when + grab is in effect. (workaround) + + * gdk/gdkfont.c (gdk_fontset_load): More details on + error messages. + + * gdk/gdk.c: Translate va_list to XVaNestedList instead + of just casting it. + + * gtk/gtkmain.c: Make temporary copy of string returned by + setlocale, since it may be changed by subsequent calls. + Sat Mar 21 10:39:02 CET 1998 Paolo Molaro <lupus@debian.org> * gtk/gtkcombo.[ch] "activate" signal can be disabled now diff --git a/docs/gtk-config.txt b/docs/gtk-config.txt index 508969342..4934fbe5d 100644 --- a/docs/gtk-config.txt +++ b/docs/gtk-config.txt @@ -22,7 +22,7 @@ gtk-config can be invoked in one of three forms: Prints out the version of GTK installed gtk-config --cflags - Prints '-I' flags pointing to the installed d + Prints '-I' flags pointing to the installed header files. gtk-config --libs Prints out the linker flags necessary to link a program against GTK @@ -146,12 +146,17 @@ static RETSIGTYPE gdk_signal (int signum); #ifdef USE_XIM +static guint gdk_im_va_count (va_list list); +static XVaNestedList gdk_im_va_to_nested (va_list list, + guint count); + static GdkIM gdk_im_get (void); static gint gdk_im_open (XrmDatabase db, gchar* res_name, gchar* rec_class); static void gdk_im_close (void); static void gdk_ic_cleanup (void); + #endif /* USE_XIM */ /* Private variable declarations @@ -3213,6 +3218,84 @@ gdk_dnd_drag_enter (Window dest) #ifdef USE_XIM +/* The following routines duplicate functionality in Xlib to + * translate from varargs to X's internal opaque XVaNestedList. + * + * If all vendors have stuck close to the reference implementation, + * then we should hopefully be OK. + */ + +/* This needs to match XIMArg as defined in Xlcint.h exactly */ + +typedef struct { + gchar *name; + gpointer value; +} GdkImArg; + +/************************************************************* + * gdk_im_va_count: + * Counts the number of name/value pairs in the vararg list + * + * arguments: + * + * results: + *************************************************************/ + +static guint +gdk_im_va_count (va_list list) +{ + gint count = 0; + gchar *name; + + name = va_arg (list, gchar *); + while (name) + { + count++; + (void)va_arg (list, gpointer); + name = va_arg (list, gchar *); + } + + return count; +} + +/************************************************************* + * gdk_im_va_to_nested: + * Given a varargs list and the result of gdk_im_va_count, + * create a XVaNestedList. + * + * arguments: + * + * results: + *************************************************************/ + +static XVaNestedList +gdk_im_va_to_nested (va_list list, guint count) +{ + GdkImArg *result; + GdkImArg *arg; + + gchar *name; + + if (count == 0) + return NULL; + + result = g_new (GdkImArg, count+1); + arg = result; + + name = va_arg (list, gchar *); + while (name) + { + arg->name = name; + arg->value = va_arg (list, gpointer); + arg++; + name = va_arg (list, gchar *); + } + + arg->name = NULL; + + return (XVaNestedList)result; +} + /* *-------------------------------------------------------------- * gdk_im_begin @@ -3430,9 +3513,9 @@ gdk_ic_new (GdkWindow* client_window, GdkIMStyle style, ...) { va_list list; - void *argsptr; GdkICPrivate *private; - XVaNestedList preedit_attr; + XVaNestedList preedit_attr = NULL; + guint count; g_return_val_if_fail (client_window != NULL, NULL); g_return_val_if_fail (focus_window != NULL, NULL); @@ -3441,10 +3524,13 @@ gdk_ic_new (GdkWindow* client_window, private = g_new (GdkICPrivate, 1); va_start (list, style); - argsptr = va_arg (list, void *); - preedit_attr = (XVaNestedList)&argsptr; + count = gdk_im_va_count (list); va_end (list); + va_start (list, style); + preedit_attr = gdk_im_va_to_nested (list, count); + va_end (list); + private->style = gdk_im_decide_style (style); if (private->style != style) { @@ -3459,6 +3545,9 @@ gdk_ic_new (GdkWindow* client_window, XNFocusWindow, GDK_WINDOW_XWINDOW (focus_window), preedit_attr? XNPreeditAttributes : NULL, preedit_attr, NULL); + + g_free (preedit_attr); + if (!private->xic) { g_free (private); @@ -3502,49 +3591,59 @@ void gdk_ic_set_values (GdkIC ic, ...) { va_list list; - void *argsptr; XVaNestedList args; GdkICPrivate *private; + guint count; g_return_if_fail (ic != NULL); private = (GdkICPrivate *) ic; va_start (list, ic); - argsptr = va_arg (list, void *); - args = (XVaNestedList)&argsptr; + count = gdk_im_va_count (list); + va_end (list); + + va_start (list, ic); + args = gdk_im_va_to_nested (list, count); va_end (list); XSetICValues (private->xic, XNVaNestedList, args, NULL); + + g_free (args); } void gdk_ic_get_values (GdkIC ic, ...) { va_list list; - void *argsptr; XVaNestedList args; GdkICPrivate *private; + guint count; g_return_if_fail (ic != NULL); private = (GdkICPrivate *) ic; va_start (list, ic); - argsptr = va_arg (list, void *); - args = (XVaNestedList)&argsptr; + count = gdk_im_va_count (list); + va_end (list); + + va_start (list, ic); + args = gdk_im_va_to_nested (list, count); va_end (list); XGetICValues (private->xic, XNVaNestedList, args, NULL); + + g_free (args); } void gdk_ic_set_attr (GdkIC ic, const char *target, ...) { va_list list; - void *argsptr; XVaNestedList attr; GdkICPrivate *private; + guint count; g_return_if_fail (ic != NULL); g_return_if_fail (target != NULL); @@ -3552,20 +3651,25 @@ gdk_ic_set_attr (GdkIC ic, const char *target, ...) private = (GdkICPrivate *) ic; va_start (list, target); - argsptr = va_arg (list, void *); - attr = (XVaNestedList)&argsptr; + count = gdk_im_va_count (list); + va_end (list); + + va_start (list, target); + attr = gdk_im_va_to_nested (list, count); va_end (list); XSetICValues (private->xic, target, attr, NULL); + + g_free (attr); } void gdk_ic_get_attr (GdkIC ic, const char *target, ...) { va_list list; - void *argsptr; XVaNestedList attr; GdkICPrivate *private; + guint count; g_return_if_fail (ic != NULL); g_return_if_fail (target != NULL); @@ -3573,11 +3677,16 @@ gdk_ic_get_attr (GdkIC ic, const char *target, ...) private = (GdkICPrivate *) ic; va_start (list, target); - argsptr = va_arg (list, void *); - attr = (XVaNestedList)&argsptr; + count = gdk_im_va_count (list); + va_end (list); + + va_start (list, target); + attr = gdk_im_va_to_nested (list, count); va_end (list); XGetICValues (private->xic, target, attr, NULL); + + g_free (attr); } GdkEventMask diff --git a/gdk/gdkfont.c b/gdk/gdkfont.c index 41299dc5e..c0c19ca2c 100644 --- a/gdk/gdkfont.c +++ b/gdk/gdkfont.c @@ -70,7 +70,10 @@ gdk_fontset_load (gchar *fontset_name) if (missing_charset_count) { - g_print ("Missing charsets in FontSet creation"); + gint i; + g_print ("Missing charsets in FontSet creation\n"); + for (i=0;i<missing_charset_count;i++) + g_print (" %s\n", missing_charset_list[i]); XFreeStringList (missing_charset_list); } diff --git a/gdk/x11/gdkfont-x11.c b/gdk/x11/gdkfont-x11.c index 41299dc5e..c0c19ca2c 100644 --- a/gdk/x11/gdkfont-x11.c +++ b/gdk/x11/gdkfont-x11.c @@ -70,7 +70,10 @@ gdk_fontset_load (gchar *fontset_name) if (missing_charset_count) { - g_print ("Missing charsets in FontSet creation"); + gint i; + g_print ("Missing charsets in FontSet creation\n"); + for (i=0;i<missing_charset_count;i++) + g_print (" %s\n", missing_charset_list[i]); XFreeStringList (missing_charset_list); } diff --git a/gdk/x11/gdkmain-x11.c b/gdk/x11/gdkmain-x11.c index 445b7ce06..936787fa0 100644 --- a/gdk/x11/gdkmain-x11.c +++ b/gdk/x11/gdkmain-x11.c @@ -146,12 +146,17 @@ static RETSIGTYPE gdk_signal (int signum); #ifdef USE_XIM +static guint gdk_im_va_count (va_list list); +static XVaNestedList gdk_im_va_to_nested (va_list list, + guint count); + static GdkIM gdk_im_get (void); static gint gdk_im_open (XrmDatabase db, gchar* res_name, gchar* rec_class); static void gdk_im_close (void); static void gdk_ic_cleanup (void); + #endif /* USE_XIM */ /* Private variable declarations @@ -3213,6 +3218,84 @@ gdk_dnd_drag_enter (Window dest) #ifdef USE_XIM +/* The following routines duplicate functionality in Xlib to + * translate from varargs to X's internal opaque XVaNestedList. + * + * If all vendors have stuck close to the reference implementation, + * then we should hopefully be OK. + */ + +/* This needs to match XIMArg as defined in Xlcint.h exactly */ + +typedef struct { + gchar *name; + gpointer value; +} GdkImArg; + +/************************************************************* + * gdk_im_va_count: + * Counts the number of name/value pairs in the vararg list + * + * arguments: + * + * results: + *************************************************************/ + +static guint +gdk_im_va_count (va_list list) +{ + gint count = 0; + gchar *name; + + name = va_arg (list, gchar *); + while (name) + { + count++; + (void)va_arg (list, gpointer); + name = va_arg (list, gchar *); + } + + return count; +} + +/************************************************************* + * gdk_im_va_to_nested: + * Given a varargs list and the result of gdk_im_va_count, + * create a XVaNestedList. + * + * arguments: + * + * results: + *************************************************************/ + +static XVaNestedList +gdk_im_va_to_nested (va_list list, guint count) +{ + GdkImArg *result; + GdkImArg *arg; + + gchar *name; + + if (count == 0) + return NULL; + + result = g_new (GdkImArg, count+1); + arg = result; + + name = va_arg (list, gchar *); + while (name) + { + arg->name = name; + arg->value = va_arg (list, gpointer); + arg++; + name = va_arg (list, gchar *); + } + + arg->name = NULL; + + return (XVaNestedList)result; +} + /* *-------------------------------------------------------------- * gdk_im_begin @@ -3430,9 +3513,9 @@ gdk_ic_new (GdkWindow* client_window, GdkIMStyle style, ...) { va_list list; - void *argsptr; GdkICPrivate *private; - XVaNestedList preedit_attr; + XVaNestedList preedit_attr = NULL; + guint count; g_return_val_if_fail (client_window != NULL, NULL); g_return_val_if_fail (focus_window != NULL, NULL); @@ -3441,10 +3524,13 @@ gdk_ic_new (GdkWindow* client_window, private = g_new (GdkICPrivate, 1); va_start (list, style); - argsptr = va_arg (list, void *); - preedit_attr = (XVaNestedList)&argsptr; + count = gdk_im_va_count (list); va_end (list); + va_start (list, style); + preedit_attr = gdk_im_va_to_nested (list, count); + va_end (list); + private->style = gdk_im_decide_style (style); if (private->style != style) { @@ -3459,6 +3545,9 @@ gdk_ic_new (GdkWindow* client_window, XNFocusWindow, GDK_WINDOW_XWINDOW (focus_window), preedit_attr? XNPreeditAttributes : NULL, preedit_attr, NULL); + + g_free (preedit_attr); + if (!private->xic) { g_free (private); @@ -3502,49 +3591,59 @@ void gdk_ic_set_values (GdkIC ic, ...) { va_list list; - void *argsptr; XVaNestedList args; GdkICPrivate *private; + guint count; g_return_if_fail (ic != NULL); private = (GdkICPrivate *) ic; va_start (list, ic); - argsptr = va_arg (list, void *); - args = (XVaNestedList)&argsptr; + count = gdk_im_va_count (list); + va_end (list); + + va_start (list, ic); + args = gdk_im_va_to_nested (list, count); va_end (list); XSetICValues (private->xic, XNVaNestedList, args, NULL); + + g_free (args); } void gdk_ic_get_values (GdkIC ic, ...) { va_list list; - void *argsptr; XVaNestedList args; GdkICPrivate *private; + guint count; g_return_if_fail (ic != NULL); private = (GdkICPrivate *) ic; va_start (list, ic); - argsptr = va_arg (list, void *); - args = (XVaNestedList)&argsptr; + count = gdk_im_va_count (list); + va_end (list); + + va_start (list, ic); + args = gdk_im_va_to_nested (list, count); va_end (list); XGetICValues (private->xic, XNVaNestedList, args, NULL); + + g_free (args); } void gdk_ic_set_attr (GdkIC ic, const char *target, ...) { va_list list; - void *argsptr; XVaNestedList attr; GdkICPrivate *private; + guint count; g_return_if_fail (ic != NULL); g_return_if_fail (target != NULL); @@ -3552,20 +3651,25 @@ gdk_ic_set_attr (GdkIC ic, const char *target, ...) private = (GdkICPrivate *) ic; va_start (list, target); - argsptr = va_arg (list, void *); - attr = (XVaNestedList)&argsptr; + count = gdk_im_va_count (list); + va_end (list); + + va_start (list, target); + attr = gdk_im_va_to_nested (list, count); va_end (list); XSetICValues (private->xic, target, attr, NULL); + + g_free (attr); } void gdk_ic_get_attr (GdkIC ic, const char *target, ...) { va_list list; - void *argsptr; XVaNestedList attr; GdkICPrivate *private; + guint count; g_return_if_fail (ic != NULL); g_return_if_fail (target != NULL); @@ -3573,11 +3677,16 @@ gdk_ic_get_attr (GdkIC ic, const char *target, ...) private = (GdkICPrivate *) ic; va_start (list, target); - argsptr = va_arg (list, void *); - attr = (XVaNestedList)&argsptr; + count = gdk_im_va_count (list); + va_end (list); + + va_start (list, target); + attr = gdk_im_va_to_nested (list, count); va_end (list); XGetICValues (private->xic, target, attr, NULL); + + g_free (attr); } GdkEventMask diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c index 1df42ad34..84385a508 100644 --- a/gtk/gtkmain.c +++ b/gtk/gtkmain.c @@ -265,7 +265,7 @@ gtk_init (int *argc, * C locale, or were using X's mb functions. (-DX_LOCALE && locale != C) */ - current_locale = setlocale (LC_CTYPE, NULL); + current_locale = g_strdup(setlocale (LC_CTYPE, NULL)); setlocale (LC_CTYPE, "C"); #ifdef X_LOCALE @@ -278,6 +278,7 @@ gtk_init (int *argc, } setlocale (LC_CTYPE, current_locale); + g_free (current_locale); GTK_NOTE(MISC, g_print("%s multi-byte string functions.\n", gtk_use_mb ? "Using" : "Not using")); @@ -1291,9 +1292,7 @@ gtk_invoke_timeout_function (GtkTimeoutFunction *timeoutf) args[0].name = NULL; args[0].type = GTK_TYPE_BOOL; args[0].d.pointer_data = &ret_val; - ((GtkCallbackMarshal)timeoutf->function) (NULL, - timeoutf->data, - 0, args); + timeoutf->marshal (NULL, timeoutf->data, 0, args); return ret_val; } } diff --git a/gtk/testgtk.c b/gtk/testgtk.c index e01012f1f..1caded069 100644 --- a/gtk/testgtk.c +++ b/gtk/testgtk.c @@ -4197,6 +4197,12 @@ dnd_drop (GtkWidget *button, GdkEvent *event) GtkWidget *vbox, *lbl, *btn; gchar *msg; + /* DND doesn't obey gtk_grab's, so check if we're already displaying + * drop modal dialog first + */ + if (window) + return; + window = gtk_window_new(GTK_WINDOW_DIALOG); gtk_container_border_width (GTK_CONTAINER(window), 10); @@ -4204,7 +4210,7 @@ dnd_drop (GtkWidget *button, GdkEvent *event) GTK_SIGNAL_FUNC(dnd_drop_destroy_popup), &window); gtk_signal_connect (GTK_OBJECT (window), "delete_event", - GTK_SIGNAL_FUNC(dnd_drop_destroy_popup), + GTK_SIGNAL_FUNC(gtk_false), &window); vbox = gtk_vbox_new(FALSE, 5); @@ -4223,9 +4229,9 @@ dnd_drop (GtkWidget *button, GdkEvent *event) /* Provide an obvious way out of this heinousness */ btn = gtk_button_new_with_label("Continue with life in\nspite of this oppression"); - gtk_signal_connect (GTK_OBJECT (btn), "clicked", - GTK_SIGNAL_FUNC(dnd_drop_destroy_popup), - &window); + gtk_signal_connect_object (GTK_OBJECT (btn), "clicked", + GTK_SIGNAL_FUNC(gtk_widget_destroy), + GTK_OBJECT (window)); gtk_widget_show(btn); gtk_box_pack_start_defaults(GTK_BOX(vbox), btn); diff --git a/gtk/testgtkrc b/gtk/testgtkrc index fc4c10048..7ea894aa7 100644 --- a/gtk/testgtkrc +++ b/gtk/testgtkrc @@ -13,8 +13,7 @@ pixmap_path "." style "default" { fontset = "-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-*-*,*" -# base[NORMAL] = { 0.8, 0.8, 1.0 } -# bg_pixmap[NORMAL] = "marble.xpm" +# font = "-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-iso8859-1" } style "window" @@ -51,6 +50,7 @@ style "text" { bg_pixmap[NORMAL] = "marble.xpm" text[NORMAL] = { 1.0, 1.0, 1.0 } + fg[NORMAL] = { 1.0, 1.0, 1.0 } base[NORMAL] = { 0.0, 0.0, 0.0 } } diff --git a/tests/testgtk.c b/tests/testgtk.c index e01012f1f..1caded069 100644 --- a/tests/testgtk.c +++ b/tests/testgtk.c @@ -4197,6 +4197,12 @@ dnd_drop (GtkWidget *button, GdkEvent *event) GtkWidget *vbox, *lbl, *btn; gchar *msg; + /* DND doesn't obey gtk_grab's, so check if we're already displaying + * drop modal dialog first + */ + if (window) + return; + window = gtk_window_new(GTK_WINDOW_DIALOG); gtk_container_border_width (GTK_CONTAINER(window), 10); @@ -4204,7 +4210,7 @@ dnd_drop (GtkWidget *button, GdkEvent *event) GTK_SIGNAL_FUNC(dnd_drop_destroy_popup), &window); gtk_signal_connect (GTK_OBJECT (window), "delete_event", - GTK_SIGNAL_FUNC(dnd_drop_destroy_popup), + GTK_SIGNAL_FUNC(gtk_false), &window); vbox = gtk_vbox_new(FALSE, 5); @@ -4223,9 +4229,9 @@ dnd_drop (GtkWidget *button, GdkEvent *event) /* Provide an obvious way out of this heinousness */ btn = gtk_button_new_with_label("Continue with life in\nspite of this oppression"); - gtk_signal_connect (GTK_OBJECT (btn), "clicked", - GTK_SIGNAL_FUNC(dnd_drop_destroy_popup), - &window); + gtk_signal_connect_object (GTK_OBJECT (btn), "clicked", + GTK_SIGNAL_FUNC(gtk_widget_destroy), + GTK_OBJECT (window)); gtk_widget_show(btn); gtk_box_pack_start_defaults(GTK_BOX(vbox), btn); diff --git a/tests/testgtkrc b/tests/testgtkrc index fc4c10048..7ea894aa7 100644 --- a/tests/testgtkrc +++ b/tests/testgtkrc @@ -13,8 +13,7 @@ pixmap_path "." style "default" { fontset = "-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-*-*,*" -# base[NORMAL] = { 0.8, 0.8, 1.0 } -# bg_pixmap[NORMAL] = "marble.xpm" +# font = "-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-iso8859-1" } style "window" @@ -51,6 +50,7 @@ style "text" { bg_pixmap[NORMAL] = "marble.xpm" text[NORMAL] = { 1.0, 1.0, 1.0 } + fg[NORMAL] = { 1.0, 1.0, 1.0 } base[NORMAL] = { 0.0, 0.0, 0.0 } } |