Revision: 1554
http://geeqie.svn.sourceforge.net/geeqie/?rev=1554&view=rev
Author: nadvornik
Date: 2009-03-17 19:52:56 +0000 (Tue, 17 Mar 2009)
Log Message:
-----------
fixed loading of desktop file icons, gtk seems to expect an icon name without
extension
Modified Paths:
--------------
trunk/src/pixbuf_util.c
Modified: trunk/src/pixbuf_util.c
===================================================================
--- trunk/src/pixbuf_util.c 2009-03-17 19:09:34 UTC (rev 1553)
+++ trunk/src/pixbuf_util.c 2009-03-17 19:52:56 UTC (rev 1554)
@@ -14,6 +14,7 @@
#include "main.h"
#include "pixbuf_util.h"
#include "exif.h"
+#include "ui_fileops.h"
#include "icons/icons_inline.h"
@@ -178,11 +179,30 @@
{
if (error)
{
- DEBUG_1("Couldn't load icon: %s", error->message);
+ DEBUG_1("Couldn't load icon %s: %s", icon,
error->message);
g_error_free(error);
+ error = NULL;
}
- return FALSE;
+
+ if (strchr(icon, '.'))
+ {
+ /* try again without extension */
+ gchar *icon2 = remove_extension_from_path(icon);
+ pixbuf = gtk_icon_theme_load_icon(icon_theme,
+ icon2, /* icon name */
+ 64, /* size */
+ 0, /* flags */
+ &error);
+ if (error)
+ {
+ DEBUG_1("Couldn't load icon %s: %s", icon2,
error->message);
+ g_error_free(error);
+ }
+ g_free(icon2);
+ }
}
+
+ if (!pixbuf) return FALSE;
register_stock_icon(key, pixbuf);
return TRUE;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Geeqie-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geeqie-svn