Version: 1.4-SVN (using KDE 3.5.5, compiled sources) Compiler: gcc version 3.4.6 OS: Linux (i686) release 2.6.19.1 Sometimes I need to look for music title according their duration. It could be fine to select files to put in the playlist according their duration
You can search for them: just enter length:>300 to find all songs longer than 5 minutes. Or create a smart playlist using this criterion.
Ok. So what do yo think to add a tooltip that points you on this feature? If you want I can add it and than commit it to the trunk if needed. Giovanni
Where should this tooltip be added? Some time ago it was suggested to place an icon depicting a filter right to the filter line edit, which would help building filters. If you could do something like this, that would be great!
shameless plug ;) - in case you decide to work on this, maybe information at http://amarok.kde.org/wiki/Keyword_Filtering helps a bit.
Thanks. It seems simple, like a Junior Job. I can try it :) Thanks. Giovanni
I'm working on this issue. When I finished I have to send a patch right? And if you like it I can commit it directly. Do I have I to send the patch here?
I'm happy to hear that you are working on this task! And yes, posting the patch here is probably the best to do.
Here there is my work on this bug. I think to fix some other part of the code because I think more tests is needed, I need to add ToolTips and WhatsThis... but what do you think? Could be ok? Suggestions? Created an attachment (id=19123) amarok-collection-filter-editing.patch
Reopening, because of patch
This patch seems to improve the discoverability of Amarok's advanced search features quite a lot. Please commit, so that we can work out the remaining bits!
SVN commit 620553 by gianni: With this commit I made visible an interesting function in Amarok that was implemented but quite "hidden". Now you can filter the collection titles with a dialog that help you choosing the wanted parameters for the filter, for example now look for a title in your collection that has length of 3 minutes is quite simple. BUG:139292 M +2 -1 Makefile.am M +13 -0 collectionbrowser.cpp M +1 -0 collectionbrowser.h A editcollectionfilterdialog.cpp [License: no copyright] A editcollectionfilterdialog.h [License: no copyright] M +1 -0 main.cpp --- trunk/extragear/multimedia/amarok/src/Makefile.am #620552:620553 @@ -146,7 +146,8 @@ tracktooltip.cpp \ transferdialog.cpp \ xmlloader.cpp \ - xspfplaylist.cpp + xspfplaylist.cpp \ + editcollectionfilterdialog.cpp libamarok_la_LIBADD = \ $(top_builddir)/amarok/src/amarokcore/libamarokcore.la \ --- trunk/extragear/multimedia/amarok/src/collectionbrowser.cpp #620552:620553 @@ -29,6 +29,7 @@ #include "tagdialog.h" #include "threadweaver.h" #include "qstringx.h" +#include "editcollectionfilterdialog.h" #include <taglib/tfile.h> //TagLib::File::isWritable @@ -64,6 +65,7 @@ #include <ktoolbarbutton.h> //ctor #include <kurldrag.h> //dragObject() #include <kio/job.h> +#include <kpushbutton.h> extern "C" { @@ -101,13 +103,16 @@ button = new KToolBarButton( "locationbar_erase", 0, searchToolBar ); m_searchEdit = new ClickLineEdit( i18n( "Enter search terms here" ), searchToolBar ); m_searchEdit->installEventFilter( this ); + KPushButton *filterButton = new KPushButton("...", searchToolBar, "filter"); searchToolBar->setStretchableWidget( m_searchEdit ); m_searchEdit->setFrame( QFrame::Sunken ); connect( button, SIGNAL( clicked() ), SLOT( slotClearFilter() ) ); + connect( filterButton, SIGNAL( clicked() ), SLOT( slotEditFilter() ) ); QToolTip::add( button, i18n( "Clear search field" ) ); QToolTip::add( m_searchEdit, i18n( "Enter space-separated terms to search in the collection" ) ); + QToolTip::add( filterButton, i18n( "Click here to setup the collection filter" ) ); } //</Search LineEdit> @@ -277,6 +282,14 @@ } void +CollectionBrowser::slotEditFilter() //SLOT +{ + EditCollectionFilterDialog *cod = new EditCollectionFilterDialog( this, m_searchEdit->text() ); + if (cod->exec()) + m_searchEdit->setText(cod->filter()); +} + +void CollectionBrowser::setupDirs() //SLOT { m_view->setupDirs(); --- trunk/extragear/multimedia/amarok/src/collectionbrowser.h #620552:620553 @@ -75,6 +75,7 @@ void slotClearFilter(); void slotSetFilterTimeout(); void slotSetFilter(); + void slotEditFilter(); private: void layoutToolbar(); --- trunk/extragear/multimedia/amarok/src/main.cpp #620552:620553 @@ -72,6 +72,7 @@ aboutData.addCredit( "Derek Nelson", I18N_NOOP( "graphics, splash-screen" ), "admrla@gmail.com" ); aboutData.addCredit( "Enrico Ros", I18N_NOOP( "Analyzers, Context Browser and systray eye-candy" ), "eros.kde@email.it" ); aboutData.addCredit( "Gérard Dürrmeyer", I18N_NOOP( "icons and image work" ), "gerard@randomtree.com" ); + aboutData.addCredit( "Giovanni Venturi", I18N_NOOP( "dialog to filter the collection titles" ), "giovanni@ksniffer.org" ); aboutData.addCredit( "Greg Meyer", I18N_NOOP( "Live CD, Bug squashing (oggb4mp3)" ), "greg@gkmweb.com" ); aboutData.addCredit( "Harald Sitter", I18N_NOOP( "handbook enhancements, translations, bug fixes, screenshots, roKymoter (apachelogger)" ), "harald.sitter@kdemail.net" ); aboutData.addCredit( "Jarkko Lehti", I18N_NOOP( "Tester, IRC channel operator, whipping" ), "grue@iki.fi" );