diff --git a/src/library/libraryfilterwidget.cpp b/src/library/libraryfilterwidget.cpp index 255bd05e9..190710425 100644 --- a/src/library/libraryfilterwidget.cpp +++ b/src/library/libraryfilterwidget.cpp @@ -17,6 +17,7 @@ #include "libraryfilterwidget.h" #include "librarymodel.h" +#include "libraryquery.h" #include "groupbydialog.h" #include "ui_libraryfilterwidget.h" #include "ui/iconloader.h" @@ -192,12 +193,11 @@ void LibraryFilterWidget::SetFilterHint(const QString& hint) { filter_->set_hint(hint); } -void LibraryFilterWidget::SetDuplicatesOnly(bool duplicates_only) { - // no filtering in duplicates_only mode +void LibraryFilterWidget::SetQueryMode(QueryOptions::QueryMode query_mode) { filter_->clear(); - filter_->set_enabled(!duplicates_only); + filter_->set_enabled(query_mode == QueryOptions::QueryMode_All); - model_->SetFilterDuplicatesOnly(duplicates_only); + model_->SetFilterQueryMode(query_mode); } void LibraryFilterWidget::SetAgeFilterEnabled(bool enabled) { diff --git a/src/library/libraryfilterwidget.h b/src/library/libraryfilterwidget.h index 465e718db..6606a29aa 100644 --- a/src/library/libraryfilterwidget.h +++ b/src/library/libraryfilterwidget.h @@ -26,6 +26,7 @@ class GroupByDialog; class LineEditInterface; +class QueryOptions; class SettingsDialog; class Ui_LibraryFilterWidget; @@ -52,7 +53,7 @@ class LibraryFilterWidget : public QWidget { void SetLibraryModel(LibraryModel* model); public slots: - void SetDuplicatesOnly(bool duplicates_only); + void SetQueryMode(QueryOptions::QueryMode view); signals: void UpPressed(); diff --git a/src/library/librarymodel.cpp b/src/library/librarymodel.cpp index af2ca6fdf..fd336345e 100644 --- a/src/library/librarymodel.cpp +++ b/src/library/librarymodel.cpp @@ -589,7 +589,7 @@ void LibraryModel::BeginReset() { } // Smart playlists? - if (show_smart_playlists_ && query_options_.filter.isEmpty()) + if (show_smart_playlists_ && query_options_.get_filter().isEmpty()) CreateSmartPlaylists(); } @@ -981,23 +981,17 @@ SongList LibraryModel::GetChildSongs(const QModelIndex &index) const { } void LibraryModel::SetFilterAge(int age) { - query_options_.max_age = age; + query_options_.set_max_age(age); ResetAsync(); } void LibraryModel::SetFilterText(const QString& text) { - // duplicates_only and filter are mutually exclusive - query_options_.filter = text; - query_options_.duplicates_only = false; - + query_options_.set_filter(text); ResetAsync(); } -void LibraryModel::SetFilterDuplicatesOnly(bool duplicates_only) { - // duplicates_only and filter are mutually exclusive - query_options_.duplicates_only = duplicates_only; - query_options_.filter = ""; - +void LibraryModel::SetFilterQueryMode(QueryOptions::QueryMode query_mode) { + query_options_.set_query_mode(query_mode); ResetAsync(); } diff --git a/src/library/librarymodel.h b/src/library/librarymodel.h index 5aacdf62b..02bbfcb58 100644 --- a/src/library/librarymodel.h +++ b/src/library/librarymodel.h @@ -138,7 +138,7 @@ class LibraryModel : public SimpleTreeModel { public slots: void SetFilterAge(int age); void SetFilterText(const QString& text); - void SetFilterDuplicatesOnly(bool duplicates_only); + void SetFilterQueryMode(QueryOptions::QueryMode query_mode); void SetGroupBy(const LibraryModel::Grouping& g); void Init(); diff --git a/src/library/libraryquery.cpp b/src/library/libraryquery.cpp index 3f78ddc8b..94e16b9fe 100644 --- a/src/library/libraryquery.cpp +++ b/src/library/libraryquery.cpp @@ -24,7 +24,7 @@ QueryOptions::QueryOptions() : max_age(-1), - duplicates_only(false) + query_mode(QueryMode_All) { } @@ -33,14 +33,14 @@ LibraryQuery::LibraryQuery(const QueryOptions& options) : join_with_fts_(false), limit_(-1) { - if (!options.filter.isEmpty()) { + if (!options.get_filter().isEmpty()) { // We need to munge the filter text a little bit to get it to work as // expected with sqlite's FTS3: // 1) Append * to all tokens. // 2) Prefix "fts" to column names. // Split on whitespace - QStringList tokens(options.filter.split(QRegExp("\\s+"))); + QStringList tokens(options.get_filter().split(QRegExp("\\s+"))); QString query; foreach (QString token, tokens) { token.remove('('); @@ -57,21 +57,24 @@ LibraryQuery::LibraryQuery(const QueryOptions& options) join_with_fts_ = true; } - if (options.max_age != -1) { - int cutoff = QDateTime::currentDateTime().toTime_t() - options.max_age; + if (options.get_max_age() != -1) { + int cutoff = QDateTime::currentDateTime().toTime_t() - options.get_max_age(); where_clauses_ << "ctime > ?"; bound_values_ << cutoff; } - duplicates_only_ = false; + // TODO: currently you cannot use any QueryMode other than All and fts at the same time. + // joining songs, duplicated_songs and songs_fts all together takes a huge amount of + // time. the query takes about 20 seconds on my machine then. why? + // untagged mode could work with additional filtering but I'm disabling it just to be + // consistent - this way filtering is available only in the All mode. + // remember though that when you fix the Duplicates + FTS cooperation, enable the + // filtering in both Duplicates and Untagged modes. + duplicates_only_ = options.get_query_mode() == QueryOptions::QueryMode_Duplicates; - if(options.duplicates_only) { - // TODO: currently you cannot use the duplicates_only flag and fts at the same time. - // joining songs, duplicated_songs and songs_fts all together takes a huge amount of - // time. the query takes about 20 seconds then. why? - Q_ASSERT(!join_with_fts_); - duplicates_only_ = true; + if (options.get_query_mode() == QueryOptions::QueryMode_Untagged) { + where_clauses_ << "(artist = '' OR album = '' OR title ='')"; } } diff --git a/src/library/libraryquery.h b/src/library/libraryquery.h index 3e9ea2001..e030809a1 100644 --- a/src/library/libraryquery.h +++ b/src/library/libraryquery.h @@ -27,20 +27,46 @@ class Song; class LibraryBackend; +// This structure let's you customize behaviour of any LibraryQuery. struct QueryOptions { + // Modes of LibraryQuery: + // - use the all songs table + // - use the duplicated songs view; by duplicated we mean those songs + // for which the (artist, album, title) tuple is found more than once + // in the songs table + // - use the untagged songs view; by untagged we mean those for which + // at least one of the (artist, album, title) tags is empty + // Please note that additional filtering based on fts table (the filter + // attribute) won't work in Duplicates and Untagged modes. + enum QueryMode { + QueryMode_All, + QueryMode_Duplicates, + QueryMode_Untagged + }; + QueryOptions(); bool Matches(const Song& song) const; - // Please note that this attribute is mutually exclusive with the 'duplicates_only' - // flag! + QString get_filter() const { return filter; } + void set_filter(QString filter) { + this->filter = filter; + this->query_mode = QueryMode_All; + } + + int get_max_age() const { return max_age; } + void set_max_age(int max_age) { this->max_age = max_age; } + + QueryMode get_query_mode() const { return query_mode; } + void set_query_mode(QueryMode query_mode) { + this->query_mode = query_mode; + this->filter = QString(); + } + + private: QString filter; int max_age; - // If true, the query will operate not on the whole songs table but only on those rows - // which are duplicated. By duplication we mean a situation where two or more songs - // with equal (artist, album, title) tuple exist (case sensitive). - // Please note that this flag is mutually exclusive with the 'filter' attribute! - bool duplicates_only; + QueryMode query_mode; }; class LibraryQuery { diff --git a/src/scripting/python/libraryquery.sip b/src/scripting/python/libraryquery.sip index 4f30e0938..69867a391 100644 --- a/src/scripting/python/libraryquery.sip +++ b/src/scripting/python/libraryquery.sip @@ -5,13 +5,24 @@ class QueryOptions { %End public: + enum QueryMode { + QueryMode_All, + QueryMode_Duplicates, + QueryMode_Untagged + }; + QueryOptions(); bool Matches(const Song& song) const; - QString filter; - int max_age; - bool duplicates_only; + QString get_filter() const; + void set_filter(QString filter); + + int get_max_age() const; + void set_max_age(int max_age); + + QueryMode get_query_mode() const; + void set_query_mode(QueryMode view); }; class LibraryQuery { diff --git a/src/translations/ar.po b/src/translations/ar.po index 566e07876..1a401ec95 100644 --- a/src/translations/ar.po +++ b/src/translations/ar.po @@ -2102,21 +2102,27 @@ msgstr "" msgid "Show above status bar" msgstr "" +msgid "Show all songs" +msgstr "" + msgid "Show all the songs" msgstr "" msgid "Show cover art in library" msgstr "" -msgid "Show duplicates only" -msgstr "" - msgid "Show fullsize..." msgstr "" msgid "Show in various artists" msgstr "" +msgid "Show only duplicates" +msgstr "" + +msgid "Show only untagged" +msgstr "" + msgid "Show the \"love\" and \"ban\" buttons" msgstr "" diff --git a/src/translations/be.po b/src/translations/be.po index b60d83242..cf86727c0 100644 --- a/src/translations/be.po +++ b/src/translations/be.po @@ -2116,21 +2116,27 @@ msgstr "" msgid "Show above status bar" msgstr "" +msgid "Show all songs" +msgstr "" + msgid "Show all the songs" msgstr "" msgid "Show cover art in library" msgstr "" -msgid "Show duplicates only" -msgstr "" - msgid "Show fullsize..." msgstr "" msgid "Show in various artists" msgstr "" +msgid "Show only duplicates" +msgstr "" + +msgid "Show only untagged" +msgstr "" + msgid "Show the \"love\" and \"ban\" buttons" msgstr "" diff --git a/src/translations/bg.po b/src/translations/bg.po index 0f345a147..eaed2c63f 100644 --- a/src/translations/bg.po +++ b/src/translations/bg.po @@ -2138,21 +2138,27 @@ msgstr "Показване на красиво OSD" msgid "Show above status bar" msgstr "Покажи над status bar-а" +msgid "Show all songs" +msgstr "" + msgid "Show all the songs" msgstr "Покажи всичките песни" msgid "Show cover art in library" msgstr "" -msgid "Show duplicates only" -msgstr "" - msgid "Show fullsize..." msgstr "Покажи в пълен размер..." msgid "Show in various artists" msgstr "Показвай в смесени артисти" +msgid "Show only duplicates" +msgstr "" + +msgid "Show only untagged" +msgstr "" + msgid "Show the \"love\" and \"ban\" buttons" msgstr "Показване на бутоните \"харесвам\" и \"бан\"" diff --git a/src/translations/br.po b/src/translations/br.po index 0898ba6fa..a1d7357b2 100644 --- a/src/translations/br.po +++ b/src/translations/br.po @@ -2104,21 +2104,27 @@ msgstr "" msgid "Show above status bar" msgstr "" +msgid "Show all songs" +msgstr "" + msgid "Show all the songs" msgstr "" msgid "Show cover art in library" msgstr "" -msgid "Show duplicates only" -msgstr "" - msgid "Show fullsize..." msgstr "" msgid "Show in various artists" msgstr "" +msgid "Show only duplicates" +msgstr "" + +msgid "Show only untagged" +msgstr "" + msgid "Show the \"love\" and \"ban\" buttons" msgstr "" diff --git a/src/translations/ca.po b/src/translations/ca.po index 90fdfaf7f..d875638fb 100644 --- a/src/translations/ca.po +++ b/src/translations/ca.po @@ -2139,21 +2139,27 @@ msgstr "Mostra un OSD bonic" msgid "Show above status bar" msgstr "Mostra sota la barra d'estat" +msgid "Show all songs" +msgstr "" + msgid "Show all the songs" msgstr "" msgid "Show cover art in library" msgstr "" -msgid "Show duplicates only" -msgstr "" - msgid "Show fullsize..." msgstr "Mostra a mida completa..." msgid "Show in various artists" msgstr "Mostra a Artiste" +msgid "Show only duplicates" +msgstr "" + +msgid "Show only untagged" +msgstr "" + msgid "Show the \"love\" and \"ban\" buttons" msgstr "" diff --git a/src/translations/cs.po b/src/translations/cs.po index aaf5c8983..4b74f38c6 100644 --- a/src/translations/cs.po +++ b/src/translations/cs.po @@ -2141,21 +2141,27 @@ msgstr "Používat oznámení Clementine" msgid "Show above status bar" msgstr "Ukázat nad stavovým řádkem" +msgid "Show all songs" +msgstr "" + msgid "Show all the songs" msgstr "Ukázat všechny písničky" msgid "Show cover art in library" msgstr "Ukázat obal v knihovně" -msgid "Show duplicates only" -msgstr "" - msgid "Show fullsize..." msgstr "Ukázat plnou velikost..." msgid "Show in various artists" msgstr "Ukázat pod různými umělci" +msgid "Show only duplicates" +msgstr "" + +msgid "Show only untagged" +msgstr "" + msgid "Show the \"love\" and \"ban\" buttons" msgstr "Ukázat tlačítka \"Milovat\" a \"Zakázat\"" diff --git a/src/translations/cy.po b/src/translations/cy.po index 9448249b8..cec965632 100644 --- a/src/translations/cy.po +++ b/src/translations/cy.po @@ -2102,21 +2102,27 @@ msgstr "" msgid "Show above status bar" msgstr "" +msgid "Show all songs" +msgstr "" + msgid "Show all the songs" msgstr "" msgid "Show cover art in library" msgstr "" -msgid "Show duplicates only" -msgstr "" - msgid "Show fullsize..." msgstr "" msgid "Show in various artists" msgstr "" +msgid "Show only duplicates" +msgstr "" + +msgid "Show only untagged" +msgstr "" + msgid "Show the \"love\" and \"ban\" buttons" msgstr "" diff --git a/src/translations/da.po b/src/translations/da.po index edf54d799..9b2e82db8 100644 --- a/src/translations/da.po +++ b/src/translations/da.po @@ -2107,21 +2107,27 @@ msgstr "Vis en køn OSD" msgid "Show above status bar" msgstr "" +msgid "Show all songs" +msgstr "" + msgid "Show all the songs" msgstr "" msgid "Show cover art in library" msgstr "" -msgid "Show duplicates only" -msgstr "" - msgid "Show fullsize..." msgstr "Vis i fuld størrelse..." msgid "Show in various artists" msgstr "Vis under diverse kunstnere" +msgid "Show only duplicates" +msgstr "" + +msgid "Show only untagged" +msgstr "" + msgid "Show the \"love\" and \"ban\" buttons" msgstr "Vis \"elsker\" og \"bandlys\"-knapperne" diff --git a/src/translations/de.po b/src/translations/de.po index b75c82530..3ea472c26 100644 --- a/src/translations/de.po +++ b/src/translations/de.po @@ -2143,21 +2143,27 @@ msgstr "Clementines Benachrichtigungen benutzen" msgid "Show above status bar" msgstr "Über der Statusleiste zeigen" +msgid "Show all songs" +msgstr "" + msgid "Show all the songs" msgstr "Alle Titel anzeigen" msgid "Show cover art in library" msgstr "Zeigt Cover in Musiksammlung an" -msgid "Show duplicates only" -msgstr "" - msgid "Show fullsize..." msgstr "Vollbild..." msgid "Show in various artists" msgstr "Unter \"Verschiedene Interpreten\" anzeigen" +msgid "Show only duplicates" +msgstr "" + +msgid "Show only untagged" +msgstr "" + msgid "Show the \"love\" and \"ban\" buttons" msgstr "\"Lieben\" und \"Bannen\" Knöpfe anzeigen" diff --git a/src/translations/el.po b/src/translations/el.po index 7c5d9038d..68c322633 100644 --- a/src/translations/el.po +++ b/src/translations/el.po @@ -2152,21 +2152,27 @@ msgstr "Εμφάνισε ένα όμορφο OSD" msgid "Show above status bar" msgstr "Εμφάνιση πάνω από την μπάρα κατάστασης" +msgid "Show all songs" +msgstr "" + msgid "Show all the songs" msgstr "Εμφάνιση όλλων των τραγουδιών" msgid "Show cover art in library" msgstr "Εμφάνιση του εξώφυλλου στην βιβλιοθήκη" -msgid "Show duplicates only" -msgstr "" - msgid "Show fullsize..." msgstr "Εμφάνισε σε πλήρες μέγεθος..." msgid "Show in various artists" msgstr "Εμφάνιση στους διάφορους καλλιτέχνες" +msgid "Show only duplicates" +msgstr "" + +msgid "Show only untagged" +msgstr "" + msgid "Show the \"love\" and \"ban\" buttons" msgstr "Εμφάνισε τα κουμπιά \"αγάπη\"και \"απαγόρευση\"" diff --git a/src/translations/en.po b/src/translations/en.po index aad8c7e46..6256ca507 100644 --- a/src/translations/en.po +++ b/src/translations/en.po @@ -2102,21 +2102,27 @@ msgstr "" msgid "Show above status bar" msgstr "" +msgid "Show all songs" +msgstr "" + msgid "Show all the songs" msgstr "" msgid "Show cover art in library" msgstr "" -msgid "Show duplicates only" -msgstr "" - msgid "Show fullsize..." msgstr "" msgid "Show in various artists" msgstr "" +msgid "Show only duplicates" +msgstr "" + +msgid "Show only untagged" +msgstr "" + msgid "Show the \"love\" and \"ban\" buttons" msgstr "" diff --git a/src/translations/en_CA.po b/src/translations/en_CA.po index 25158f7bc..0dfd6d2e4 100644 --- a/src/translations/en_CA.po +++ b/src/translations/en_CA.po @@ -2106,21 +2106,27 @@ msgstr "Show a pretty OSD" msgid "Show above status bar" msgstr "" +msgid "Show all songs" +msgstr "" + msgid "Show all the songs" msgstr "" msgid "Show cover art in library" msgstr "" -msgid "Show duplicates only" -msgstr "" - msgid "Show fullsize..." msgstr "Show fullsize..." msgid "Show in various artists" msgstr "Show in various artists" +msgid "Show only duplicates" +msgstr "" + +msgid "Show only untagged" +msgstr "" + msgid "Show the \"love\" and \"ban\" buttons" msgstr "Show the \"love\" and \"ban\" buttons" diff --git a/src/translations/en_GB.po b/src/translations/en_GB.po index 975e038fc..f26eff3e9 100644 --- a/src/translations/en_GB.po +++ b/src/translations/en_GB.po @@ -2103,21 +2103,27 @@ msgstr "Show a pretty OSD" msgid "Show above status bar" msgstr "" +msgid "Show all songs" +msgstr "" + msgid "Show all the songs" msgstr "" msgid "Show cover art in library" msgstr "" -msgid "Show duplicates only" -msgstr "" - msgid "Show fullsize..." msgstr "Show fullsize..." msgid "Show in various artists" msgstr "Show in various artists" +msgid "Show only duplicates" +msgstr "" + +msgid "Show only untagged" +msgstr "" + msgid "Show the \"love\" and \"ban\" buttons" msgstr "Show the \"love\" and \"ban\" buttons" diff --git a/src/translations/eo.po b/src/translations/eo.po index 01f6615cf..80ce005d1 100644 --- a/src/translations/eo.po +++ b/src/translations/eo.po @@ -2102,21 +2102,27 @@ msgstr "" msgid "Show above status bar" msgstr "" +msgid "Show all songs" +msgstr "" + msgid "Show all the songs" msgstr "" msgid "Show cover art in library" msgstr "" -msgid "Show duplicates only" -msgstr "" - msgid "Show fullsize..." msgstr "" msgid "Show in various artists" msgstr "" +msgid "Show only duplicates" +msgstr "" + +msgid "Show only untagged" +msgstr "" + msgid "Show the \"love\" and \"ban\" buttons" msgstr "" diff --git a/src/translations/es.po b/src/translations/es.po index 091ce1a4c..63c45475e 100644 --- a/src/translations/es.po +++ b/src/translations/es.po @@ -2151,21 +2151,27 @@ msgstr "Mostrar OSD Estético" msgid "Show above status bar" msgstr "Mostrar la barra de estado superior" +msgid "Show all songs" +msgstr "" + msgid "Show all the songs" msgstr "Mostrar todas las canciones" msgid "Show cover art in library" msgstr "Mostrar portadas en la librería" -msgid "Show duplicates only" -msgstr "" - msgid "Show fullsize..." msgstr "Mostrar carátula..." msgid "Show in various artists" msgstr "Mostrar en Varios artistas" +msgid "Show only duplicates" +msgstr "" + +msgid "Show only untagged" +msgstr "" + msgid "Show the \"love\" and \"ban\" buttons" msgstr "Mostrar los botones \"Me encanta\" y \"Prohibir\"" diff --git a/src/translations/et.po b/src/translations/et.po index 8a1f0b59e..992a01f57 100644 --- a/src/translations/et.po +++ b/src/translations/et.po @@ -2103,21 +2103,27 @@ msgstr "" msgid "Show above status bar" msgstr "" +msgid "Show all songs" +msgstr "" + msgid "Show all the songs" msgstr "Näita kõiki laule" msgid "Show cover art in library" msgstr "" -msgid "Show duplicates only" -msgstr "" - msgid "Show fullsize..." msgstr "" msgid "Show in various artists" msgstr "" +msgid "Show only duplicates" +msgstr "" + +msgid "Show only untagged" +msgstr "" + msgid "Show the \"love\" and \"ban\" buttons" msgstr "" diff --git a/src/translations/eu.po b/src/translations/eu.po index 914fd03c2..e1cc40f34 100644 --- a/src/translations/eu.po +++ b/src/translations/eu.po @@ -2102,21 +2102,27 @@ msgstr "" msgid "Show above status bar" msgstr "" +msgid "Show all songs" +msgstr "" + msgid "Show all the songs" msgstr "" msgid "Show cover art in library" msgstr "" -msgid "Show duplicates only" -msgstr "" - msgid "Show fullsize..." msgstr "" msgid "Show in various artists" msgstr "" +msgid "Show only duplicates" +msgstr "" + +msgid "Show only untagged" +msgstr "" + msgid "Show the \"love\" and \"ban\" buttons" msgstr "" diff --git a/src/translations/fi.po b/src/translations/fi.po index de5d01903..dccf58d7f 100644 --- a/src/translations/fi.po +++ b/src/translations/fi.po @@ -2103,21 +2103,27 @@ msgstr "" msgid "Show above status bar" msgstr "" +msgid "Show all songs" +msgstr "" + msgid "Show all the songs" msgstr "" msgid "Show cover art in library" msgstr "" -msgid "Show duplicates only" -msgstr "" - msgid "Show fullsize..." msgstr "" msgid "Show in various artists" msgstr "" +msgid "Show only duplicates" +msgstr "" + +msgid "Show only untagged" +msgstr "" + msgid "Show the \"love\" and \"ban\" buttons" msgstr "" diff --git a/src/translations/fr.po b/src/translations/fr.po index e5261c7ba..0a1513b9a 100644 --- a/src/translations/fr.po +++ b/src/translations/fr.po @@ -2157,21 +2157,27 @@ msgstr "Utiliser l'affichage à l'écran (OSD)" msgid "Show above status bar" msgstr "Afficher au dessus de la barre d'état" +msgid "Show all songs" +msgstr "" + msgid "Show all the songs" msgstr "Afficher tous les morceaux" msgid "Show cover art in library" msgstr "Afficher les jaquettes des albums dans la bibliothèque" -msgid "Show duplicates only" -msgstr "" - msgid "Show fullsize..." msgstr "Afficher en taille réelle..." msgid "Show in various artists" msgstr "Classer dans la catégorie « Compilations d'artistes »" +msgid "Show only duplicates" +msgstr "" + +msgid "Show only untagged" +msgstr "" + msgid "Show the \"love\" and \"ban\" buttons" msgstr "Montrer les boutons « j'aime » et « je déteste »" diff --git a/src/translations/gl.po b/src/translations/gl.po index fbafe0b19..7dd6a9486 100644 --- a/src/translations/gl.po +++ b/src/translations/gl.po @@ -2111,21 +2111,27 @@ msgstr "" msgid "Show above status bar" msgstr "" +msgid "Show all songs" +msgstr "" + msgid "Show all the songs" msgstr "" msgid "Show cover art in library" msgstr "" -msgid "Show duplicates only" -msgstr "" - msgid "Show fullsize..." msgstr "" msgid "Show in various artists" msgstr "Mostrar en vários artistas" +msgid "Show only duplicates" +msgstr "" + +msgid "Show only untagged" +msgstr "" + msgid "Show the \"love\" and \"ban\" buttons" msgstr "" diff --git a/src/translations/he.po b/src/translations/he.po index 588032e8f..99ef8d600 100644 --- a/src/translations/he.po +++ b/src/translations/he.po @@ -2122,21 +2122,27 @@ msgstr "הצגת OSD" msgid "Show above status bar" msgstr "הצג מעל לשורת המצב" +msgid "Show all songs" +msgstr "" + msgid "Show all the songs" msgstr "הצג את כל השירים" msgid "Show cover art in library" msgstr "הצגת עטיפת אלבום בספרייה" -msgid "Show duplicates only" -msgstr "" - msgid "Show fullsize..." msgstr "הצג על מסך מלא..." msgid "Show in various artists" msgstr "הצג תחת אמנים שונים" +msgid "Show only duplicates" +msgstr "" + +msgid "Show only untagged" +msgstr "" + msgid "Show the \"love\" and \"ban\" buttons" msgstr "להציג את הלחצנים \"אוהב\" ו-\"חסום\"" diff --git a/src/translations/hi.po b/src/translations/hi.po index 1cc292052..9939373f2 100644 --- a/src/translations/hi.po +++ b/src/translations/hi.po @@ -2102,21 +2102,27 @@ msgstr "" msgid "Show above status bar" msgstr "" +msgid "Show all songs" +msgstr "" + msgid "Show all the songs" msgstr "" msgid "Show cover art in library" msgstr "" -msgid "Show duplicates only" -msgstr "" - msgid "Show fullsize..." msgstr "" msgid "Show in various artists" msgstr "" +msgid "Show only duplicates" +msgstr "" + +msgid "Show only untagged" +msgstr "" + msgid "Show the \"love\" and \"ban\" buttons" msgstr "" diff --git a/src/translations/hr.po b/src/translations/hr.po index 4bc1f9395..479b5f63f 100644 --- a/src/translations/hr.po +++ b/src/translations/hr.po @@ -2134,21 +2134,27 @@ msgstr "Prikaži ljepši OSD" msgid "Show above status bar" msgstr "Prikaži iznad statusne trake" +msgid "Show all songs" +msgstr "" + msgid "Show all the songs" msgstr "Prikaži sve pjesme" msgid "Show cover art in library" msgstr "Prikaži omot albuma u zbirci" -msgid "Show duplicates only" -msgstr "" - msgid "Show fullsize..." msgstr "Prikaži u punoj veličini..." msgid "Show in various artists" msgstr "Prikaži u različitim izvođačima" +msgid "Show only duplicates" +msgstr "" + +msgid "Show only untagged" +msgstr "" + msgid "Show the \"love\" and \"ban\" buttons" msgstr "Prikaži \"Sviđa mi se\" i \"Zabrana\" tipku" diff --git a/src/translations/hu.po b/src/translations/hu.po index 4a78e8885..4f6228da5 100644 --- a/src/translations/hu.po +++ b/src/translations/hu.po @@ -2140,21 +2140,27 @@ msgstr "Pretty OSD megjelenítése" msgid "Show above status bar" msgstr "Jelenítse meg az állapotsáv fölött" +msgid "Show all songs" +msgstr "" + msgid "Show all the songs" msgstr "Minden számot mutasson" msgid "Show cover art in library" msgstr "Albumborító megjelenítése a zenetárban" -msgid "Show duplicates only" -msgstr "" - msgid "Show fullsize..." msgstr "Jelenítse meg teljes méretben..." msgid "Show in various artists" msgstr "Jelenítse meg a különböző előadók között" +msgid "Show only duplicates" +msgstr "" + +msgid "Show only untagged" +msgstr "" + msgid "Show the \"love\" and \"ban\" buttons" msgstr "Jelenítse meg a \"kedvenc\" és \"tiltás\" gombokat" diff --git a/src/translations/it.po b/src/translations/it.po index 9015ec838..0c684dd54 100644 --- a/src/translations/it.po +++ b/src/translations/it.po @@ -2146,21 +2146,27 @@ msgstr "Mostra un OSD gradevole" msgid "Show above status bar" msgstr "Mostra la barra di stato superiore" +msgid "Show all songs" +msgstr "" + msgid "Show all the songs" msgstr "Mostra tutti i brani" msgid "Show cover art in library" msgstr "Mostra le copertine nella raccolta" -msgid "Show duplicates only" -msgstr "" - msgid "Show fullsize..." msgstr "Mostra a dimensioni originali..." msgid "Show in various artists" msgstr "Mostra in artisti vari" +msgid "Show only duplicates" +msgstr "" + +msgid "Show only untagged" +msgstr "" + msgid "Show the \"love\" and \"ban\" buttons" msgstr "Mostra i pulsanti \"Mi piace\" e \"Vieta\"" diff --git a/src/translations/ja.po b/src/translations/ja.po index b744615ce..bb3fea451 100644 --- a/src/translations/ja.po +++ b/src/translations/ja.po @@ -2131,21 +2131,27 @@ msgstr "Pretty OSD を表示する" msgid "Show above status bar" msgstr "ステータス バーの上に表示" +msgid "Show all songs" +msgstr "" + msgid "Show all the songs" msgstr "すべての曲を表示" msgid "Show cover art in library" msgstr "ライブラリにカバー アートを表示" -msgid "Show duplicates only" -msgstr "" - msgid "Show fullsize..." msgstr "原寸表示" msgid "Show in various artists" msgstr "さまざまなアーティストに表示する" +msgid "Show only duplicates" +msgstr "" + +msgid "Show only untagged" +msgstr "" + msgid "Show the \"love\" and \"ban\" buttons" msgstr "\"Love\" および \"Ban\" ボタンを表示する" diff --git a/src/translations/kk.po b/src/translations/kk.po index 9cf775776..beaf49276 100644 --- a/src/translations/kk.po +++ b/src/translations/kk.po @@ -2102,21 +2102,27 @@ msgstr "" msgid "Show above status bar" msgstr "" +msgid "Show all songs" +msgstr "" + msgid "Show all the songs" msgstr "" msgid "Show cover art in library" msgstr "" -msgid "Show duplicates only" -msgstr "" - msgid "Show fullsize..." msgstr "" msgid "Show in various artists" msgstr "" +msgid "Show only duplicates" +msgstr "" + +msgid "Show only untagged" +msgstr "" + msgid "Show the \"love\" and \"ban\" buttons" msgstr "" diff --git a/src/translations/lt.po b/src/translations/lt.po index f442397cb..54257a1c3 100644 --- a/src/translations/lt.po +++ b/src/translations/lt.po @@ -2135,21 +2135,27 @@ msgstr "Rodyti gražų OSD" msgid "Show above status bar" msgstr "Rodyti virš būsenos juostos" +msgid "Show all songs" +msgstr "" + msgid "Show all the songs" msgstr "Rodyti visas dainas" msgid "Show cover art in library" msgstr "Rodyti albumo viršelius fonotekoje" -msgid "Show duplicates only" -msgstr "" - msgid "Show fullsize..." msgstr "Rodyti viso dydžio..." msgid "Show in various artists" msgstr "Rodyti įvairiuose atlikėjuose" +msgid "Show only duplicates" +msgstr "" + +msgid "Show only untagged" +msgstr "" + msgid "Show the \"love\" and \"ban\" buttons" msgstr "Rodyti \"meilė\" ir \"blokavimas\" mygtukus" diff --git a/src/translations/lv.po b/src/translations/lv.po index 377266ae6..59b5f6c9c 100644 --- a/src/translations/lv.po +++ b/src/translations/lv.po @@ -2102,21 +2102,27 @@ msgstr "" msgid "Show above status bar" msgstr "" +msgid "Show all songs" +msgstr "" + msgid "Show all the songs" msgstr "" msgid "Show cover art in library" msgstr "" -msgid "Show duplicates only" -msgstr "" - msgid "Show fullsize..." msgstr "" msgid "Show in various artists" msgstr "Rādīt pie dažādiem izpildītājiem" +msgid "Show only duplicates" +msgstr "" + +msgid "Show only untagged" +msgstr "" + msgid "Show the \"love\" and \"ban\" buttons" msgstr "" diff --git a/src/translations/nb.po b/src/translations/nb.po index 2209a5618..98503ecbc 100644 --- a/src/translations/nb.po +++ b/src/translations/nb.po @@ -2114,21 +2114,27 @@ msgstr "Vis en Clementine-spesifikk skrivebordsmelding" msgid "Show above status bar" msgstr "" +msgid "Show all songs" +msgstr "" + msgid "Show all the songs" msgstr "" msgid "Show cover art in library" msgstr "" -msgid "Show duplicates only" -msgstr "" - msgid "Show fullsize..." msgstr "Vis i fullskjerm..." msgid "Show in various artists" msgstr "Vis under Diverse Artister" +msgid "Show only duplicates" +msgstr "" + +msgid "Show only untagged" +msgstr "" + msgid "Show the \"love\" and \"ban\" buttons" msgstr "Vis \"Elsk\" og \"Bannlys\" knappene" diff --git a/src/translations/nl.po b/src/translations/nl.po index 6f079f375..6815ff4f4 100644 --- a/src/translations/nl.po +++ b/src/translations/nl.po @@ -2138,21 +2138,27 @@ msgstr "Mooie OSD weergeven" msgid "Show above status bar" msgstr "Boven statusbalk weergeven" +msgid "Show all songs" +msgstr "" + msgid "Show all the songs" msgstr "Alle nummers weergeven" msgid "Show cover art in library" msgstr "" -msgid "Show duplicates only" -msgstr "" - msgid "Show fullsize..." msgstr "Volledig weergeven..." msgid "Show in various artists" msgstr "In diverse artiesten weergeven" +msgid "Show only duplicates" +msgstr "" + +msgid "Show only untagged" +msgstr "" + msgid "Show the \"love\" and \"ban\" buttons" msgstr "\"Mooi\" en \"ban\" knoppen weergeven" diff --git a/src/translations/oc.po b/src/translations/oc.po index 655e869ea..6dcd83cf6 100644 --- a/src/translations/oc.po +++ b/src/translations/oc.po @@ -2102,21 +2102,27 @@ msgstr "" msgid "Show above status bar" msgstr "" +msgid "Show all songs" +msgstr "" + msgid "Show all the songs" msgstr "" msgid "Show cover art in library" msgstr "" -msgid "Show duplicates only" -msgstr "" - msgid "Show fullsize..." msgstr "" msgid "Show in various artists" msgstr "" +msgid "Show only duplicates" +msgstr "" + +msgid "Show only untagged" +msgstr "" + msgid "Show the \"love\" and \"ban\" buttons" msgstr "" diff --git a/src/translations/pl.po b/src/translations/pl.po index 398c42d93..f0c6afa9b 100644 --- a/src/translations/pl.po +++ b/src/translations/pl.po @@ -2139,21 +2139,27 @@ msgstr "Pokazuj ładne OSD (menu ekranowe)" msgid "Show above status bar" msgstr "Pokaż ponad paskiem stanu" +msgid "Show all songs" +msgstr "" + msgid "Show all the songs" msgstr "Pokaż wszystkie ścieżki" msgid "Show cover art in library" msgstr "Pokazuj okładki w bibliotece" -msgid "Show duplicates only" -msgstr "" - msgid "Show fullsize..." msgstr "Pokaż w pełnej wielkości..." msgid "Show in various artists" msgstr "Pokaż w różni wykonawcy" +msgid "Show only duplicates" +msgstr "" + +msgid "Show only untagged" +msgstr "" + msgid "Show the \"love\" and \"ban\" buttons" msgstr "Pokaż przyciski \"Dodaj do ulubionych\" i \"Zbanuj\"" diff --git a/src/translations/pt.po b/src/translations/pt.po index f0df4e276..b8062463f 100644 --- a/src/translations/pt.po +++ b/src/translations/pt.po @@ -2142,21 +2142,27 @@ msgstr "Mostrar um OSD personalizado" msgid "Show above status bar" msgstr "Mostrar acima da barra de estado" +msgid "Show all songs" +msgstr "" + msgid "Show all the songs" msgstr "Mostrar todas as músicas" msgid "Show cover art in library" msgstr "Mostrar capa de álbum na coleção" -msgid "Show duplicates only" -msgstr "" - msgid "Show fullsize..." msgstr "Mostrar tamanho total..." msgid "Show in various artists" msgstr "Mostrar em vários artistas" +msgid "Show only duplicates" +msgstr "" + +msgid "Show only untagged" +msgstr "" + msgid "Show the \"love\" and \"ban\" buttons" msgstr "Mostrar os botões \"adorar\" e \"banir\"" diff --git a/src/translations/pt_BR.po b/src/translations/pt_BR.po index c9191a7bb..5a6417dee 100644 --- a/src/translations/pt_BR.po +++ b/src/translations/pt_BR.po @@ -2140,21 +2140,27 @@ msgstr "Mostrar aviso estilizado na tela" msgid "Show above status bar" msgstr "Mostrar acima da barra de status" +msgid "Show all songs" +msgstr "" + msgid "Show all the songs" msgstr "Mostrar todas as músicas" msgid "Show cover art in library" msgstr "" -msgid "Show duplicates only" -msgstr "" - msgid "Show fullsize..." msgstr "Exibir tamanho real..." msgid "Show in various artists" msgstr "Exibir em vários artistas" +msgid "Show only duplicates" +msgstr "" + +msgid "Show only untagged" +msgstr "" + msgid "Show the \"love\" and \"ban\" buttons" msgstr "Exibir os botões \"adoro\" e \"odeio\"" diff --git a/src/translations/ro.po b/src/translations/ro.po index 6b7cbd64d..f525997be 100644 --- a/src/translations/ro.po +++ b/src/translations/ro.po @@ -2102,21 +2102,27 @@ msgstr "" msgid "Show above status bar" msgstr "" +msgid "Show all songs" +msgstr "" + msgid "Show all the songs" msgstr "" msgid "Show cover art in library" msgstr "" -msgid "Show duplicates only" -msgstr "" - msgid "Show fullsize..." msgstr "" msgid "Show in various artists" msgstr "Arată în artiști diferiți" +msgid "Show only duplicates" +msgstr "" + +msgid "Show only untagged" +msgstr "" + msgid "Show the \"love\" and \"ban\" buttons" msgstr "" diff --git a/src/translations/ru.po b/src/translations/ru.po index 2a46b5c6c..e608bb1ae 100644 --- a/src/translations/ru.po +++ b/src/translations/ru.po @@ -2133,21 +2133,27 @@ msgstr "Показывать OSD" msgid "Show above status bar" msgstr "Показать над строкой состояния" +msgid "Show all songs" +msgstr "" + msgid "Show all the songs" msgstr "Показать все песни" msgid "Show cover art in library" msgstr "Показывать обложки в библиотеке" -msgid "Show duplicates only" -msgstr "" - msgid "Show fullsize..." msgstr "Показать полный размер..." msgid "Show in various artists" msgstr "Показать в \"Разных исполнителях\"" +msgid "Show only duplicates" +msgstr "" + +msgid "Show only untagged" +msgstr "" + msgid "Show the \"love\" and \"ban\" buttons" msgstr "Показывать кнопки \"Избранное\" и \"Запретить\"" diff --git a/src/translations/sk.po b/src/translations/sk.po index 9550567dd..5171f001f 100644 --- a/src/translations/sk.po +++ b/src/translations/sk.po @@ -2131,21 +2131,27 @@ msgstr "Zobrazovať krásne OSD" msgid "Show above status bar" msgstr "Zobraziť nad stavovou lištou" +msgid "Show all songs" +msgstr "" + msgid "Show all the songs" msgstr "Zobraziť všetky piesne" msgid "Show cover art in library" msgstr "Zobraziť obaly albumov v zbierke" -msgid "Show duplicates only" -msgstr "" - msgid "Show fullsize..." msgstr "Zobraziť celú veľkosť..." msgid "Show in various artists" msgstr "Zobrazovať v rôznich interprétoch" +msgid "Show only duplicates" +msgstr "" + +msgid "Show only untagged" +msgstr "" + msgid "Show the \"love\" and \"ban\" buttons" msgstr "Zobrazovať \"obľúbené\" a \"zakázané\" tlačítka" diff --git a/src/translations/sl.po b/src/translations/sl.po index 328b73c7a..207bb9d0a 100644 --- a/src/translations/sl.po +++ b/src/translations/sl.po @@ -2133,21 +2133,27 @@ msgstr "Pokaži lep zaslonski prikaz" msgid "Show above status bar" msgstr "Pokaži nad vrstico stanja" +msgid "Show all songs" +msgstr "" + msgid "Show all the songs" msgstr "Pokaži vse skladbe" msgid "Show cover art in library" msgstr "Kaži ovitek albuma v knjižnici" -msgid "Show duplicates only" -msgstr "" - msgid "Show fullsize..." msgstr "Pokaži v polni velikosti ..." msgid "Show in various artists" msgstr "Pokaži med \"Različni izvajalci\"" +msgid "Show only duplicates" +msgstr "" + +msgid "Show only untagged" +msgstr "" + msgid "Show the \"love\" and \"ban\" buttons" msgstr "Pokaži gumbe \"Priljubljena\" in \"Blokiraj\"" diff --git a/src/translations/sr.po b/src/translations/sr.po index ba4a6e7b7..0a9eb64e2 100644 --- a/src/translations/sr.po +++ b/src/translations/sr.po @@ -2106,21 +2106,27 @@ msgstr "" msgid "Show above status bar" msgstr "" +msgid "Show all songs" +msgstr "" + msgid "Show all the songs" msgstr "" msgid "Show cover art in library" msgstr "" -msgid "Show duplicates only" -msgstr "" - msgid "Show fullsize..." msgstr "" msgid "Show in various artists" msgstr "" +msgid "Show only duplicates" +msgstr "" + +msgid "Show only untagged" +msgstr "" + msgid "Show the \"love\" and \"ban\" buttons" msgstr "" diff --git a/src/translations/sv.po b/src/translations/sv.po index a56f30dea..63bc5f86a 100644 --- a/src/translations/sv.po +++ b/src/translations/sv.po @@ -2135,21 +2135,27 @@ msgstr "Visa en skön notifiering" msgid "Show above status bar" msgstr "Visa ovanför statusraden" +msgid "Show all songs" +msgstr "" + msgid "Show all the songs" msgstr "Visa alla låtarna" msgid "Show cover art in library" msgstr "" -msgid "Show duplicates only" -msgstr "" - msgid "Show fullsize..." msgstr "Visa full storlek..." msgid "Show in various artists" msgstr "Visa i diverse artister" +msgid "Show only duplicates" +msgstr "" + +msgid "Show only untagged" +msgstr "" + msgid "Show the \"love\" and \"ban\" buttons" msgstr "Visa knapparna \"Älska\" och \"Blockera\"" diff --git a/src/translations/tr.po b/src/translations/tr.po index 611104984..05f418aac 100644 --- a/src/translations/tr.po +++ b/src/translations/tr.po @@ -2132,21 +2132,27 @@ msgstr "Şirin bir OSD göster" msgid "Show above status bar" msgstr "Durum çubuğunun üzerinde göster" +msgid "Show all songs" +msgstr "" + msgid "Show all the songs" msgstr "Tüm şarkıları göster" msgid "Show cover art in library" msgstr "Kapak resmini kütüphanede göster" -msgid "Show duplicates only" -msgstr "" - msgid "Show fullsize..." msgstr "Tam boyutta göster" msgid "Show in various artists" msgstr "Çeşitli sanatçılarda göster" +msgid "Show only duplicates" +msgstr "" + +msgid "Show only untagged" +msgstr "" + msgid "Show the \"love\" and \"ban\" buttons" msgstr "\"Beğen\" ve \"Yasakla\" tuşlarını göster" diff --git a/src/translations/translations.pot b/src/translations/translations.pot index 368d266f5..46b091d75 100644 --- a/src/translations/translations.pot +++ b/src/translations/translations.pot @@ -2092,21 +2092,27 @@ msgstr "" msgid "Show above status bar" msgstr "" +msgid "Show all songs" +msgstr "" + msgid "Show all the songs" msgstr "" msgid "Show cover art in library" msgstr "" -msgid "Show duplicates only" -msgstr "" - msgid "Show fullsize..." msgstr "" msgid "Show in various artists" msgstr "" +msgid "Show only duplicates" +msgstr "" + +msgid "Show only untagged" +msgstr "" + msgid "Show the \"love\" and \"ban\" buttons" msgstr "" diff --git a/src/translations/uk.po b/src/translations/uk.po index f9fb1d54e..62f16f4f9 100644 --- a/src/translations/uk.po +++ b/src/translations/uk.po @@ -2132,21 +2132,27 @@ msgstr "Показувати приємні повідомлення OSD" msgid "Show above status bar" msgstr "Показати вище, в рядку стану" +msgid "Show all songs" +msgstr "" + msgid "Show all the songs" msgstr "Показати всі композиції" msgid "Show cover art in library" msgstr "Показувати обкладинки у фонотеці" -msgid "Show duplicates only" -msgstr "" - msgid "Show fullsize..." msgstr "Показати на повний розмір..." msgid "Show in various artists" msgstr "Показувати в різних виконавцях" +msgid "Show only duplicates" +msgstr "" + +msgid "Show only untagged" +msgstr "" + msgid "Show the \"love\" and \"ban\" buttons" msgstr "Показувати кнопки \"love\" та \"ban\"" diff --git a/src/translations/zh_CN.po b/src/translations/zh_CN.po index 1182de167..e257342ef 100644 --- a/src/translations/zh_CN.po +++ b/src/translations/zh_CN.po @@ -2104,21 +2104,27 @@ msgstr "" msgid "Show above status bar" msgstr "" +msgid "Show all songs" +msgstr "" + msgid "Show all the songs" msgstr "" msgid "Show cover art in library" msgstr "" -msgid "Show duplicates only" -msgstr "" - msgid "Show fullsize..." msgstr "" msgid "Show in various artists" msgstr "" +msgid "Show only duplicates" +msgstr "" + +msgid "Show only untagged" +msgstr "" + msgid "Show the \"love\" and \"ban\" buttons" msgstr "显示“标记喜爱”和“禁止”按钮" diff --git a/src/translations/zh_TW.po b/src/translations/zh_TW.po index ac49cf3fe..13e0b7f84 100644 --- a/src/translations/zh_TW.po +++ b/src/translations/zh_TW.po @@ -2106,21 +2106,27 @@ msgstr "顯示一個漂亮的OSD" msgid "Show above status bar" msgstr "顯示在狀態欄上方" +msgid "Show all songs" +msgstr "" + msgid "Show all the songs" msgstr "顯示所有的歌曲" msgid "Show cover art in library" msgstr "" -msgid "Show duplicates only" -msgstr "" - msgid "Show fullsize..." msgstr "全螢幕..." msgid "Show in various artists" msgstr "顯示各演唱者" +msgid "Show only duplicates" +msgstr "" + +msgid "Show only untagged" +msgstr "" + msgid "Show the \"love\" and \"ban\" buttons" msgstr "顯示 [喜愛] 和 [禁止] 按鈕" diff --git a/src/ui/mainwindow.cpp b/src/ui/mainwindow.cpp index 417a19db9..6214fb4fd 100644 --- a/src/ui/mainwindow.cpp +++ b/src/ui/mainwindow.cpp @@ -419,9 +419,18 @@ MainWindow::MainWindow( connect(device_view_, SIGNAL(AddToPlaylistSignal(QMimeData*)), SLOT(AddToPlaylist(QMimeData*))); // Library filter widget - QAction* duplicates_only_action = new QAction(tr("Show duplicates only"), this); - duplicates_only_action->setCheckable(true); - connect(duplicates_only_action, SIGNAL(toggled(bool)), library_view_->filter(), SLOT(SetDuplicatesOnly(bool))); + QActionGroup* library_view_group = new QActionGroup(this); + + library_show_all_ = library_view_group->addAction(tr("Show all songs")); + library_show_duplicates_ = library_view_group->addAction(tr("Show only duplicates")); + library_show_untagged_ = library_view_group->addAction(tr("Show only untagged")); + + library_show_all_->setCheckable(true); + library_show_duplicates_->setCheckable(true); + library_show_untagged_->setCheckable(true); + library_show_all_->setChecked(true); + + connect(library_view_group, SIGNAL(triggered(QAction*)), SLOT(ChangeLibraryQueryMode(QAction*))); QAction* library_config_action = new QAction( IconLoader::Load("configure"), tr("Configure library..."), this); @@ -432,7 +441,9 @@ MainWindow::MainWindow( QAction* separator = new QAction(this); separator->setSeparator(true); - library_view_->filter()->AddMenuAction(duplicates_only_action); + library_view_->filter()->AddMenuAction(library_show_all_); + library_view_->filter()->AddMenuAction(library_show_duplicates_); + library_view_->filter()->AddMenuAction(library_show_untagged_); library_view_->filter()->AddMenuAction(separator); library_view_->filter()->AddMenuAction(library_config_action); @@ -1563,6 +1574,16 @@ void MainWindow::PlaylistCopyToDevice() { } } +void MainWindow::ChangeLibraryQueryMode(QAction* action) { + if(action == library_show_duplicates_) { + library_view_->filter()->SetQueryMode(QueryOptions::QueryMode_Duplicates); + } else if (action == library_show_untagged_) { + library_view_->filter()->SetQueryMode(QueryOptions::QueryMode_Untagged); + } else { + library_view_->filter()->SetQueryMode(QueryOptions::QueryMode_All); + } +} + #ifdef HAVE_LIBLASTFM void MainWindow::ShowCoverManager() { if (!cover_manager_) { diff --git a/src/ui/mainwindow.h b/src/ui/mainwindow.h index 81bea5a34..e5bdf7003 100644 --- a/src/ui/mainwindow.h +++ b/src/ui/mainwindow.h @@ -161,6 +161,8 @@ class MainWindow : public QMainWindow, public PlatformInterface { void PlaylistOrganiseSelected(bool copy); void PlaylistDelete(); + void ChangeLibraryQueryMode(QAction* action); + void PlayIndex(const QModelIndex& index); void StopAfterCurrent(); @@ -283,6 +285,10 @@ class MainWindow : public QMainWindow, public PlatformInterface { ScriptManager* scripts_; boost::scoped_ptr script_dialog_; + QAction* library_show_all_; + QAction* library_show_duplicates_; + QAction* library_show_untagged_; + QMenu* playlist_menu_; QAction* playlist_play_pause_; QAction* playlist_stop_after_;