Merge lp://qastaging/~jasperge/openlp/versenumbers into lp://qastaging/openlp

Proposed by Jasper van Nieuwenhuizen
Status: Needs review
Proposed branch: lp://qastaging/~jasperge/openlp/versenumbers
Merge into: lp://qastaging/openlp
Diff against target: 269 lines (+136/-1)
5 files modified
openlp/core/lib/serviceitem.py (+4/-0)
openlp/core/ui/slidecontroller.py (+80/-0)
openlp/plugins/songs/lib/mediaitem.py (+39/-1)
openlp/plugins/songs/lib/songstab.py (+12/-0)
openlp/plugins/songs/songsplugin.py (+1/-0)
To merge this branch: bzr merge lp://qastaging/~jasperge/openlp/versenumbers
Reviewer Review Type Date Requested Status
Tomas Groth Needs Fixing
OpenLP Core Pending
Review via email: mp+255439@code.qastaging.launchpad.net

Description of the change

This branch adds the ability to display the verse numbers of a song in the footer, like this: "<song title>: 1, 2, 3". The current verse number is bold. Chorus, Bridge etc. are only displayed in the footer if they are currently on the screen. So for example if you display the chorus, it might look like this: "<song title>: 1, 2, Chorus, 3". In the unlikely event of a second chorus, bridge etc. the number will be added: "Chorus 2".

To post a comment you must log in.
Revision history for this message
Tomas Groth (tomasgroth) wrote :

Hi Jasper - I think this must be your first merge request, right? Welcome onboard! It's always great to see new contributors!
As you probably know we are currently preparing for our 2.2 release, and are in a feature freeze, so your changes might not get merged until after 2.2 is released.

I did some testing of your branch and found an issue. For a song which had a verseorder like this: "C1 C1 V1 V2 V3" the footer looked like "Chorus, 1, 2, 3" for the first 2 slides (the chorus'es), but when I reached the 3rd slide with the first verse it changed to "1, 2, 3" - the chorus disappeared.

You also need to make some tests to prove that your code works as expected. Take a look at the existing tests under the "tests" folder for inspiration.

review: Needs Fixing
Revision history for this message
Jasper van Nieuwenhuizen (jasperge) wrote :

Hi Tomas, Yes and thank you!

The issue you found is actually a feature. :) The reason for this is, that if you have 5 verses for example with the chorus after every verse, you get a very long text: "1, Chorus, 2, Chorus, 3, Chorus, 4, Chorus, 5, Chorus". To be honest, I've adopted this from OpenSong and have no idea how (and if) other programs have implemented this. Ideas and suggestions are welcome.

I will have a look at writing tests.

A question that came to my mind after I submitted the merge request: should I store the verse numbers in the `raw_footer`? At the moment I change the title (the first element in the `raw_footer`) to include the verse numbers. But displaying the verse numbers is really only a display feature and not a property of the song. So I could leave the `raw_footer` alone. For the end user this shouldn't change a thing, but it seems the proper thing to do.

Unmerged revisions

2531. By Jasper van Nieuwenhuizen

Fix: when opening a service file wih songs and the songs plugin is not loaded, display verse numbers obeys the capability of the saved service item (song)

2530. By Jasper van Nieuwenhuizen

Fixed display of verse numbers for translations
Opening a service file now obeys the display verse settings

2529. By Jasper van Nieuwenhuizen

Added the option to display verse numbers after the title of a song in the footer

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.