]> Pileus Git - ~andy/gtk/commitdiff
initialize gtk_selection_atoms only once at the 1st call. set length of
authorHidetoshi Tajima <tajima@src.gnome.org>
Wed, 14 Aug 2002 15:11:41 +0000 (15:11 +0000)
committerHidetoshi Tajima <tajima@src.gnome.org>
Wed, 14 Aug 2002 15:11:41 +0000 (15:11 +0000)
* gtk/gtkselection.c (gtk_selection_init): initialize
gtk_selection_atoms only once at the 1st call.
* gdk/x11/gdkselection-x11.c (gdk_selection_property_get):
set length of selection data from number of read bytes (#90595)

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gdk/x11/gdkselection-x11.c
gtk/gtkselection.c

index 4ca3e9dd847e7ab4f4bbe6f9405dd278478b0ae9..60e1c2d36a80e1512e328a1622185fd53c4581b1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Wed Aug 14 08:07:53 2002  HideToshi Tajima  <hidetoshi.tajima@sun.com>
+
+       * gtk/gtkselection.c (gtk_selection_init): initialize
+       gtk_selection_atoms only once at the 1st call.
+       * gdk/x11/gdkselection-x11.c (gdk_selection_property_get): 
+       set length of selection data from number of read bytes (#90595)
+
 2002-08-14 Padraig O'Briain <padraig.obriain@sun.com>
 
        * gtk/gtktextview.c (gtk_text_view_focus): Move focus to
index 4ca3e9dd847e7ab4f4bbe6f9405dd278478b0ae9..60e1c2d36a80e1512e328a1622185fd53c4581b1 100644 (file)
@@ -1,3 +1,10 @@
+Wed Aug 14 08:07:53 2002  HideToshi Tajima  <hidetoshi.tajima@sun.com>
+
+       * gtk/gtkselection.c (gtk_selection_init): initialize
+       gtk_selection_atoms only once at the 1st call.
+       * gdk/x11/gdkselection-x11.c (gdk_selection_property_get): 
+       set length of selection data from number of read bytes (#90595)
+
 2002-08-14 Padraig O'Briain <padraig.obriain@sun.com>
 
        * gtk/gtktextview.c (gtk_text_view_focus): Move focus to
index 4ca3e9dd847e7ab4f4bbe6f9405dd278478b0ae9..60e1c2d36a80e1512e328a1622185fd53c4581b1 100644 (file)
@@ -1,3 +1,10 @@
+Wed Aug 14 08:07:53 2002  HideToshi Tajima  <hidetoshi.tajima@sun.com>
+
+       * gtk/gtkselection.c (gtk_selection_init): initialize
+       gtk_selection_atoms only once at the 1st call.
+       * gdk/x11/gdkselection-x11.c (gdk_selection_property_get): 
+       set length of selection data from number of read bytes (#90595)
+
 2002-08-14 Padraig O'Briain <padraig.obriain@sun.com>
 
        * gtk/gtktextview.c (gtk_text_view_focus): Move focus to
index 4ca3e9dd847e7ab4f4bbe6f9405dd278478b0ae9..60e1c2d36a80e1512e328a1622185fd53c4581b1 100644 (file)
@@ -1,3 +1,10 @@
+Wed Aug 14 08:07:53 2002  HideToshi Tajima  <hidetoshi.tajima@sun.com>
+
+       * gtk/gtkselection.c (gtk_selection_init): initialize
+       gtk_selection_atoms only once at the 1st call.
+       * gdk/x11/gdkselection-x11.c (gdk_selection_property_get): 
+       set length of selection data from number of read bytes (#90595)
+
 2002-08-14 Padraig O'Briain <padraig.obriain@sun.com>
 
        * gtk/gtktextview.c (gtk_text_view_focus): Move focus to
index 4ca3e9dd847e7ab4f4bbe6f9405dd278478b0ae9..60e1c2d36a80e1512e328a1622185fd53c4581b1 100644 (file)
@@ -1,3 +1,10 @@
+Wed Aug 14 08:07:53 2002  HideToshi Tajima  <hidetoshi.tajima@sun.com>
+
+       * gtk/gtkselection.c (gtk_selection_init): initialize
+       gtk_selection_atoms only once at the 1st call.
+       * gdk/x11/gdkselection-x11.c (gdk_selection_property_get): 
+       set length of selection data from number of read bytes (#90595)
+
 2002-08-14 Padraig O'Briain <padraig.obriain@sun.com>
 
        * gtk/gtktextview.c (gtk_text_view_focus): Move focus to
index 4ca3e9dd847e7ab4f4bbe6f9405dd278478b0ae9..60e1c2d36a80e1512e328a1622185fd53c4581b1 100644 (file)
@@ -1,3 +1,10 @@
+Wed Aug 14 08:07:53 2002  HideToshi Tajima  <hidetoshi.tajima@sun.com>
+
+       * gtk/gtkselection.c (gtk_selection_init): initialize
+       gtk_selection_atoms only once at the 1st call.
+       * gdk/x11/gdkselection-x11.c (gdk_selection_property_get): 
+       set length of selection data from number of read bytes (#90595)
+
 2002-08-14 Padraig O'Briain <padraig.obriain@sun.com>
 
        * gtk/gtktextview.c (gtk_text_view_focus): Move focus to
index 5dafa8b818aabe9fc518e70240d01e4afa4a57ec..6c66d77a88e3ad2147d8e110250334557ccd8a7f 100644 (file)
@@ -297,8 +297,8 @@ gdk_selection_property_get (GdkWindow  *requestor,
        *ret_format = prop_format;
       
       /* Add on an extra byte to handle null termination.  X guarantees
-        that t will be 1 longer than nbytes and null terminated */
-      length = nbytes + 1;
+        that t will be 1 longer than nitems and null terminated */
+      length = nitems + 1;
 
       if (data)
        {
index b7abd47d058457c3a0e23276c8ae71b8742f2085..f12e36d718698ea5bd0ea6ae0bf77c5e2891c2ac 100644 (file)
@@ -1004,6 +1004,8 @@ gtk_selection_init (void)
   gtk_selection_atoms[MULTIPLE] = gdk_atom_intern ("MULTIPLE", FALSE);
   gtk_selection_atoms[TIMESTAMP] = gdk_atom_intern ("TIMESTAMP", FALSE);
   gtk_selection_atoms[TARGETS] = gdk_atom_intern ("TARGETS", FALSE);
+
+  initialize = FALSE;
 }
 
 /*************************************************************