EditFilterDialog improvements

Ralf Engels ralf-engels at gmx.de
Sun Sep 19 13:25:17 CEST 2010


> Message: 1
> Date: Sat, 18 Sep 2010 20:35:21 +0200
> From: Daniel Faust <hessijames at gmail.com>
> Subject: EditFilterDialog improvements
> To: amarok-devel at kde.org
> Message-ID: <201009182035.22338.hessijames at gmail.com>
> Content-Type: Text/Plain;  charset="us-ascii"
> 
> Hi,
> 
> some time ago I filed a bug report regarding the behaviour of the ratings 
> filter in the collection browser: https://bugs.kde.org/show_bug.cgi?id=238736
> And I saw you already discussed that under the topic "How to get rating 
> (stars) input from users?"
> 
> Now I also added KRatingWidgets to the EditFilterDialog and checked for 
> further inconsistencies but found none (nighter in the Dynamic Playlist nor in 
> the APG, they already handle it correctly).
> 

Hi Daniel,

It's a little bit unlucky that I have seen your mail a couple of hours
too late.

Yesterday I commited a patch that I had laying around for quite some
time. I just waited until the trunk was open again because it had a
couple of text-related changes.

The main part of the patch is a MetaQueryWidget that allows you to
select a thing that is called filter by the Dynamic Playlist and the
QueryMaker.

This MetaQueryWidget uses the rating widget for selecting ratings,
displays icons for the values and also handles creating the textual
representation of the filter which is used by the collection filter.
Also I added a new "older than" condition for dates.

The same widget is also used by the Dynamic playlist, so there shouldn't
be any inconsistencies any longer.

> I also added suffixes to the spin boxes, this should be most useful when 
> filtering by file size or length (letting the user know the unit Amarok is 
> using).
> 

I don't have suffixes yet, but that sounds like a good idea.

> Furthermore I had a look at the "Between" mode (filtering between two values). 
> Using it together with the invert check box caused the query to return an 
> empty result. I added an "OR" and made the min and max values keep their 
> values (don't increase/decrease because of the greater/lower sign).
> But maybe disabling the invert check box in "Between" mode would be ok too.
> 

Actually inverting a between means that you don't want to have results
laying in the specified range.

Between 1 and 2 should result in val>=1 AND val<=2
(but as we don't have a >= we need to return val>0 AND val < 3)

The inverted is val<1 AND val>2

(I hope that I got everything right in my patch.)

> The last problem I found is the handling of dates. Dates are converted to a 
> days difference thereby increasing when going backwards in time. I find that 
> unintuitive, the words "less than" and "greater than" don't suite neither.
> The APG editor implements that nicely. The Dynamic Playlist uses the same 
> words as the EditFilterDialog only that it handles the "less than" and 
> "greater than" in the opposite way.

Yes. It's a little bit strange.
I added an "older than" which is really needed for the Dynamic Playlist.
As of now I am quite satisfied with the solution.

> 
> So please tell me what you think of my changes on the one hand and what you 
> think is the best behavoir for the dates filter on the other hand.
> 

While merging the changes yesterday I haven't noticed anything big, so I
am wondering if you have already commited your changes and I just
overlooked them.

> Personally I would like to make it as it is in the APG everywhere.
> 

Also I haven't looked at the APG at all but now that I have, I think that it really could use the MetaQueryWidget too :)

> 
> Greetings
> Daniel Faust
> 

Greetings
Ralf



More information about the Amarok-devel mailing list