From 0b46f4ab61b937b6880d847f41a718d18b399d37 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 4 Mar 2002 22:19:47 +0000 Subject: Make color selection and selection examples work. * docs/tutorial/gtk-tut.sgml: Make color selection and selection examples work. * tests/testselection.c (selection_toggled, selection_clear): Use selection_widget as selection owner - otherwise clearing the selection doesn't work. --- tests/testselection.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/testselection.c') diff --git a/tests/testselection.c b/tests/testselection.c index 3f3d6830cc..303075235e 100644 --- a/tests/testselection.c +++ b/tests/testselection.c @@ -141,7 +141,7 @@ selection_toggled (GtkWidget *widget) { if (GTK_TOGGLE_BUTTON(widget)->active) { - have_selection = gtk_selection_owner_set (widget, + have_selection = gtk_selection_owner_set (selection_widget, GDK_SELECTION_PRIMARY, GDK_CURRENT_TIME); if (!have_selection) @@ -197,7 +197,7 @@ gint selection_clear (GtkWidget *widget, GdkEventSelection *event) { have_selection = FALSE; - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(widget), FALSE); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(selection_button), FALSE); return TRUE; } -- cgit v1.2.1