+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):
+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):
+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):
+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):
{
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);
* @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
**/
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);
}
* @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
**/
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);
}
* @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
**/
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);
}
* @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
**/
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);
}
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);
/**
* 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);
/* 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;
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);
}
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,
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,