(trunk gtk) #2453: Transmission since version 1.61 need GTK+ 2.12 or an upper version.

This commit is contained in:
Charles Kerr 2009-09-27 17:47:45 +00:00
parent 129fa7b97b
commit b63a9fb17c
1 changed files with 10 additions and 4 deletions

View File

@ -9,12 +9,18 @@
#include "icons.h"
#ifdef HAVE_GIO
#if GTK_CHECK_VERSION( 2, 12, 0 )
#define USE_GIO_ICONS
#endif
#endif
#ifdef USE_GIO_ICONS
#include <gio/gio.h>
#endif
#define VOID_PIXBUF_KEY "void-pixbuf"
#ifdef HAVE_GIO
#ifdef USE_GIO_ICONS
static const char *
get_static_string( const char *s )
{
@ -90,7 +96,7 @@ icon_cache_new (GtkWidget * for_widget,
return icon_cache;
}
#ifdef HAVE_GIO
#ifdef USE_GIO_ICONS
static const char *
_icon_cache_get_icon_key( GIcon * icon )
{
@ -215,7 +221,7 @@ icon_cache_get_mime_type_icon( IconCache * icon_cache,
return pixbuf;
}
#else /* HAVE_GIO */
#else /* USE_GIO_ICONS */
static GdkPixbuf *
icon_cache_get_mime_type_icon( IconCache * icon_cache,
@ -275,7 +281,7 @@ get_mime_type_icon( const char * mime_type,
const char *
get_mime_type_from_filename( const char * file G_GNUC_UNUSED )
{
#ifdef HAVE_GIO
#ifdef USE_GIO_ICONS
char * tmp = g_content_type_guess( file, NULL, 0, NULL );
const char * ret = get_static_string( tmp );
g_free( tmp );