]> Pileus Git - ~andy/gtk/commitdiff
Document how to use info with text/image targets.
authorMatthias Clasen <mclasen@redhat.com>
Fri, 22 Oct 2004 17:27:06 +0000 (17:27 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Fri, 22 Oct 2004 17:27:06 +0000 (17:27 +0000)
2004-10-22  Matthias Clasen  <mclasen@redhat.com>

* gtk/gtkdnd.c: Document how to use info with text/image
targets.

* gtk/gtkselection.h:
* gtk/gtkselection.c (gtk_target_list_add_text_targets):
(gtk_target_list_add_image_targets): Add info argument.

* gtk/gtkcalendar.c (gtk_calendar_motion_notify):
* gtk/gtkentry.c (gtk_entry_init):
* gtk/gtktextview.c (gtk_text_view_init): Adjust all callers.

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkcalendar.c
gtk/gtkdnd.c
gtk/gtkentry.c
gtk/gtkselection.c
gtk/gtkselection.h
gtk/gtktextview.c

index 7f0cd76be6ab297db378f73775484e7e67cdb4c3..a8bbe98bbd1f4171d40c4fb4a4aca056acf8feac 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2004-10-22  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkdnd.c: Document how to use info with text/image 
+       targets.
+
+       * gtk/gtkselection.h: 
+       * gtk/gtkselection.c (gtk_target_list_add_text_targets): 
+       (gtk_target_list_add_image_targets): Add info argument.
+       
+       * gtk/gtkcalendar.c (gtk_calendar_motion_notify): 
+       * gtk/gtkentry.c (gtk_entry_init): 
+       * gtk/gtktextview.c (gtk_text_view_init): Adjust all callers.
+
 2004-10-22  Anders Carlsson  <andersca@gnome.org>
 
        * gtk/gtktexttag.c: (gtk_text_tag_get_property):
index 7f0cd76be6ab297db378f73775484e7e67cdb4c3..a8bbe98bbd1f4171d40c4fb4a4aca056acf8feac 100644 (file)
@@ -1,3 +1,16 @@
+2004-10-22  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkdnd.c: Document how to use info with text/image 
+       targets.
+
+       * gtk/gtkselection.h: 
+       * gtk/gtkselection.c (gtk_target_list_add_text_targets): 
+       (gtk_target_list_add_image_targets): Add info argument.
+       
+       * gtk/gtkcalendar.c (gtk_calendar_motion_notify): 
+       * gtk/gtkentry.c (gtk_entry_init): 
+       * gtk/gtktextview.c (gtk_text_view_init): Adjust all callers.
+
 2004-10-22  Anders Carlsson  <andersca@gnome.org>
 
        * gtk/gtktexttag.c: (gtk_text_tag_get_property):
index 7f0cd76be6ab297db378f73775484e7e67cdb4c3..a8bbe98bbd1f4171d40c4fb4a4aca056acf8feac 100644 (file)
@@ -1,3 +1,16 @@
+2004-10-22  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkdnd.c: Document how to use info with text/image 
+       targets.
+
+       * gtk/gtkselection.h: 
+       * gtk/gtkselection.c (gtk_target_list_add_text_targets): 
+       (gtk_target_list_add_image_targets): Add info argument.
+       
+       * gtk/gtkcalendar.c (gtk_calendar_motion_notify): 
+       * gtk/gtkentry.c (gtk_entry_init): 
+       * gtk/gtktextview.c (gtk_text_view_init): Adjust all callers.
+
 2004-10-22  Anders Carlsson  <andersca@gnome.org>
 
        * gtk/gtktexttag.c: (gtk_text_tag_get_property):
index 7f0cd76be6ab297db378f73775484e7e67cdb4c3..a8bbe98bbd1f4171d40c4fb4a4aca056acf8feac 100644 (file)
@@ -1,3 +1,16 @@
+2004-10-22  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkdnd.c: Document how to use info with text/image 
+       targets.
+
+       * gtk/gtkselection.h: 
+       * gtk/gtkselection.c (gtk_target_list_add_text_targets): 
+       (gtk_target_list_add_image_targets): Add info argument.
+       
+       * gtk/gtkcalendar.c (gtk_calendar_motion_notify): 
+       * gtk/gtkentry.c (gtk_entry_init): 
+       * gtk/gtktextview.c (gtk_text_view_init): Adjust all callers.
+
 2004-10-22  Anders Carlsson  <andersca@gnome.org>
 
        * gtk/gtktexttag.c: (gtk_text_tag_get_property):
index d463314df038e03327b8f6f97cb715b84f6aa7f8..4c770c2e7cc2bbd7064968b6fcfb4db1b8c405ba 100644 (file)
@@ -2816,7 +2816,7 @@ gtk_calendar_motion_notify (GtkWidget        *widget,
            {
              GdkDragContext *context;
              GtkTargetList *target_list = gtk_target_list_new (NULL, 0);
-             gtk_target_list_add_text_targets (target_list);
+             gtk_target_list_add_text_targets (target_list, 0);
              context = gtk_drag_begin (widget, target_list, GDK_ACTION_COPY,
                                        1, (GdkEvent *)event);
 
index 60b88ceac02e073cbb3b3b2fbcf3ba22bd5d317c..a2edb049ea51c6aebf6d06abc0ed3a82afafd396 100644 (file)
@@ -1030,7 +1030,10 @@ gtk_drag_dest_set_target_list (GtkWidget      *widget,
  * @widget: a #GtkWidget that's a drag destination
  *
  * Add the text targets supported by #GtkSelection to
- * the target list of the drag destination.  
+ * the target list of the drag destination. The targets
+ * are added with @info = 0. If you need another value, 
+ * use gtk_target_list_add_text_targets() and
+ * gtk_drag_dest_set_target_list().
  * 
  * Since: 2.6
  **/
@@ -1044,7 +1047,7 @@ gtk_drag_dest_add_text_targets (GtkWidget *widget)
     gtk_target_list_ref (target_list);
   else
     target_list = gtk_target_list_new (NULL, 0);
-  gtk_target_list_add_text_targets (target_list);
+  gtk_target_list_add_text_targets (target_list, 0);
   gtk_drag_dest_set_target_list (widget, target_list);
   gtk_target_list_unref (target_list);
 }
@@ -1054,7 +1057,10 @@ gtk_drag_dest_add_text_targets (GtkWidget *widget)
  * @widget: a #GtkWidget that's a drag destination
  *
  * Add the image targets supported by #GtkSelection to
- * the target list of the drag destination.  
+ * the target list of the drag destination. The targets
+ * are added with @info = 0. If you need another value, 
+ * use gtk_target_list_add_image_targets() and
+ * gtk_drag_dest_set_target_list().
  * 
  * Since: 2.6
  **/
@@ -1068,7 +1074,7 @@ gtk_drag_dest_add_image_targets (GtkWidget *widget)
     gtk_target_list_ref (target_list);
   else
     target_list = gtk_target_list_new (NULL, 0);
-  gtk_target_list_add_image_targets (target_list, FALSE);
+  gtk_target_list_add_image_targets (target_list, 0, FALSE);
   gtk_drag_dest_set_target_list (widget, target_list);
   gtk_target_list_unref (target_list);
 }
@@ -2221,7 +2227,10 @@ gtk_drag_source_set_target_list (GtkWidget     *widget,
  * @widget: a #GtkWidget that's is a drag source
  *
  * Add the text targets supported by #GtkSelection to
- * the target list of the drag source.  
+ * the target list of the drag source.  The targets
+ * are added with @info = 0. If you need another value, 
+ * use gtk_target_list_add_text_targets() and
+ * gtk_drag_dest_set_target_list().
  * 
  * Since: 2.6
  **/
@@ -2235,7 +2244,7 @@ gtk_drag_source_add_text_targets (GtkWidget *widget)
     gtk_target_list_ref (target_list);
   else
     target_list = gtk_target_list_new (NULL, 0);
-  gtk_target_list_add_text_targets (target_list);
+  gtk_target_list_add_text_targets (target_list, 0);
   gtk_drag_source_set_target_list (widget, target_list);
   gtk_target_list_unref (target_list);
 }
@@ -2245,7 +2254,10 @@ gtk_drag_source_add_text_targets (GtkWidget *widget)
  * @widget: a #GtkWidget that's is a drag source
  *
  * Add the writable image targets supported by #GtkSelection to
- * the target list of the drag source.  
+ * the target list of the drag source. The targets
+ * are added with @info = 0. If you need another value, 
+ * use gtk_target_list_add_text_targets() and
+ * gtk_drag_dest_set_target_list().
  * 
  * Since: 2.6
  **/
@@ -2259,7 +2271,7 @@ gtk_drag_source_add_image_targets (GtkWidget *widget)
     gtk_target_list_ref (target_list);
   else
     target_list = gtk_target_list_new (NULL, 0);
-  gtk_target_list_add_image_targets (target_list, TRUE);
+  gtk_target_list_add_image_targets (target_list, 0, TRUE);
   gtk_drag_source_set_target_list (widget, target_list);
   gtk_target_list_unref (target_list);
 }
index b586e7a53ca45f4845740d08095a1297df0473f2..aea064ec52a5f8f4823113dbb8d555d7f84e78f3 100644 (file)
@@ -1684,7 +1684,7 @@ gtk_entry_motion_notify (GtkWidget      *widget,
          GtkTargetList *target_list = gtk_target_list_new (NULL, 0);
          guint actions = entry->editable ? GDK_ACTION_COPY | GDK_ACTION_MOVE : GDK_ACTION_COPY;
 
-         gtk_target_list_add_text_targets (target_list);
+         gtk_target_list_add_text_targets (target_list, 0);
 
          context = gtk_drag_begin (widget, target_list, actions,
                          entry->button, (GdkEvent *)event);
index 44f39e3b2b12f6497ce6330220858c6f291c8022..b792a3cf9353c7403da2c2d67816001e28d8c00c 100644 (file)
@@ -270,15 +270,16 @@ init_atoms (void)
 /**
  * gtk_target_list_add_text_targets:
  * @list: a #GtkTargetList
+ * @info: an ID that will be passed back to the application
  * 
  * Adds the text targets supported by #GtkSelection to
- * the target list. The targets are added with both flags
- * and info being zero.
+ * the target list. All targets are added with the same @info.
  * 
  * Since: 2.6
  **/
 void 
-gtk_target_list_add_text_targets (GtkTargetList *list)
+gtk_target_list_add_text_targets (GtkTargetList *list,
+                                 guint          info)
 {
   g_return_if_fail (list != NULL);
   
@@ -286,29 +287,30 @@ gtk_target_list_add_text_targets (GtkTargetList *list)
 
   /* Keep in sync with gtk_selection_data_targets_include_text()
    */
-  gtk_target_list_add (list, utf8_atom, 0, 0);  
-  gtk_target_list_add (list, ctext_atom, 0, 0);  
-  gtk_target_list_add (list, text_atom, 0, 0);  
-  gtk_target_list_add (list, GDK_TARGET_STRING, 0, 0);  
-  gtk_target_list_add (list, text_plain_utf8_atom, 0, 0);  
-  gtk_target_list_add (list, text_plain_locale_atom, 0, 0);  
-  gtk_target_list_add (list, text_plain_atom, 0, 0);  
+  gtk_target_list_add (list, utf8_atom, 0, info);  
+  gtk_target_list_add (list, ctext_atom, 0, info);  
+  gtk_target_list_add (list, text_atom, 0, info);  
+  gtk_target_list_add (list, GDK_TARGET_STRING, 0, info);  
+  gtk_target_list_add (list, text_plain_utf8_atom, 0, info);  
+  gtk_target_list_add (list, text_plain_locale_atom, 0, info);  
+  gtk_target_list_add (list, text_plain_atom, 0, info);  
 }
 
 /**
  * gtk_target_list_add_image_targets:
  * @list: a #GtkTargetList
+ * @info: an ID that will be passed back to the application
  * @writable: whether to add only targets for which GTK+ knows
  *   how to convert a pixbuf into the format
  * 
  * Adds the image targets supported by #GtkSelection to
- * the target list. The targets are added with both flags
- * and info being zero.
+ * the target list. All targets are added with the same @info.
  * 
  * Since: 2.6
  **/
 void 
 gtk_target_list_add_image_targets (GtkTargetList *list,
+                                  guint          info,
                                   gboolean       writable)
 {
   GSList *formats, *f;
@@ -330,7 +332,7 @@ gtk_target_list_add_image_targets (GtkTargetList *list,
       for (m = mimes; *m; m++)
        {
          atom = gdk_atom_intern (*m, FALSE);
-         gtk_target_list_add (list, atom, 0, 0);  
+         gtk_target_list_add (list, atom, 0, info);  
        }
       g_strfreev (mimes);
     }
index 02bbd8a0f09dc8419c4ad1bb5570373b7e240fd2..12c341201d5530bdf33a3087b48bd42175822dc9 100644 (file)
@@ -95,8 +95,10 @@ void           gtk_target_list_add       (GtkTargetList  *list,
                                          GdkAtom         target,
                                          guint           flags,
                                          guint           info);
-void           gtk_target_list_add_text_targets (GtkTargetList  *list);
+void           gtk_target_list_add_text_targets (GtkTargetList  *list,
+                                                guint           info);
 void           gtk_target_list_add_image_targets (GtkTargetList  *list,
+                                                 guint           info,
                                                  gboolean        writable);
 void           gtk_target_list_add_table (GtkTargetList        *list,
                                          const GtkTargetEntry *targets,
index 7e503bd98f39a0f0beb7e2820de74dedd6b86bb0..9efe99d5a5771386719ab918bc15c95bae6756d5 100644 (file)
@@ -5901,7 +5901,7 @@ gtk_text_view_start_selection_dnd (GtkTextView       *text_view,
   
   target_list = gtk_target_list_new (target_table,
                                      G_N_ELEMENTS (target_table));
-  gtk_target_list_add_text_targets (target_list);
+  gtk_target_list_add_text_targets (target_list, 0);
 
   context = gtk_drag_begin (GTK_WIDGET (text_view), target_list,
                             GDK_ACTION_COPY | GDK_ACTION_MOVE,