"Don't Show page number of first page" is ignored when loading score from 1.x

• May 24, 2013 - 08:19
Type
Functional
Severity
S4 - Minor
Status
closed
Project

"Don't Show page number of first page" is ignored when loading score from 1.x.
And that option doesn't exists at all anymore, you can only prevent the entire footer to not be shown, this then would hide the copyright text too.
Found with 0326f57

And a feature request: I'd like an option to not show the 1st page number, if there is only one page (and 'start with page x' isn't used, as it doesn't make any sense then), but show it when there are more.


Comments

Maybe a new variable, e.g. $P (capital p) could be introduced for this? Showing the number only if $n is greater than 1?
Something like this in libmscore/page.cpp around line 934:
{syntaxhighlighter brush:cpp}
case 'P':
if (_score->pages().size() > 1)
d += QString("%1").arg(pageno);
break;
{/syntaxhighlighter}

(entirely untested)

Since it's also the case that some would want the copyright tect on the first pge only, I think what really makes most sense is to have separate "first page footer".

If we go this way... What about first page header? What about having a different footer on odd and even pages? or one out of 3? It's infinite... The only proper way would be to have page style a la libre office... do we really want this?

We had it fof page number in 1.x, not having it in 2.0 would be a regression.
My $P approach might kill two birds with one stone (and might even become the default?)
Only thing missing is the translation of a 1.3 score not wanting a page number on first page into a $P (at least for my favourite use case)

Yes, I realize my suggestion is a can of worms. Still, I would say that given how common this particular use case is - desire for copyright and no page number on first page footer, page number but no copyright on subsequent page footers - I would say it's worth going this far. And then, sure, first page header, do that too so people can have page numbers at top if they want. But then stop. No one expects MuseScore to be LibreOffice (well, I suppose some do), but we should handle the most important use case.

Jojo-Schmitz's solution would be an acceptable substitute though, especially if extended for copyright also. Like, if $P meant, "page number for pages other than 1" and $C meant "copyright but only on first page". Kludgy to have these be opposite of each other, and maybe someone can improve the syntax*, but at least it solves the problem and is ridiculously cheap.

To me, the [problem is important enough to solve, but not important enough to worry about coming up with the most optimally flexible or elegant solution.

*If someone doesn't like the way $P and $C as described end up being opposites and wants something more elegant, how about we do something like allow a page range to be specified after the keyword. So $p[2-] would mean, page number but only on pages 2 & up, $c[1] would mean copyright but only on page 1.

Hmm, those text macros are an entirely new feature in 2.0, so we're not bound to any backward compatibility, right?
So I'd propose the $p to mean the same as the default in 1.3:
a) be the default setting for even/odd footer (like it is now)
b) don't show page number on first page (changed from what it is now)
Question is how to deal with 1.x score that changed the default to show on first page too

$P would then mean: show page number on 1st page too

Currently there is no $c for copyright, only a $:copyright:, but I think it'd be common enough to warrant a shortcut, so we could add $c for copyright on all pages and $C for copyright only on first page

The hint in the dialog about those macros is already is a nightmare for translator, as it is sort of a table formatted with linefeeds, spaces and tabs, pretty difficult to get to render correctly. with the changes proposed here it'd become even more convoluted. It is also something that IMHO belongs into the handbook rather than into a dialog, so I propose to remove it. Will probably do this in a separate step, maybe as part of #23038: Default dialogs height and position are poorly adapted for use on small screen netbook

Status (old) active patch (code needs review)

See PR #756
Should now also be 1.x compatible, i.e. read and respect the showPageNuberOne and the pageNumberOddEven settings

I've removed the even/odd part, as it wasn't working in 1.3 either (there we had a separate style setting for even/odd page numbers, in addition to an even/odd checkbox and apparently numbers were regarded odd or even irrespectively of the setting of that checkbox)

Status (old) fixed active

It seems the translation of that macro tooltip doesn't work properly, not sure why.
Is it because it is a static Qstring?