Skip to content

Commit

Permalink
Make the Year spinbox in the music metadata editor easier to use.
Browse files Browse the repository at this point in the history
* Add zero (no year) as a special value
* Change the range from 0-9999 to 1000-Current Year
* Reverse the order so that we start at the current year and spin back

Technically the year in metadata indicates the year of recording not
the year of composition, so we could pick a minimum year from the
point in time when the first audio recordings were being made
(~1860s).
  • Loading branch information
stuartm committed Oct 9, 2012
1 parent ef9f4f7 commit 7686ac7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions mythplugins/mythmusic/mythmusic/editmetadata.cpp
Expand Up @@ -359,12 +359,13 @@ bool EditMetadataDialog::Create(void)
return false;
}

m_yearSpin->SetRange(0, 9999, 1);
m_trackSpin->SetRange(0, 9999, 1);
m_yearSpin->SetRange(QDate::currentDate().year(), 1000, 1);
m_yearSpin->AddSelection(0, "None");
m_trackSpin->SetRange(0, 999, 1);

if (m_ratingSpin)
{
m_ratingSpin->SetRange(0, 10, 1);
m_ratingSpin->SetRange(0, 10, 1, 2);
connect(m_ratingSpin, SIGNAL(itemSelected(MythUIButtonListItem*)),
SLOT(ratingSpinChanged(MythUIButtonListItem*)));
}
Expand Down

0 comments on commit 7686ac7

Please sign in to comment.