Skip to content

Commit

Permalink
Merge pull request #40 from worldwideweary/3.x-www-0018-ShortcutForPr…
Browse files Browse the repository at this point in the history
…eferences

New Command: Shortcut for Preferences Dialog
  • Loading branch information
worldwideweary committed Oct 1, 2024
2 parents 3383728 + fe1e8e2 commit f567a17
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion mscore/musescore.h
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,6 @@ class MuseScore : public QMainWindow, public MuseScoreCore {
void leaveFeedback(QString medium);
void openRecentMenu();
void selectScore(QAction*);
void startPreferenceDialog();
void preferencesChanged(bool fromWorkspace = false, bool changeUI = true);
void seqStarted();
void seqStopped();
Expand Down Expand Up @@ -607,6 +606,7 @@ class MuseScore : public QMainWindow, public MuseScoreCore {
void changeWorkspace(Workspace* p, bool first=false);
void mixerPreferencesChanged(bool showMidiControls);
void checkForUpdates();
void startPreferenceDialog();
void restartAudioEngine();

public:
Expand Down
3 changes: 3 additions & 0 deletions mscore/scoreview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2166,6 +2166,9 @@ void ScoreView::cmd(const char* s)
};

static const std::vector<ScoreViewCmd> cmdList {
{{"start-preference-dialog"}, [](ScoreView* /*cv*/, const QByteArray&) {
mscore->startPreferenceDialog();
}},
{{"escape"}, [](ScoreView* cv, const QByteArray&) {
cv->escapeCmd();
}},
Expand Down
7 changes: 7 additions & 0 deletions mscore/shortcut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,13 @@ Shortcut Shortcut::_sc[] = {
Qt::WindowShortcut,
ShortcutFlags::A_SCORE
},
{
MsWidget::MAIN_WINDOW,
STATE_NORMAL | STATE_NOTE_ENTRY | STATE_EDIT,
"start-preference-dialog",
QT_TRANSLATE_NOOP("action","Start Preferences Dialog…"),
QT_TRANSLATE_NOOP("action","start preferences dialog")
},
{
MsWidget::MAIN_WINDOW,
STATE_NORMAL | STATE_NOTE_ENTRY | STATE_EDIT | STATE_PLAY,
Expand Down

0 comments on commit f567a17

Please sign in to comment.