]> granicus.if.org Git - transmission/commitdiff
(trunk gtk) #2500 "Torrent details window should be single-instance per torrent"...
authorCharles Kerr <charles@transmissionbt.com>
Mon, 14 Dec 2009 18:20:11 +0000 (18:20 +0000)
committerCharles Kerr <charles@transmissionbt.com>
Mon, 14 Dec 2009 18:20:11 +0000 (18:20 +0000)
gtk/main.c

index 8294361969c1f91d413479a7f41dd2e0372044f1..f50a396023c6eeb0f99ee39680d70ebf1050c32b 100644 (file)
@@ -781,18 +781,9 @@ onSessionClosed( gpointer gdata )
     struct cbdata * cbdata = gdata;
 
     /* shutdown the gui */
-    if( cbdata->details != NULL )
-    {
-        GSList * l;
-        for( l=cbdata->details; l!=NULL; l=l->next )
-        {
-            struct DetailsDialogHandle * h = l->data;
-            gtk_widget_destroy( h->dialog );
-            g_free( h->key );
-            g_free( h );
-        }
-        g_slist_free( cbdata->details );
-        cbdata->details = NULL;
+    while( cbdata->details != NULL ) {
+        struct DetailsDialogHandle * h = cbdata->details->data;
+        gtk_widget_destroy( h->dialog );
     }
 
     if( cbdata->prefs )