diff options
author | Matthias Clasen <mclasen@redhat.com> | 2005-05-25 14:02:21 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2005-05-25 14:02:21 +0000 |
commit | 7b8e0b8bc82595191cb1e5c5312c1e0c2622944f (patch) | |
tree | 8cc4bf62da59700167466240876e3ff46d6ce75d /gtk/gtkselection.c | |
parent | 4834f5e03d5d9ac9bad8b4c50fdcce6b81c59d8d (diff) | |
download | gtk+-7b8e0b8bc82595191cb1e5c5312c1e0c2622944f.tar.gz |
Make sure png comes first, otherwise dnd may use bmp by default, loosing
2005-05-25 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkselection.c (gtk_target_list_add_image_targets):
Make sure png comes first, otherwise dnd may use bmp by
default, loosing transparency.
Diffstat (limited to 'gtk/gtkselection.c')
-rw-r--r-- | gtk/gtkselection.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gtk/gtkselection.c b/gtk/gtkselection.c index 0318e75c29..1c04c3f241 100644 --- a/gtk/gtkselection.c +++ b/gtk/gtkselection.c @@ -362,6 +362,21 @@ gtk_target_list_add_image_targets (GtkTargetList *list, formats = gdk_pixbuf_get_formats (); + /* Make sure png comes first */ + for (f = formats; f; f = f->next) + { + GdkPixbufFormat *fmt = f->data; + + if (strcmp (gdk_pixbuf_format_get_name (fmt), "png") == 0) + { + formats = g_slist_delete_link (formats, f); + formats = g_slist_prepend (formats, fmt); + + break; + } + + } + for (f = formats; f; f = f->next) { GdkPixbufFormat *fmt = f->data; |