diff options
author | Owen Taylor <otaylor@redhat.com> | 2001-10-22 04:34:42 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2001-10-22 04:34:42 +0000 |
commit | 46dde8042854304a12db1e687df00300d517d9e6 (patch) | |
tree | d8d950524745bcdd4e4fcb87ecfc66e16cd370c7 /tests | |
parent | 724a552c7d00889bcc64127e8921cd11d3eb6ec4 (diff) | |
download | gtk+-46dde8042854304a12db1e687df00300d517d9e6.tar.gz |
Fix problem with g_return_if_fail return value.
Sun Oct 21 23:27:00 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_translate_coordinates): Fix
problem with g_return_if_fail return value.
* gdk/x11/gdkproperty-x11.c docs/Changes-2.0.txt: Move over the
virtual atom code from the gdk-multihead branch, removing the per-display
part. Virtualizing atoms needs to be done now to prevent compat
breakage in direct Xlib accessing code in the future. (#62208)
* gdk/x11/gdkx.h: gdk/gdk/x11/gdkproperty-x11.c: Export
gdk_x11_xatom_to_atom, gdk_x11_atom_to_xatom().
* gdk/gdktypes.h docs/Changes-2.0.txt: Make GdkAtom
an opaque pointer type so the compiler catches attempts
to mingle it with X atoms.
* gdk/x11/{gdkdnd-x11.c,gdkevents-x11.c,gdkglobals-x11.c,
gdkkeys-x11.c, gdkmain-x11.c, gdkprivate-x11.c,
gdkproperty-x11.c, gdkselection-x11.c, gdkwindow-x11.c}
gtk/{gtkclist.c,gtkctree.c,gtkdnd.c,gtkplug.c,gtksocket.c}
tests/testdnd.c,tests/testselection.c:
Fix up for above atom changes.
* gdk/gdkselection.h (GDK_SELECTION_CLIPBOARD): Add, since we
now have the ability to add custom predefines.
* gtk/{gtkentry.c,gtklabel.c,gtkoldeditable.c,gtktextview.c}:
Use GDK_SELECTION_CLIPBOARD instead of GDK_NONE in calls
to gtk_clipboard_get().
* gdk/win32/gdkproperty-win32.c: Add CLIPBOARD, fix up
for GdkAtom => pointer change.
* gdk/linux-fb/gdkproperty-fb.c: Fix handling of predefined
atoms, fix for GdkAtom => pointer change.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/testdnd.c | 4 | ||||
-rw-r--r-- | tests/testselection.c | 10 |
2 files changed, 6 insertions, 8 deletions
diff --git a/tests/testdnd.c b/tests/testdnd.c index be36c4e9d5..cbc1bfb58e 100644 --- a/tests/testdnd.c +++ b/tests/testdnd.c @@ -320,7 +320,7 @@ target_drag_motion (GtkWidget *widget, tmp_list = context->targets; while (tmp_list) { - char *name = gdk_atom_name (GPOINTER_TO_UINT (tmp_list->data)); + char *name = gdk_atom_name (GDK_POINTER_TO_ATOM (tmp_list->data)); g_print ("%s\n", name); g_free (name); @@ -346,7 +346,7 @@ target_drag_drop (GtkWidget *widget, if (context->targets) { gtk_drag_get_data (widget, context, - GPOINTER_TO_INT (context->targets->data), + GDK_POINTER_TO_ATOM (context->targets->data), time); return TRUE; } diff --git a/tests/testselection.c b/tests/testselection.c index 73345435b9..1731fe57c0 100644 --- a/tests/testselection.c +++ b/tests/testselection.c @@ -289,9 +289,8 @@ selection_received (GtkWidget *widget, GtkSelectionData *data) if (seltype == SEL_TYPE_NONE) { char *name = gdk_atom_name (data->type); - g_print("Don't know how to handle type: %s (%ld)\n", - name?name:"<unknown>", - data->type); + g_print("Don't know how to handle type: %s\n", + name?name:"<unknown>"); return; } @@ -335,9 +334,8 @@ selection_received (GtkWidget *widget, GtkSelectionData *data) default: { char *name = gdk_atom_name (data->type); - g_print("Can't convert type %s (%ld) to string\n", - name?name:"<unknown>", - data->type); + g_print("Can't convert type %s to string\n", + name?name:"<unknown>"); position = data->length; continue; } |