summaryrefslogtreecommitdiff
path: root/tests/testselection.c
diff options
context:
space:
mode:
authorMatthias Clasen <matthiasc@src.gnome.org>2002-03-04 22:19:47 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2002-03-04 22:19:47 +0000
commit0b46f4ab61b937b6880d847f41a718d18b399d37 (patch)
tree8782a4fffca51033c7eeb33f5bbff60540810bf1 /tests/testselection.c
parent5b374044c165f4b4e65bb40772a53d28c4e4a1f1 (diff)
downloadgtk+-0b46f4ab61b937b6880d847f41a718d18b399d37.tar.gz
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.
Diffstat (limited to 'tests/testselection.c')
-rw-r--r--tests/testselection.c4
1 files changed, 2 insertions, 2 deletions
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;
}