Add a special size for drag-and-drop GTK_ICON_SIZE_DND (Default to 32x32)

Sun Jun 24 21:34:32 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkenums.h gtk/gtkiconfactory.c: Add a special size for
	drag-and-drop GTK_ICON_SIZE_DND (Default to 32x32)

	* gtk/gtkdnd.c (gtk_drag_dest_set_target_list): Fix problem
	with un'reffing wrong list reported by Jeff Franks.

	* gtk/gtkdnd.[ch] (_gtk_drag_{source,}dest_handle_event): _prefix.

	* gtk/gtkdnd.c (gtk_drag_set_icon_default): Use GTK_STOCK_DND
	for the default icon. Remove inline XPM.

	* gtk/gtkstock.h gtk/gtkiconfactory.c:
	Add GTK_STOCK_DND GTK_STOCK_DND_MULTIPLE (Currently, stock_new
	is used for GTK_STOCK_DND, but it is a bit too small.)

	* gtk/stock-icons/stock_dnd_multiple.png
	gtk/stock-icons/Makefile.am: New stock icon moved from gnome-libs.

	* gtk/gtkdnd.c (gtk_drag_source_event_cb): Only return
	TRUE when starting a drag. In other cases, we are
	just observing. (#52995)

	* gtk/gtkdnd.[ch] (gtk_drag_set_icon_{stock,pixbuf}): Add
	function to set the icon for a drag from a GdkPixbuf
	or stock ID.

	* gtk/gtkdnd.[ch] (gtk_drag_source_set_icon_{stock,pixbuf}):
	Likewise, for drag sources.

	* gtk/gtkdnd.h: Deprecate gtk_drag_set_default_icon.
	(Now should be done using the stock system.)
This commit is contained in:
Owen Taylor
2001-06-25 01:51:58 +00:00
committed by Owen Taylor
parent 24a325c67a
commit 1988e13749
22 changed files with 657 additions and 255 deletions

View File

@ -3545,9 +3545,6 @@ gtk_drag_check_threshold
gtk_drag_source_set
gtk_drag_source_set_icon
gtk_drag_source_unset
<SUBSECTION Internals>
gtk_drag_source_handle_event
gtk_drag_dest_handle_event
</SECTION>

View File

@ -1394,6 +1394,22 @@ This function is not usually used by users.
@tree_column:
@titles:
<!-- ##### FUNCTION gtk_drag_dest_handle_event ##### -->
<para>
Internal function.
</para>
@toplevel:
@event:
<!-- ##### FUNCTION gtk_drag_source_handle_event ##### -->
<para>
Internal function.
</para>
@widget:
@event:
<!-- ##### FUNCTION gtk_editable_changed ##### -->
<para>
Causes the "changed" signal to be emitted.
@ -1942,6 +1958,15 @@ Creates a border around the arrows of a #GtkSpinButton. The type of border is de
@first:
@second:
<!-- ##### FUNCTION gtk_text_view_set_text_window_size ##### -->
<para>
</para>
@text_view:
@width:
@height:
<!-- ##### FUNCTION gtk_trace_referencing ##### -->
<para>
Private: print debugging information while doing a gtk_object_ref() or

View File

@ -265,56 +265,43 @@ gtk_drag_source_set() is used.
<!-- ##### FUNCTION gtk_drag_set_icon_widget ##### -->
<para>
Change the icon for a widget to a given widget. GTK+
will not destroy the icon, so if you don't want
it to persist, you should connect to the "drag_end"
signal and destroy it yourself.
</para>
@context: the context for a drag. (This must be called
with a context for the source side of a drag)
@widget: A toplevel window to use as an icon.
@hot_x: The X offset within @widget of the hotspot.
@hot_y: The Y offset within @widget of the hotspot.
@context:
@widget:
@hot_x:
@hot_y:
<!-- ##### FUNCTION gtk_drag_set_icon_pixmap ##### -->
<para>
Sets a given pixmap as the icon for a given drag.
GTK+ retains a reference count for the arguments, and
will release them when they are no longer needed.
</para>
@context: the context for a drag. (This must be called
with a context for the source side of a drag)
@colormap: the colormap of the icon
@pixmap: the image data for the icon
@mask: the transparency mask for an image.
@hot_x: The X offset within @widget of the hotspot.
@hot_y: The Y offset within @widget of the hotspot.
@context:
@colormap:
@pixmap:
@mask:
@hot_x:
@hot_y:
<!-- ##### FUNCTION gtk_drag_set_icon_default ##### -->
<para>
Set the icon for a particular drag to the default
icon.
</para>
@context: the context for a drag. (This must be called
with a context for the source side of a drag)
@context:
<!-- ##### FUNCTION gtk_drag_set_default_icon ##### -->
<para>
Change the default drag icon. GTK+ retains a reference count for the
arguments, and will release them when they are no longer needed.
</para>
@colormap: the colormap of the icon
@pixmap: the image data for the icon
@mask: the transparency mask for an image.
@hot_x: The X offset within @widget of the hotspot.
@hot_y: The Y offset within @widget of the hotspot.
@colormap:
@pixmap:
@mask:
@hot_x:
@hot_y:
<!-- ##### FUNCTION gtk_drag_check_threshold ##### -->
@ -347,16 +334,12 @@ widget. The widget must have a window.
<!-- ##### FUNCTION gtk_drag_source_set_icon ##### -->
<para>
Sets the icon that will be used for drags from a
particular widget. GTK+ retains a reference count
for the arguments, and will release them when
they are no longer needed.
</para>
@widget: a #GtkWidget
@colormap: the colormap of the icon
@pixmap: the image data for the icon
@mask: the transparency mask for an image.
@widget:
@colormap:
@pixmap:
@mask:
<!-- ##### FUNCTION gtk_drag_source_unset ##### -->
@ -367,21 +350,3 @@ Undo the effects of gtk_drag_source_set().
@widget: a #GtkWidget
<!-- ##### FUNCTION gtk_drag_source_handle_event ##### -->
<para>
Internal function.
</para>
@widget:
@event:
<!-- ##### FUNCTION gtk_drag_dest_handle_event ##### -->
<para>
Internal function.
</para>
@toplevel:
@event:

View File

@ -62,6 +62,7 @@ looking up the icon to use for a given stock ID.
@GTK_ICON_SIZE_SMALL_TOOLBAR:
@GTK_ICON_SIZE_LARGE_TOOLBAR:
@GTK_ICON_SIZE_BUTTON:
@GTK_ICON_SIZE_DND:
@GTK_ICON_SIZE_DIALOG:
<!-- ##### FUNCTION gtk_icon_source_copy ##### -->

View File

@ -242,16 +242,6 @@ types related to the text widget and how they work together.
@size:
<!-- ##### FUNCTION gtk_text_view_set_text_window_size ##### -->
<para>
</para>
@text_view:
@width:
@height:
<!-- ##### FUNCTION gtk_text_view_forward_display_line ##### -->
<para>