Changeset 8004


Ignore:
Timestamp:
Mar 3, 2009, 7:43:23 PM (13 years ago)
Author:
charles
Message:

(trunk gtk) more hacking around with the gtk icons

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gtk/torrent-cell-renderer.c

    r8003 r8004  
    286286    const tr_info * info = tr_torrentInfo( tor );
    287287
    288     /* a very basic cache, but hits about 80% of the time... */
    289     static GdkPixbuf   * prev_icon = NULL;
    290     static GtkWidget   * prev_widget = NULL;
    291     static const char  * prev_mime_type = NULL;
    292     static GtkIconSize   prev_size = 0;
    293 
    294288    if( info->fileCount > 1 )
    295289        mime_type = DIRECTORY_MIME_TYPE;
     
    297291        mime_type = get_mime_type_from_filename( info->files[0].name );
    298292
    299     if( ( for_widget == prev_widget ) && ( prev_size == icon_size ) && !strcmp( prev_mime_type, mime_type ) )
    300         return prev_icon;
    301 
    302     prev_mime_type = mime_type;
    303     prev_size = icon_size;
    304     prev_widget = for_widget;
    305     prev_icon = get_mime_type_icon( mime_type, icon_size, for_widget );
    306     return prev_icon;
     293    return get_mime_type_icon( mime_type, icon_size, for_widget );
    307294}
    308295
Note: See TracChangeset for help on using the changeset viewer.