Commit 5a7f136a authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann
Browse files

simplified, use the eek wilber icon if the file doesn't exist.

2005-06-18  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimagefile.c (gimp_imagefile_get_new_pixbuf):
	simplified, use the eek wilber icon if the file doesn't exist.
parent 20fabc97
2005-06-18 Sven Neumann <sven@gimp.org>
* app/core/gimpimagefile.c (gimp_imagefile_get_new_pixbuf):
simplified, use the eek wilber icon if the file doesn't exist.
2005-06-18 Sven Neumann <sven@gimp.org> 2005-06-18 Sven Neumann <sven@gimp.org>
* plug-ins/common/gee.c * plug-ins/common/gee.c
......
...@@ -472,33 +472,37 @@ gimp_imagefile_get_new_pixbuf (GimpViewable *viewable, ...@@ -472,33 +472,37 @@ gimp_imagefile_get_new_pixbuf (GimpViewable *viewable,
{ {
GimpImagefile *imagefile = GIMP_IMAGEFILE (viewable); GimpImagefile *imagefile = GIMP_IMAGEFILE (viewable);
GdkPixbuf *pixbuf; GdkPixbuf *pixbuf;
const gchar *stock_id = NULL;
if (! GIMP_OBJECT (imagefile)->name) if (! GIMP_OBJECT (imagefile)->name)
return NULL; return NULL;
pixbuf = gimp_imagefile_load_thumb (imagefile, width, height); pixbuf = gimp_imagefile_load_thumb (imagefile, width, height);
if (pixbuf) switch (imagefile->thumbnail->image_state)
{ {
gimp_viewable_set_stock_id (GIMP_VIEWABLE (imagefile), NULL); case GIMP_THUMB_STATE_REMOTE:
} stock_id = "gtk-network";
else if (imagefile->thumbnail->image_state == GIMP_THUMB_STATE_REMOTE) break;
{
gimp_viewable_set_stock_id (GIMP_VIEWABLE (imagefile), "gtk-network"); case GIMP_THUMB_STATE_FOLDER:
} stock_id = "gtk-open";
else if (imagefile->thumbnail->image_state == GIMP_THUMB_STATE_FOLDER) break;
{
gimp_viewable_set_stock_id (GIMP_VIEWABLE (imagefile), "gtk-open"); case GIMP_THUMB_STATE_SPECIAL:
} stock_id = "gtk-harddisk";
else if (imagefile->thumbnail->image_state == GIMP_THUMB_STATE_SPECIAL) break;
{
gimp_viewable_set_stock_id (GIMP_VIEWABLE (imagefile), "gtk-harddisk"); case GIMP_THUMB_STATE_NOT_FOUND:
} stock_id = "gimp-wilber-eek";
else break;
{
gimp_viewable_set_stock_id (GIMP_VIEWABLE (imagefile), NULL); default:
break;
} }
gimp_viewable_set_stock_id (GIMP_VIEWABLE (imagefile), stock_id);
return pixbuf; return pixbuf;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment