diff options
author | Owen Taylor <otaylor@redhat.com> | 2001-06-25 01:51:58 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2001-06-25 01:51:58 +0000 |
commit | 1988e13749e613b4b378be1a6cb4bad7f17bebb0 (patch) | |
tree | 0f5775f3f599586a2885149f73c9ec43797bb77a /gtk/gtkiconfactory.c | |
parent | 24a325c67a12ad928180e96aad8483837e26125f (diff) | |
download | gtk+-1988e13749e613b4b378be1a6cb4bad7f17bebb0.tar.gz |
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.)
Diffstat (limited to 'gtk/gtkiconfactory.c')
-rw-r--r-- | gtk/gtkiconfactory.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gtk/gtkiconfactory.c b/gtk/gtkiconfactory.c index 697281f753..ae80f3180b 100644 --- a/gtk/gtkiconfactory.c +++ b/gtk/gtkiconfactory.c @@ -461,6 +461,10 @@ get_default_icons (GtkIconFactory *factory) add_sized (factory, dialog_question, GTK_ICON_SIZE_DIALOG, GTK_STOCK_DIALOG_QUESTION); add_sized (factory, dialog_warning, GTK_ICON_SIZE_DIALOG, GTK_STOCK_DIALOG_WARNING); + /* dnd size only */ + add_sized (factory, stock_new, GTK_ICON_SIZE_DND, GTK_STOCK_DND); + add_sized (factory, stock_dnd_multiple, GTK_ICON_SIZE_DND, GTK_STOCK_DND_MULTIPLE); + /* Only have button sizes */ add_sized (factory, stock_button_apply, GTK_ICON_SIZE_BUTTON, GTK_STOCK_APPLY); add_sized (factory, stock_button_cancel, GTK_ICON_SIZE_BUTTON, GTK_STOCK_CANCEL); @@ -585,7 +589,7 @@ init_icon_sizes (void) { if (icon_sizes == NULL) { -#define NUM_BUILTIN_SIZES 6 +#define NUM_BUILTIN_SIZES 7 gint i; icon_aliases = g_hash_table_new (g_str_hash, g_str_equal); @@ -625,6 +629,11 @@ init_icon_sizes (void) icon_sizes[GTK_ICON_SIZE_LARGE_TOOLBAR].width = 24; icon_sizes[GTK_ICON_SIZE_LARGE_TOOLBAR].height = 24; + icon_sizes[GTK_ICON_SIZE_DND].size = GTK_ICON_SIZE_DND; + icon_sizes[GTK_ICON_SIZE_DND].name = "gtk-dnd"; + icon_sizes[GTK_ICON_SIZE_DND].width = 32; + icon_sizes[GTK_ICON_SIZE_DND].height = 32; + icon_sizes[GTK_ICON_SIZE_DIALOG].size = GTK_ICON_SIZE_DIALOG; icon_sizes[GTK_ICON_SIZE_DIALOG].name = "gtk-dialog"; icon_sizes[GTK_ICON_SIZE_DIALOG].width = 48; |