Commit graph

73 commits

Author SHA1 Message Date
anatoly-os
3f1ee5df27 Fix inconsistent behaviour when working with edited workspaces
* Introduce visible workspaces that are workspaces to be shown in GUI
* Introduce method `findByTranslatableName` to be used when seeking `sourceWorkspace`
2019-10-21 16:33:40 +02:00
anatoly-os
88d6c46df2 Refactor Workspace class
* Extract `WorkspacesManager` class that manages global interactions with workspaces (using static methods for now)
* Introduce `find` method
* Rewrite `workspaces()` method. Now, it returns const ref.
* Extract `initWorkspaces` method to manage updating workspaces clearer
2019-10-21 16:28:37 +02:00
Dmitri Ovodok
4f42e2c55a Rework workspaces editing workflow
- Workspaces are saved automatically after each change (prevents
   possible data loss after MuseScore crashes);
 - Read-only workspaces are automatically saved to different location
   with "edited" suffix;
 - Edited versions of Basic and Advanced workspace hide the default
   ones.
2019-10-17 21:53:48 +02:00
anatoly-os
e2f3431e03 fix clang warnings
But the ones related to deprecations in third-party libs

* Remove unused variables
* Prevent calling non-virtual destructors
* Prevent the warning "Moving a temporary object prevents copy elision" by removing std::move call
* disable "`register` is deprecated" warning related to the 3rd party code
2019-10-14 19:01:59 +02:00
Dmitri Ovodok
5be3c72fff Make "Reset Palette" action reset to a state stored in workspace file 2019-10-14 18:18:30 +02:00
Dmitri Ovodok
9ec7fbe402 Rewrite Workspace::rename() in a less dangerous way
The new way avoids deleting the old workspace file before creating
the new one which should potentially prevent data loss in case the
new file cannot be created.
2019-10-14 18:17:55 +02:00
Dmitri Ovodok
22c4808aa2 fix losing workspace on renaming, rewrite fix for a crash on uninstalling MDL
The original fix: efc5836f28
2019-10-14 18:17:50 +02:00
Dmitri Ovodok
858a2ae60e Remove old PaletteBox widget 2019-10-01 12:48:58 +02:00
Dmitri Ovodok
8a28bd8714 Add initial version of redesigned palettes 2019-08-31 14:16:19 +03:00
Dmitri Ovodok
91b4788037 fix #291986: fix a crash on removing a custom workspace via menu
A more accurate version of 6a5a7cbcab
2019-07-10 23:02:01 +03:00
Dmitri Ovodok
e9dca95f64 fix #286727: prevent empty menu entries in custom workspaces
Some menu entries (e.g. plugins) are added independently of the
workspaces framework so do not have any corresponding strings
registered. Writing them to .workspace file makes empty menu entries
appear in custom workspaces. This commit fixes that by not storing
such entries in workspace files.
2019-07-02 15:34:48 +03:00
Dmitri Ovodok
6a5a7cbcab fix #291460: fix plugins not appearing in menu
QMenuBar::clear() does not delete the corresponding QMenu objects
from the list of its children. Moreover, these QMenu's seem to never
be deleted. This commit deletes the obsolete QMenu objects manually.
2019-07-02 15:26:22 +03:00
anatoly-os
968ca5e458 Fix crash on switching menus and workspaces with Qt 5.9.* 2019-06-27 18:20:26 +02:00
Matthew Elton
3c3559dbad Concert Pitch - fix styling to highlight blue like icon when ON
Changes provide opt-in styling for toolbar button text so that, like
toolbar button icons, they change color  as they change state.

- Stylesheet changes to allow text on toolbar buttons to change color
when pressed (and other cases, e.g. being disabled). QToolButtons with
the property "iconic-text" set to true get this new behaviour. (Note: at
present the color values are from the hard-coded color values in
miconengine.cpp. rather than from a stylesheet / theme file.)

- Applied the "iconic-text" property to the "Concert Pitch" button so its
text now changes color in the same way as icon images do on other toolbar
buttons.

- Ensure the "Concert Pitch" button changes height in line with toolbar
buttons that contain icons. This is done in a similar way - and at the
same time - that the Zoom Options and View Mode dropdown heights are
adjusted. It's required because the "Concert Pitch" button, like the Zoom
Option and View Mode buttons, has no icon that would generate the height
changes for the button.
2019-06-18 22:41:05 +01:00
anatoly-os
07e7d2b4dd Default workspaces appear duplicated when installing MDL
Default palettes were appended twice because of incorrect usage of the `break;` statement.

Fix obvious mistake in setting `translate` variable value.
2019-04-10 20:21:27 +02:00
anatoly-os
efc5836f28 fix #279801: crash on uninstalling MDL extension
Set index in the workspaces dropdown widget to 0 when selected workspace vanishes.
Avoid warning message when trying to save a non existing workspace
2019-04-10 20:20:07 +02:00
anatoly-os
d6c19a68c7 fix rare blank palette issue
Manually merged the fix from PR #4612.

Check the last sentence in the comment: https://github.com/musescore/MuseScore/pull/4612#issue-247224823
2019-03-07 12:08:42 +02:00
Joachim Schmitz
48e4952030 replacing "..." (3 dots) with "…" (ellipsis)
see https://musescore.org/en/node/280844
2019-01-02 13:38:38 +01:00
anatoly-os
295ffe8ed1 fix crash when creating workspace with GUI Preferences
Make it possible to read/write qlonglong values in XmlWriter/XmlReader
2018-12-21 15:56:03 +02:00
anatoly-os
cad6b0a570 fix Advanced/Basic workspaces translation 2018-12-21 15:18:51 +02:00
anatoly-os
36b91aeb73 add Advanced and Basic strings to be translated 2018-12-21 13:26:23 +02:00
JoshuaBonn1
889ea40540 Fix #280048: Applying changed preferences restores default UI
Before a switch is made, save the global values if used.
2018-12-16 13:20:59 -08:00
Dmitri Ovodok
c6fcdaf14f Fix a possible uninitialized variable usage
Fixes the possible reason for a crash reported in the mailing list:
https://sourceforge.net/p/mscore/mailman/message/36468097/
2018-12-02 01:55:28 +02:00
JoshuaBonn1
0647b5b0cb Fix #278873: GUI preferences with custom workspace not saving/loading after change 2018-11-28 07:29:19 -08:00
Dmitri Ovodok
2085c89329 fix #277747: correct translating workspaces names 2018-11-07 11:12:16 +02:00
Dmitri Ovodok
62d05e1243 fix #277697: Remove some redundant operations on updating styles and icons 2018-11-07 11:11:52 +02:00
ws
89ac0a6115 Fix page layout. "layoutPage()" was sometimes called with negativ restHeight
resulting in fancy system positions.
2018-11-02 12:02:01 +01:00
JoshuaBonn1
bf5e1aee70 Expand workspace functionality
The workspace now can save the following:
- Palettes
- Toolbars
- Menubar
- GUI preferences
- GUI components
Also, Basic and Advanced workspaces are no longer hard coded.
See the following blog posts for more info:
Project Description: https://musescore.org/en/user/1190941/blog/2018/04/26/gsoc-2018-beginner-mode-and-tutorial-creation-project-description
Week 1: https://musescore.org/en/user/1190941/blog/2018/05/20/gsoc-2018-beginner-mode-and-tutorial-creation-week-1
Week 2: https://musescore.org/en/user/1190941/blog/2018/05/28/gsoc-2018-beginner-mode-and-tutorial-creation-week-2
Week 3: https://musescore.org/en/user/1190941/blog/2018/06/04/gsoc-2018-beginner-mode-and-tutorial-creation-week-3
Week 4: https://musescore.org/en/user/1190941/blog/2018/06/12/gsoc-2018-beginner-mode-and-tutorial-creation-week-4
Week 5: https://musescore.org/en/user/1190941/blog/2018/06/17/gsoc-2018-beginner-mode-and-tutorial-creation-week-5
2018-10-29 19:21:54 +01:00
JoshuaBonn1
7b7f34a507 fix #272441 Toolbar Editor: Toolbar duplication
The toolbar editor now behaves correctly, each toolbar may be edited
Playback controls and File operations are now saved to the workspace
2018-10-29 19:19:05 +01:00
Joachim Schmitz
fe50c85097 fix #275218: fix MSVC C4458 warnings
reg. a declaration shadowing a class member,
"Warning C4458: declaration of 'XXX' hides class member"
2018-09-27 17:38:20 +02:00
Joachim Schmitz
474e8152cd fix #275218: fix MSVC C4456 warnings
reg. a declaration shadowing a previously declared local
variable,
"Warning C4456: declaration of 'XXX' hides previous local
declaration"
2018-09-27 17:38:19 +02:00
Joachim Schmitz
f7685e28c1 Fix some warnings C4456 and C4458 2018-08-17 15:06:15 +02:00
lasconic
fdf55e1a2f fix #273558: Add a way to uninstall extensions 2018-07-09 18:59:08 +02:00
lasconic
94d5442272 fix #273032: Provide an easy way to install soundfont, templates, etc.
Add workspace support in extension.
Use constants instead of magic strings for extension directories
2018-07-09 18:59:08 +02:00
anatoly-os
8915b35db2 Fixed clang warnings:
- removed obsolete Score* _score from XmlReader
- removed not used variables
- added braces for initializer list
- fixed using similar var names in one scope
2018-02-21 19:41:36 +01:00
Dag Henning Liodden Sørbø
2b6cb8b432 Change to new preferences model
The old Preferences struct holding all preferences are removed in favor of a
new Preferences class which acts as a proxy for QSettings. The settings stored
in QSettings are accessed directly through access methods like getBool(key),
getInt(key), etc. and changed with setPreference(key, value).

Since we are using QSettings directly the preferences are stored automatically
without the need for a custom write() and read() method like before.

The preferences.cpp/.h and prefdialog.cpp/h are refactored to have fewer
responsibilities than before. The Preferences class are all about storing and
retrieving preferences - it should not contain any code to handle any other
aspect of MuseScore.

Testing:
The Preferences class can be used in tests. All preferences are initialized with
default values in mtest. If a test requires that a preference has a specific
value it can be changed using setPreference() for that single test. In the tests
the preferences are stored in memory only.

The Preference class is supposed to be used as a singleton. In preferences.h an
'extern Preferences preferences' is set and it is defined in preferences.cpp. All
files which includes preferences.h have access to the 'preferences' singleton
and should use this to get and set preferences.
2018-02-08 16:59:10 +01:00
IsaacWeiss
a715fb24c8 Fix #184381: Unnecessary "MuseScore: " prepended to most window titles and wrong title of Split Staff dialog
Also remove spacer at top of Section Break Properties
2017-03-28 12:54:49 -04:00
Werner Schweer
c5f46bb208 rename Xml() -> XmlWriter() 2016-11-19 11:51:21 +01:00
Werner Schweer
bb7d535ce5 add score ptr to XmlReader and Xml 2016-11-19 10:31:14 +01:00
Joachim Schmitz
d0e8152388 fix #121746: ask for confirmation before deleting a workspace
and change Qt's `foreach(a, b)` to C++11's `for (a : b)`
Also improve the delete palette message
2016-08-22 15:24:56 +02:00
ws
e9c2c7685a make note input toolbar configurable 2016-05-31 17:45:01 +02:00
Joachim Schmitz
a862889de5 fix #90811: allow dots in filenames
rather than truncating and cutting off anything after the 1st dot of a
filename.
2015-12-16 10:24:34 +01:00
Joachim Schmitz
6aacfb1729 fix #63366: prevent illegal workspace names 2015-06-02 09:09:57 +02:00
Joachim Schmitz
83c6e2d023 remove some superfluos QString() calls 2014-12-09 08:56:24 +01:00
AntonioBL
b27d45cad6 fix #38101 and #36651 2014-11-04 17:36:11 +01:00
Joachim Schmitz
36090c7fcc fix capitalisation of various strings in dialogs
to comply with
http://musescore.org/developers-handbook/design/user-interface-text-style-guide.
Also change "Spatium" and "Space" to "Staff space" (where user visible),
see also discussion at http://musescore.org/en/node/36891.
2014-10-17 15:40:04 +02:00
lasconic
e2a6fbd877 fix selection of default workspace on first run 2014-09-12 13:01:39 +02:00
Joachim Schmitz
03a928098a fix #23345: translate workspace names
as  4f11576  was not enough.
2014-09-02 16:32:34 +02:00
ws
abc70ae014 remove 'default' workspace 2014-08-29 13:41:42 +02:00
ws
4f1157655e mark Advanced/Basic translatable 2014-08-29 11:17:58 +02:00