diff --git a/gtk/tr-core.c b/gtk/tr-core.c index 0674ee28c..1d6aadaf4 100644 --- a/gtk/tr-core.c +++ b/gtk/tr-core.c @@ -224,8 +224,7 @@ core_init( GTypeInstance * instance, gpointer g_class UNUSED ) /* column types for the model used to store torrent information */ /* keep this in sync with the enum near the bottom of tr_core.h */ - GType types[] = { G_TYPE_STRING, /* name */ - G_TYPE_STRING, /* collated name */ + GType types[] = { G_TYPE_STRING, /* collated name */ G_TYPE_POINTER, /* tr_torrent* */ G_TYPE_INT, /* torrent id */ G_TYPE_DOUBLE, /* tr_stat.pieceUploadSpeed_KBps */ @@ -1006,13 +1005,11 @@ gtr_core_add_torrent( TrCore * core, tr_torrent * tor, gboolean do_notify ) { GtkTreeIter unused; const tr_stat * st = tr_torrentStat( tor ); - const char * name = tr_torrentName( tor ); char * collated = get_collated_name( tor ); const unsigned int trackers_hash = build_torrent_trackers_hash( tor ); GtkListStore * store = GTK_LIST_STORE( core_raw_model( core ) ); gtk_list_store_insert_with_values( store, &unused, 0, - MC_NAME, name, MC_NAME_COLLATED, collated, MC_TORRENT, tor, MC_TORRENT_ID, tr_torrentId( tor ), @@ -1027,7 +1024,7 @@ gtr_core_add_torrent( TrCore * core, tr_torrent * tor, gboolean do_notify ) -1 ); if( do_notify ) - gtr_notify_torrent_added( name ); + gtr_notify_torrent_added( tr_torrentName( tor ) ); tr_torrentSetMetadataCallback( tor, on_torrent_metadata_changed, core ); tr_torrentSetCompletenessCallback( tor, on_torrent_completeness_changed, core ); diff --git a/gtk/tr-core.h b/gtk/tr-core.h index 41c583002..69f6ae898 100644 --- a/gtk/tr-core.h +++ b/gtk/tr-core.h @@ -183,7 +183,6 @@ void gtr_core_open_folder( TrCore * core, int torrent_id ); /* keep this in sync with the type array in tr_core_init() in tr_core.c */ enum { - MC_NAME, MC_NAME_COLLATED, MC_TORRENT, MC_TORRENT_ID,