Opened 8 years ago

Last modified 6 years ago

#5649 new Bug

Inconvenient filters

Reported by: JoelSjogren Owned by: jordan
Priority: Normal Milestone: None Set
Component: GTK+ Client Version: 2.51
Severity: Normal Keywords:
Cc:

Description

In transmission, I can choose to filter which downloads to show: All, Active, Downloading, Seeding, Paused, Finished, Verifying or Error. There are clearly many filters, but none fits my needs. I want a filter that shows Unfinished: Downloading and some of Verifying, Paused and Error.

That's really all I care about: which files are available to me on my hard drive now (implemented as Finished), and which are not (please implement).

Change History (5)

comment:1 Changed 8 years ago by mike.dld

Instead of another filter, may an option to negate any of current filters suffice?

comment:2 Changed 8 years ago by JoelSjogren

I don't think so. Had my initial understanding of Finished been right, it would suffice to negate that filter, but the meaning of Finished is not "files which are available to me on my hard drive now". A better term may be Incomplete as in Preferences->Downloading->Incomplete.

comment:3 Changed 8 years ago by JoelSjogren

I downloaded the source yesterday and it turned out to be simple to add the filter that I wanted. Here's a diff that I made:

joel@joel-desktop:~/Desktop/transmission/trunk/gtk$ svn diff
Index: filter.c
===================================================================
--- filter.c	(revision 14319)
+++ filter.c	(working copy)
@@ -470,6 +470,7 @@
   ACTIVITY_FILTER_FINISHED,
   ACTIVITY_FILTER_VERIFYING,
   ACTIVITY_FILTER_ERROR,
+  ACTIVITY_FILTER_INCOMPLETE,
   ACTIVITY_FILTER_SEPARATOR
 };
 
@@ -523,6 +524,9 @@
 
       case ACTIVITY_FILTER_ERROR:
         return st->error != 0;
+      
+      case ACTIVITY_FILTER_INCOMPLETE:
+        return st->percentDone != 1;
 
       default: /* ACTIVITY_FILTER_ALL */
         return TRUE;
@@ -593,7 +597,8 @@
     { ACTIVITY_FILTER_PAUSED, NULL, N_("Paused"), GTK_STOCK_MEDIA_PAUSE },
     { ACTIVITY_FILTER_FINISHED, NULL, N_("Finished"), NULL },
     { ACTIVITY_FILTER_VERIFYING, "Verb", NC_("Verb", "Verifying"), GTK_STOCK_REFRESH },
-    { ACTIVITY_FILTER_ERROR, NULL, N_("Error"), GTK_STOCK_DIALOG_ERROR }
+    { ACTIVITY_FILTER_ERROR, NULL, N_("Error"), GTK_STOCK_DIALOG_ERROR },
+    { ACTIVITY_FILTER_INCOMPLETE, NULL, N_("Incomplete"), NULL }
   };
 
   GtkListStore * store = gtk_list_store_new (ACTIVITY_FILTER_N_COLS,
joel@joel-desktop:~/Desktop/transmission/trunk/gtk$

Try it!

However I think that maybe the list of possible filters it getting too long. Including mine, there are eight filters. Because of the functionality this filter provides, I think it is worth adding, but think about the future: There will come a point when the filter list is so long that we don't want to append to it anymore. What will we do then to get new filters?

The user should be able to combine existing filters. As mike.dld hinted at, we may want the possibility to negate filters. All it would take would be one button, and we would double the functionality of the filters.

Another option would be to let the more technical users add new filters without having to recompile. They could enter a string analogous to the one I added in test_torrent_activity to make one. However, I suspect it will be difficult and/or time-consuming to interpret the string, make variables such as tr_stat::percentDone available and create a sensible dialog to present to the user.

comment:4 Changed 6 years ago by papelhigienico

Please include the "Incomplete" filter.

comment:5 Changed 6 years ago by papelhigienico

Tested here, the "Incomplete" filter patch works fine!

Note: See TracTickets for help on using tickets.