diff options
author | Jasmine Hassan <[email protected]> | 2012-10-18 21:31:20 +0200 |
---|---|---|
committer | Jasmine Hassan <[email protected]> | 2012-11-14 12:28:48 +0200 |
commit | 1a056cc77b431b2a013c052c78c0309ee52bc32b (patch) | |
tree | 24d94ae0f80e4ffd653b26bfc9d114f47059c182 /libcaja-private/caja-icon-info.c | |
parent | 4799c0deb39be1abc4fadc693e73cd44aa7c4d36 (diff) | |
download | caja-1a056cc77b431b2a013c052c78c0309ee52bc32b.tar.bz2 caja-1a056cc77b431b2a013c052c78c0309ee52bc32b.tar.xz |
[icon-info] add caja_icon_theme_can_render()
http://git.gnome.org/browse/nautilus/commit/?id=110a0e8f2b9ec96b34e4b76390e3f78adc9cda30
Diffstat (limited to 'libcaja-private/caja-icon-info.c')
-rw-r--r-- | libcaja-private/caja-icon-info.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/libcaja-private/caja-icon-info.c b/libcaja-private/caja-icon-info.c index e504a557..7873ebfa 100644 --- a/libcaja-private/caja-icon-info.c +++ b/libcaja-private/caja-icon-info.c @@ -1,3 +1,4 @@ +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ /* caja-icon-info.c * Copyright (C) 2007 Red Hat, Inc., Alexander Larsson <[email protected]> * @@ -757,3 +758,23 @@ caja_icon_get_emblem_size_for_icon_size (guint size) return 0; /* no emblems for smaller sizes */ } + +gboolean +caja_icon_theme_can_render (GThemedIcon *icon) +{ + GtkIconTheme *icon_theme; + const gchar * const *names; + gint idx; + + names = g_themed_icon_get_names (icon); + + icon_theme = gtk_icon_theme_get_default (); + + for (idx = 0; names[idx] != NULL; idx++) { + if (gtk_icon_theme_has_icon (icon_theme, names[idx])) { + return TRUE; + } + } + + return FALSE; +} |