Add next and previous buttons to the edit tag dialog

This commit is contained in:
David Sansome 2010-12-20 16:36:16 +00:00
parent 2a63a746fe
commit 998f9e1af5
47 changed files with 299 additions and 5 deletions

View File

@ -1426,6 +1426,9 @@ msgstr ""
msgid "Newest tracks"
msgstr ""
msgid "Next"
msgstr ""
msgid "Next track"
msgstr ""
@ -1656,6 +1659,9 @@ msgstr ""
msgid "Preview"
msgstr ""
msgid "Previous"
msgstr ""
msgid "Previous track"
msgstr ""

View File

@ -1440,6 +1440,9 @@ msgstr ""
msgid "Newest tracks"
msgstr ""
msgid "Next"
msgstr ""
msgid "Next track"
msgstr ""
@ -1670,6 +1673,9 @@ msgstr ""
msgid "Preview"
msgstr ""
msgid "Previous"
msgstr ""
msgid "Previous track"
msgstr ""

View File

@ -1430,6 +1430,9 @@ msgstr ""
msgid "Newest tracks"
msgstr ""
msgid "Next"
msgstr ""
msgid "Next track"
msgstr "Следваща песен"
@ -1660,6 +1663,9 @@ msgstr ""
msgid "Preview"
msgstr "Преглед"
msgid "Previous"
msgstr ""
msgid "Previous track"
msgstr "Предишна песен"

View File

@ -1426,6 +1426,9 @@ msgstr ""
msgid "Newest tracks"
msgstr ""
msgid "Next"
msgstr ""
msgid "Next track"
msgstr ""
@ -1656,6 +1659,9 @@ msgstr ""
msgid "Preview"
msgstr ""
msgid "Previous"
msgstr ""
msgid "Previous track"
msgstr ""

View File

@ -1462,6 +1462,9 @@ msgstr ""
msgid "Newest tracks"
msgstr ""
msgid "Next"
msgstr ""
msgid "Next track"
msgstr "Pista següent"
@ -1694,6 +1697,9 @@ msgstr "Opcions de l'OSD bonic"
msgid "Preview"
msgstr "Previsualitza"
msgid "Previous"
msgstr ""
msgid "Previous track"
msgstr "Pista anterior"

View File

@ -1463,6 +1463,9 @@ msgstr "Nové skladby budou přidány automaticky."
msgid "Newest tracks"
msgstr "Nejnovější skladby"
msgid "Next"
msgstr ""
msgid "Next track"
msgstr "Další skladba"
@ -1695,6 +1698,9 @@ msgstr "Volby pro zobrazení oznámení Clementine na obrazovce"
msgid "Preview"
msgstr "Náhled"
msgid "Previous"
msgstr ""
msgid "Previous track"
msgstr "Předchozí skladba"

View File

@ -1426,6 +1426,9 @@ msgstr ""
msgid "Newest tracks"
msgstr ""
msgid "Next"
msgstr ""
msgid "Next track"
msgstr ""
@ -1656,6 +1659,9 @@ msgstr ""
msgid "Preview"
msgstr ""
msgid "Previous"
msgstr ""
msgid "Previous track"
msgstr ""

View File

@ -1431,6 +1431,9 @@ msgstr ""
msgid "Newest tracks"
msgstr ""
msgid "Next"
msgstr ""
msgid "Next track"
msgstr "Næste spor"
@ -1661,6 +1664,9 @@ msgstr "Indstillinger for køn OSD"
msgid "Preview"
msgstr ""
msgid "Previous"
msgstr ""
msgid "Previous track"
msgstr "Forrige spor"

View File

@ -1466,6 +1466,9 @@ msgstr "Neue Titel werden automatisch hinzugefügt."
msgid "Newest tracks"
msgstr "Neueste Stücke"
msgid "Next"
msgstr ""
msgid "Next track"
msgstr "Nächstes Stück"
@ -1698,6 +1701,9 @@ msgstr "Clementine-OSD"
msgid "Preview"
msgstr "Vorschau"
msgid "Previous"
msgstr ""
msgid "Previous track"
msgstr "Vorheriges Stück"

View File

@ -1471,6 +1471,9 @@ msgstr "Νέα κομμάτια θα προστίθενται αυτόματα."
msgid "Newest tracks"
msgstr "Νεότερα κομμάτια"
msgid "Next"
msgstr ""
msgid "Next track"
msgstr "Επόμενο κομμάτι"
@ -1705,6 +1708,9 @@ msgstr "Όμορφες OSD επιλογές"
msgid "Preview"
msgstr "Προεπισκόπηση"
msgid "Previous"
msgstr ""
msgid "Previous track"
msgstr "Προηγούμενο κομμάτι"

View File

@ -1430,6 +1430,9 @@ msgstr ""
msgid "Newest tracks"
msgstr ""
msgid "Next"
msgstr ""
msgid "Next track"
msgstr "Next track"
@ -1661,6 +1664,9 @@ msgstr "Pretty OSD options"
msgid "Preview"
msgstr ""
msgid "Previous"
msgstr ""
msgid "Previous track"
msgstr "Previous track"

View File

@ -1428,6 +1428,9 @@ msgstr ""
msgid "Newest tracks"
msgstr ""
msgid "Next"
msgstr ""
msgid "Next track"
msgstr "Next track"
@ -1658,6 +1661,9 @@ msgstr "Pretty OSD options"
msgid "Preview"
msgstr ""
msgid "Previous"
msgstr ""
msgid "Previous track"
msgstr "Previous track"

View File

@ -1426,6 +1426,9 @@ msgstr ""
msgid "Newest tracks"
msgstr ""
msgid "Next"
msgstr ""
msgid "Next track"
msgstr ""
@ -1656,6 +1659,9 @@ msgstr ""
msgid "Preview"
msgstr ""
msgid "Previous"
msgstr ""
msgid "Previous track"
msgstr ""

View File

@ -1472,6 +1472,9 @@ msgstr "Nuevas pistas serán añadidas automáticamente"
msgid "Newest tracks"
msgstr "Nuevas canciones"
msgid "Next"
msgstr ""
msgid "Next track"
msgstr "Pista siguiente"
@ -1706,6 +1709,9 @@ msgstr "Opciones del OSD Estético"
msgid "Preview"
msgstr "Vista previa"
msgid "Previous"
msgstr ""
msgid "Previous track"
msgstr "Pista anterior"

View File

@ -1428,6 +1428,9 @@ msgstr ""
msgid "Newest tracks"
msgstr ""
msgid "Next"
msgstr ""
msgid "Next track"
msgstr "Järgmine lugu"
@ -1658,6 +1661,9 @@ msgstr ""
msgid "Preview"
msgstr "Eelvaade"
msgid "Previous"
msgstr ""
msgid "Previous track"
msgstr "Eelmine lugu"

View File

@ -1426,6 +1426,9 @@ msgstr ""
msgid "Newest tracks"
msgstr ""
msgid "Next"
msgstr ""
msgid "Next track"
msgstr ""
@ -1656,6 +1659,9 @@ msgstr ""
msgid "Preview"
msgstr ""
msgid "Previous"
msgstr ""
msgid "Previous track"
msgstr ""

View File

@ -1428,6 +1428,9 @@ msgstr ""
msgid "Newest tracks"
msgstr ""
msgid "Next"
msgstr ""
msgid "Next track"
msgstr "Seuraava kappale"
@ -1658,6 +1661,9 @@ msgstr ""
msgid "Preview"
msgstr "Esikatselu"
msgid "Previous"
msgstr ""
msgid "Previous track"
msgstr "Edellinen kappale"

View File

@ -1477,6 +1477,9 @@ msgstr "De nouvelles pistes seront ajoutées automatiquement."
msgid "Newest tracks"
msgstr "Nouvelles pistes"
msgid "Next"
msgstr ""
msgid "Next track"
msgstr "Piste suivante"
@ -1711,6 +1714,9 @@ msgstr "Options de l'afficheur à l'écran (OSD)"
msgid "Preview"
msgstr "Aperçu"
msgid "Previous"
msgstr ""
msgid "Previous track"
msgstr "Piste précédente"

View File

@ -1432,6 +1432,9 @@ msgstr ""
msgid "Newest tracks"
msgstr ""
msgid "Next"
msgstr ""
msgid "Next track"
msgstr ""
@ -1662,6 +1665,9 @@ msgstr ""
msgid "Preview"
msgstr ""
msgid "Previous"
msgstr ""
msgid "Previous track"
msgstr ""

View File

@ -1433,6 +1433,9 @@ msgstr "רצועות חדשות יצורפו באופן אוטומטי."
msgid "Newest tracks"
msgstr "הרצועות הכי חדשות"
msgid "Next"
msgstr ""
msgid "Next track"
msgstr "הרצועה הבאה"
@ -1664,6 +1667,9 @@ msgstr ""
msgid "Preview"
msgstr "תצוגה מקדימה"
msgid "Previous"
msgstr ""
msgid "Previous track"
msgstr "רצועה קודמת"

View File

@ -1426,6 +1426,9 @@ msgstr ""
msgid "Newest tracks"
msgstr ""
msgid "Next"
msgstr ""
msgid "Next track"
msgstr ""
@ -1656,6 +1659,9 @@ msgstr ""
msgid "Preview"
msgstr ""
msgid "Previous"
msgstr ""
msgid "Previous track"
msgstr ""

View File

@ -1432,6 +1432,9 @@ msgstr ""
msgid "Newest tracks"
msgstr ""
msgid "Next"
msgstr ""
msgid "Next track"
msgstr ""
@ -1662,6 +1665,9 @@ msgstr ""
msgid "Preview"
msgstr ""
msgid "Previous"
msgstr ""
msgid "Previous track"
msgstr ""

View File

@ -1462,6 +1462,9 @@ msgstr "Az új számok automatikusan fel lesznek véve."
msgid "Newest tracks"
msgstr "Legújabb számok"
msgid "Next"
msgstr ""
msgid "Next track"
msgstr "Következő szám"
@ -1694,6 +1697,9 @@ msgstr "Pretty OSD beállítások"
msgid "Preview"
msgstr "Előnézet"
msgid "Previous"
msgstr ""
msgid "Previous track"
msgstr "Előző szám"

View File

@ -1469,6 +1469,9 @@ msgstr "Le nuove tracce saranno aggiunte automaticamente."
msgid "Newest tracks"
msgstr "Tracce più recenti"
msgid "Next"
msgstr ""
msgid "Next track"
msgstr "Traccia successiva"
@ -1702,6 +1705,9 @@ msgstr "Opzioni OSD gradevole"
msgid "Preview"
msgstr "Anteprima"
msgid "Previous"
msgstr ""
msgid "Previous track"
msgstr "Traccia precedente"

View File

@ -1452,6 +1452,9 @@ msgstr ""
msgid "Newest tracks"
msgstr "最新のトラック"
msgid "Next"
msgstr ""
msgid "Next track"
msgstr "次のトラック"
@ -1684,6 +1687,9 @@ msgstr "Pretty OSD のオプション"
msgid "Preview"
msgstr "プレビュー"
msgid "Previous"
msgstr ""
msgid "Previous track"
msgstr "前のトラック"

View File

@ -1428,6 +1428,9 @@ msgstr ""
msgid "Newest tracks"
msgstr ""
msgid "Next"
msgstr ""
msgid "Next track"
msgstr ""
@ -1658,6 +1661,9 @@ msgstr ""
msgid "Preview"
msgstr ""
msgid "Previous"
msgstr ""
msgid "Previous track"
msgstr ""

View File

@ -1426,6 +1426,9 @@ msgstr ""
msgid "Newest tracks"
msgstr ""
msgid "Next"
msgstr ""
msgid "Next track"
msgstr ""
@ -1656,6 +1659,9 @@ msgstr ""
msgid "Preview"
msgstr ""
msgid "Previous"
msgstr ""
msgid "Previous track"
msgstr ""

View File

@ -1440,6 +1440,9 @@ msgstr ""
msgid "Newest tracks"
msgstr ""
msgid "Next"
msgstr ""
msgid "Next track"
msgstr "Neste spor"
@ -1670,6 +1673,9 @@ msgstr "Skrivebordsmeldinginnstillinger"
msgid "Preview"
msgstr ""
msgid "Previous"
msgstr ""
msgid "Previous track"
msgstr "Forrige spor"

View File

@ -1455,6 +1455,9 @@ msgstr ""
msgid "Newest tracks"
msgstr ""
msgid "Next"
msgstr ""
msgid "Next track"
msgstr "Volgende track"
@ -1689,6 +1692,9 @@ msgstr "Mooie OSD opties"
msgid "Preview"
msgstr "Voorbeeld"
msgid "Previous"
msgstr ""
msgid "Previous track"
msgstr "Vorige track"

View File

@ -1426,6 +1426,9 @@ msgstr ""
msgid "Newest tracks"
msgstr ""
msgid "Next"
msgstr ""
msgid "Next track"
msgstr "Pista seguenta"
@ -1656,6 +1659,9 @@ msgstr ""
msgid "Preview"
msgstr ""
msgid "Previous"
msgstr ""
msgid "Previous track"
msgstr "Pista precedenta"

View File

@ -1456,6 +1456,9 @@ msgstr "Nowe ścieżki będą automatycznie dodane."
msgid "Newest tracks"
msgstr "Najnowsze ścieżki"
msgid "Next"
msgstr ""
msgid "Next track"
msgstr "Następny utwór"
@ -1689,6 +1692,9 @@ msgstr "Opcje ładnych OSD (wyświetlanie-na-ekranie)"
msgid "Preview"
msgstr "Podgląd"
msgid "Previous"
msgstr ""
msgid "Previous track"
msgstr "Poprzedni utwór"

View File

@ -1466,6 +1466,9 @@ msgstr "As novas faixas serão adicionadas automaticamente."
msgid "Newest tracks"
msgstr "Músicas recentes"
msgid "Next"
msgstr ""
msgid "Next track"
msgstr "Faixa seguinte"
@ -1699,6 +1702,9 @@ msgstr "Opções do OSD"
msgid "Preview"
msgstr "Antevisão"
msgid "Previous"
msgstr ""
msgid "Previous track"
msgstr "Faixa anterior"

View File

@ -1461,6 +1461,9 @@ msgstr "Novas músicas serão adicionadas automaticamente."
msgid "Newest tracks"
msgstr "Músicas mais novas"
msgid "Next"
msgstr ""
msgid "Next track"
msgstr "Próxima faixa"
@ -1695,6 +1698,9 @@ msgstr "Opções de aviso estilizado"
msgid "Preview"
msgstr "Pré-visualização"
msgid "Previous"
msgstr ""
msgid "Previous track"
msgstr "Faixa anterior"

View File

@ -1427,6 +1427,9 @@ msgstr ""
msgid "Newest tracks"
msgstr ""
msgid "Next"
msgstr ""
msgid "Next track"
msgstr "Piesa următoare"
@ -1657,6 +1660,9 @@ msgstr ""
msgid "Preview"
msgstr ""
msgid "Previous"
msgstr ""
msgid "Previous track"
msgstr "Piesa precedentă"

View File

@ -1457,6 +1457,9 @@ msgstr "Новые треки будут добавлены автоматиче
msgid "Newest tracks"
msgstr "Новые треки"
msgid "Next"
msgstr ""
msgid "Next track"
msgstr "Следующая композиция"
@ -1689,6 +1692,9 @@ msgstr "Настройки OSD"
msgid "Preview"
msgstr "Предпросмотр"
msgid "Previous"
msgstr ""
msgid "Previous track"
msgstr "Предыдущая композиция"

View File

@ -1454,6 +1454,9 @@ msgstr "Nové skladby budú pridané autamticky."
msgid "Newest tracks"
msgstr "Najnovšie skladby"
msgid "Next"
msgstr ""
msgid "Next track"
msgstr "Nesledujca skladba"
@ -1685,6 +1688,9 @@ msgstr "Možnosti krásneho OSD"
msgid "Preview"
msgstr "Náhľad"
msgid "Previous"
msgstr ""
msgid "Previous track"
msgstr "Predchádzajúca skladba"

View File

@ -1456,6 +1456,9 @@ msgstr "Nove skladbe bodo samodejno dodane."
msgid "Newest tracks"
msgstr "Najnovejše skladbe"
msgid "Next"
msgstr ""
msgid "Next track"
msgstr "Naslednja skladba"
@ -1688,6 +1691,9 @@ msgstr "Možnosti za lep zaslonski prikaz"
msgid "Preview"
msgstr "Predogled"
msgid "Previous"
msgstr ""
msgid "Previous track"
msgstr "Predhodna skladba"

View File

@ -1431,6 +1431,9 @@ msgstr ""
msgid "Newest tracks"
msgstr ""
msgid "Next"
msgstr ""
msgid "Next track"
msgstr "Следећа нумера"
@ -1661,6 +1664,9 @@ msgstr ""
msgid "Preview"
msgstr "Преглед"
msgid "Previous"
msgstr ""
msgid "Previous track"
msgstr "Претходна нумера"

View File

@ -1460,6 +1460,9 @@ msgstr "Nya spår läggs till automatiskt."
msgid "Newest tracks"
msgstr "Nyaste spåren"
msgid "Next"
msgstr ""
msgid "Next track"
msgstr "Nästa spår"
@ -1690,6 +1693,9 @@ msgstr "Alternativ för Skön notifiering"
msgid "Preview"
msgstr "Förhandsvisning"
msgid "Previous"
msgstr ""
msgid "Previous track"
msgstr "Föregående spår"

View File

@ -1456,6 +1456,9 @@ msgstr "Yeni parçalar otomatik olarak eklenecektir."
msgid "Newest tracks"
msgstr "En yeni parçalar"
msgid "Next"
msgstr ""
msgid "Next track"
msgstr "Sonraki parça"
@ -1688,6 +1691,9 @@ msgstr "OSD seçenekleri"
msgid "Preview"
msgstr "Önizleme"
msgid "Previous"
msgstr ""
msgid "Previous track"
msgstr "Önceki parça"

View File

@ -1416,6 +1416,9 @@ msgstr ""
msgid "Newest tracks"
msgstr ""
msgid "Next"
msgstr ""
msgid "Next track"
msgstr ""
@ -1646,6 +1649,9 @@ msgstr ""
msgid "Preview"
msgstr ""
msgid "Previous"
msgstr ""
msgid "Previous track"
msgstr ""

View File

@ -1458,6 +1458,9 @@ msgstr "Нові композиції буде додано автоматичн
msgid "Newest tracks"
msgstr "Найновіші доріжки"
msgid "Next"
msgstr ""
msgid "Next track"
msgstr "Наступна доріжка"
@ -1690,6 +1693,9 @@ msgstr "Параметри OSD"
msgid "Preview"
msgstr "Перегляд"
msgid "Previous"
msgstr ""
msgid "Previous track"
msgstr "Попередня доріжка"

View File

@ -1430,6 +1430,9 @@ msgstr ""
msgid "Newest tracks"
msgstr ""
msgid "Next"
msgstr ""
msgid "Next track"
msgstr "下一音轨"
@ -1660,6 +1663,9 @@ msgstr ""
msgid "Preview"
msgstr "预览"
msgid "Previous"
msgstr ""
msgid "Previous track"
msgstr "上一音轨"

View File

@ -1431,6 +1431,9 @@ msgstr ""
msgid "Newest tracks"
msgstr "最新歌曲"
msgid "Next"
msgstr ""
msgid "Next track"
msgstr "下一首歌曲"
@ -1661,6 +1664,9 @@ msgstr "漂亮的 OSD 選項"
msgid "Preview"
msgstr "試聽"
msgid "Previous"
msgstr ""
msgid "Previous track"
msgstr "上一首歌曲"

View File

@ -30,6 +30,7 @@
#include <QFileDialog>
#include <QLabel>
#include <QMenu>
#include <QPushButton>
#include <QtDebug>
const char* EditTagDialog::kHintText = QT_TR_NOOP("(different across multiple songs)");
@ -97,6 +98,15 @@ EditTagDialog::EditTagDialog(QWidget* parent)
IconLoader::Load("zoom-in"), tr("Show fullsize..."),
this, SLOT(ZoomCover()));
ui_->summary_art_button->setMenu(cover_menu_);
// Add the next/previous buttons
previous_button_ = new QPushButton(IconLoader::Load("go-previous"), tr("Previous"), this);
next_button_ = new QPushButton(IconLoader::Load("go-next"), tr("Next"), this);
ui_->button_box->addButton(previous_button_, QDialogButtonBox::ResetRole);
ui_->button_box->addButton(next_button_, QDialogButtonBox::ResetRole);
connect(previous_button_, SIGNAL(clicked()), SLOT(PreviousSong()));
connect(next_button_, SIGNAL(clicked()), SLOT(NextSong()));
}
EditTagDialog::~EditTagDialog() {
@ -130,7 +140,10 @@ bool EditTagDialog::SetSongs(const SongList& s) {
ui_->song_list->selectAll();
// Hide the list if there's only one song in it
ui_->song_list->setVisible(data_.count() != 1);
const bool multiple = data_.count() != 1;
ui_->song_list->setVisible(multiple);
previous_button_->setEnabled(multiple);
next_button_->setEnabled(multiple);
return true;
}
@ -445,3 +458,13 @@ void EditTagDialog::SetAlbumArt(const QString& path) {
backend_->UpdateManualAlbumArtAsync(song.artist(), song.album(), path);
UpdateSummaryTab(song);
}
void EditTagDialog::NextSong() {
int row = (ui_->song_list->currentRow() + 1) % ui_->song_list->count();
ui_->song_list->setCurrentRow(row);
}
void EditTagDialog::PreviousSong() {
int row = (ui_->song_list->currentRow() - 1) % ui_->song_list->count();
ui_->song_list->setCurrentRow(row);
}

View File

@ -33,6 +33,7 @@ class Ui_EditTagDialog;
class QItemSelection;
class QLabel;
class QPushButton;
class EditTagDialog : public QDialog {
Q_OBJECT
@ -58,6 +59,9 @@ private slots:
void UnsetCover();
void ZoomCover();
void PreviousSong();
void NextSong();
private:
struct Data {
Data(const Song& song = Song()) : original_(song), current_(song) {}
@ -114,6 +118,9 @@ private:
QAction* download_cover_;
QAction* unset_cover_;
QAction* show_cover_;
QPushButton* previous_button_;
QPushButton* next_button_;
};
#endif // EDITTAGDIALOG_H

View File

@ -602,9 +602,9 @@
</widget>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<widget class="QDialogButtonBox" name="button_box">
<property name="standardButtons">
<set>QDialogButtonBox::Discard|QDialogButtonBox::Reset|QDialogButtonBox::Save</set>
<set>QDialogButtonBox::Discard|QDialogButtonBox::Save</set>
</property>
</widget>
</item>
@ -638,7 +638,7 @@
</resources>
<connections>
<connection>
<sender>buttonBox</sender>
<sender>button_box</sender>
<signal>accepted()</signal>
<receiver>EditTagDialog</receiver>
<slot>accept()</slot>
@ -654,7 +654,7 @@
</hints>
</connection>
<connection>
<sender>buttonBox</sender>
<sender>button_box</sender>
<signal>rejected()</signal>
<receiver>EditTagDialog</receiver>
<slot>reject()</slot>