Changeset 11103


Ignore:
Timestamp:
Aug 3, 2010, 3:16:21 AM (12 years ago)
Author:
charles
Message:

(trunk) #3478 "Display bug when magnet links without display names are added" -- fixed in trunk

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/gtk/tr-core.c

    r11099 r11103  
    363363    gtk_tree_model_get( model, a, MC_NAME_COLLATED, &ca, -1 );
    364364    gtk_tree_model_get( model, b, MC_NAME_COLLATED, &cb, -1 );
    365     ret = strcmp( ca, cb );
     365    ret = gtr_strcmp0( ca, cb );
    366366
    367367    g_free( cb );
     
    894894    const tr_info * inf = tr_torrent_info( gtor );
    895895    const tr_stat * st = tr_torrent_stat( gtor );
    896     tr_torrent *    tor = tr_torrent_handle( gtor );
    897     char *          collated = g_utf8_strdown( inf->name, -1 );
    898     char *          trackers = torrentTrackerString( tor );
     896    tr_torrent * tor = tr_torrent_handle( gtor );
     897    char *  collated = g_utf8_strdown( inf->name ? inf->name : "", -1 );
     898    char *  trackers = torrentTrackerString( tor );
    899899    GtkListStore *  store = GTK_LIST_STORE( tr_core_model( self ) );
    900     GtkTreeIter     unused;
     900    GtkTreeIter  unused;
    901901
    902902    gtk_list_store_insert_with_values( store, &unused, 0,
  • trunk/libtransmission/metainfo.c

    r10963 r11103  
    439439
    440440            /* maybe get the display name */
     441         
    441442            if( tr_bencDictFindStr( d, "display-name", &str ) ) {
    442443                tr_free( inf->name );
    443444                inf->name = tr_strdup( str );
    444445            }
     446
     447            if( !inf->name )
     448                inf->name = tr_strdup( inf->hashString );
    445449        }
    446450        else /* not a magnet link and has no info dict... */
Note: See TracChangeset for help on using the changeset viewer.