summaryrefslogtreecommitdiff
path: root/thunar/thunar-icon-factory.c
diff options
context:
space:
mode:
authorBenedikt Meurer <benny@xfce.org>2005-08-09 22:15:34 +0000
committerBenedikt Meurer <benny@xfce.org>2005-08-09 22:15:34 +0000
commitf4fffd76cece6e52320d4562ffc2028b568e217d (patch)
tree6dee963be3b64b6a178e4519f16f8825ed719b45 /thunar/thunar-icon-factory.c
parenta056880c7c48c464ddc292c45ab990d9507ebc47 (diff)
downloadthunar-f4fffd76cece6e52320d4562ffc2028b568e217d.tar.gz
2005-08-10 Benedikt Meurer <benny@xfce.org>
* thunar-vfs/thunar-vfs-mime-info.{c,h}: Add support methods required for hashing. * thunar-vfs/Makefile.am, thunar-vfs/thunar-vfs-mime-application.{c,h}, thunar-vfs/thunar-vfs-mime-database.{c,h}: Add initial MIME application support to the MIME database. * thunar/thunar-launcher.{c,h}: Add ThunarLauncher class, which provides actions to launch files using appropriate MIME applications. The ThunarLauncher class will also be used by the desktop view. * thunar/thunar-open-with-action.{c,h}: Add special action class ThunarOpenWithAction, which provides a GtkAction implementation, that - when used as menu - displays a submenu with all available MIME applications for a given file. * thunar/thunar-window-ui.xml: Add a placeholder to include the launcher support in the "File" menu on the main menu bar. * thunar/thunar-standard-view.c, thunar/thunar-standard-view-ui.xml, thunar/thunar-icon-view.c, thunar/thunar-details-view.c: Add file launcher support based on the new ThunarLauncher class. * thunar/thunar-file.{c,h}: Add methods to handle lists of ThunarFile items easily. * thunar/thunar-icon-factory.c(thunar_icon_factory_load_icon): Handle the case of passing a NULL or empty name properly. (Old svn revision: 16816)
Diffstat (limited to 'thunar/thunar-icon-factory.c')
-rw-r--r--thunar/thunar-icon-factory.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/thunar/thunar-icon-factory.c b/thunar/thunar-icon-factory.c
index cd35b28f..a582e11b 100644
--- a/thunar/thunar-icon-factory.c
+++ b/thunar/thunar-icon-factory.c
@@ -633,8 +633,17 @@ thunar_icon_factory_load_icon (ThunarIconFactory *factory,
*/
if (G_UNLIKELY (name == NULL || *name == '\0'))
{
- g_object_ref (G_OBJECT (factory->fallback_icon->pixbuf));
- return factory->fallback_icon->pixbuf;
+ if (G_LIKELY (wants_default))
+ {
+ if (size == 48)
+ return g_object_ref (G_OBJECT (factory->fallback_icon->pixbuf));
+ else
+ return exo_gdk_pixbuf_scale_ratio (factory->fallback_icon->pixbuf, size);
+ }
+ else
+ {
+ return NULL;
+ }
}
/* lookup the icon */