]> spindle.queued.net Git - midori/commitdiff
Decrement n after clearing individual transfer items
authorPeter de Ridder <peter@xfce.org>
Sat, 7 Aug 2010 13:20:09 +0000 (15:20 +0200)
committerChristian Dywan <christian@twotoasts.de>
Sat, 7 Aug 2010 13:20:09 +0000 (15:20 +0200)
panels/midori-transfers.c

index 8292010e910ee5f26ea601b993e93fa3b9aad166..d8ccaf1c0936414442ae6cd04d5b6489ec105df2 100644 (file)
@@ -112,7 +112,10 @@ midori_transfers_button_clear_clicked_cb (GtkToolItem*    toolitem,
         status = webkit_download_get_status (download);
         if (status == WEBKIT_DOWNLOAD_STATUS_FINISHED
             || status == WEBKIT_DOWNLOAD_STATUS_CANCELLED)
+        {
             gtk_list_store_remove (GTK_LIST_STORE (model), &iter);
+            n--; /* Decrement n since we just removed it */
+        }
         g_object_unref (download);
         #endif
     }