]> granicus.if.org Git - transmission/commitdiff
(trunk gtk) removed the unused MC_NAME column from the torrent GtkListStore.
authorJordan Lee <jordan@transmissionbt.com>
Tue, 5 Apr 2011 17:00:38 +0000 (17:00 +0000)
committerJordan Lee <jordan@transmissionbt.com>
Tue, 5 Apr 2011 17:00:38 +0000 (17:00 +0000)
gtk/tr-core.c
gtk/tr-core.h

index 0674ee28cc5b0d9d046be635446b7c540ad68a44..1d6aadaf48f739d3bb3a4dda7db0c6286a2aceca 100644 (file)
@@ -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 );
index 41c5830022e279d533839f47d50e8a4a2d4067cf..69f6ae89807691df8a89b33b46de46ea04457411 100644 (file)
@@ -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,