]> Pileus Git - ~andy/gtk/blobdiff - gtk/testselection.c
Add a 'text' argument to set the initial text.
[~andy/gtk] / gtk / testselection.c
index e88d44347ca2408d11fa4264752af66ce220be43..a13fb5ad442107d06ea0013670f3a2188be920dc 100644 (file)
  * Boston, MA 02111-1307, USA.
  */
 
+/*
+ * Modified by the GTK+ Team and others 1997-1999.  See the AUTHORS
+ * file for a list of people on the GTK+ Team.  See the ChangeLog
+ * files for a list of changes.  These files are distributed with
+ * GTK+ at ftp://ftp.gtk.org/pub/gtk/. 
+ */
+
 #include <stdio.h>
 #include <string.h>
 #include "gtk.h"
@@ -136,7 +143,7 @@ selection_toggled (GtkWidget *widget)
                                                GDK_SELECTION_PRIMARY,
                                                GDK_CURRENT_TIME);
       if (!have_selection)
-       gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON(widget), FALSE);
+       gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(widget), FALSE);
     }
   else
     {
@@ -188,7 +195,7 @@ gint
 selection_clear (GtkWidget *widget, GdkEventSelection *event)
 {
   have_selection = FALSE;
-  gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON(widget), FALSE);
+  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(widget), FALSE);
 
   return TRUE;
 }
@@ -384,9 +391,9 @@ main (int argc, char *argv[])
   GtkWidget *hbox;
 
   static GtkTargetEntry targetlist[] = {
-    { "STRING", STRING },
-    { "TEXT",   TEXT },
-    { "COMPOUND_TEXT", COMPOUND_TEXT }
+    { "STRING",        0, STRING },
+    { "TEXT",          0, TEXT },
+    { "COMPOUND_TEXT", 0, COMPOUND_TEXT }
   };
   static gint ntargets = sizeof(targetlist) / sizeof(targetlist[0]);