musescore/MuseScore — pull request #445 by mgavioli (2013-08-17 23:24:58+00:00)
Title: Re-factor presets and staff types.

#### Summary:

1. Built-in staff types have been removed.

1. Presets are internally used as source for the staff types of a new score, to match data in Instruments.xml and as reference to check for modifications.

1. Each new score is given by default one staff type for each preset; they use the same names as the presets.

1. The Instrument page of the New Score Wizard lists (under the name of "Staff types") the default staff types applicable to the instrument (actually it lists the preset, as the score does not have any staff type yet).

1. The "Add | Instruments" dlg box lists all the staff types applicable to the instrument: = the list of 4) + any user-created staff type.

1. The Staff Properties dlg box lists all the staff types applicable to the instrument: = list in 5)

1. The Staff Type Editor lists all the staff types: = lists in 5) and 6), but not filtered by applicability to a given instrument.

This should ensure consistency among the several lists of staff types and avoid duplication of similar items:

#### Terminology:

1. A new staff type created in the editor is named by default with the group name ("Standard-", "Perc-", "Tab-") + the index of the new type in its group + the suffix "[*]" marking a user customisation (ex.: "Tab-10 [*]"). The user is anyway able to rename it, if he want.

1. The pitched staff type has been renamed everywhere (hopefully!) to "Standard".

1. The term 'preset' have been removed from the UI, except from the Staff Type Editor where it keeps its usual meaning of ready-made collection of parameters.

#### Notes:

1. The commit affects many files, but a fair number of them have only changes in names of literals. The files with significant code changes are:
*) libmscore/score.cpp
*) libmscore/stafftype.cpp/.h
*) mscore/editstafftype.cpp (code for naming a new staff type)
*) mscore/instrdialog.cpp (building type list)

1. As score files store staff type indications as integer indices and the number and order of new default staff types is different from the old built-in types, there is a compatibility issue with old 2.0 scores using percussion and tab staves. In Score::read() (libmscore/scorefile.cpp), there is a rudimentary attempt to at least avoid crashes! Old scores will need manual fix anyway.

1. There should not be any (new) compatibility issue with 1.x scores, as they did not use staff types.