-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unrevert "Create wmainmenubar controls in coreservices so they are available to controllers on startup" #4661
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -423,6 +423,34 @@ void CoreServices::initialize(QApplication* pApp) { | |||||
|
||||||
m_pTouchShift = std::make_unique<ControlPushButton>(ConfigKey("[Controls]", "touch_shift")); | ||||||
|
||||||
// The following UI controls must be created here so that controllers can bind to them | ||||||
// on startup. | ||||||
m_uiControls.clear(); | ||||||
|
||||||
struct UIControlConfig { | ||||||
ConfigKey key; | ||||||
bool persist; | ||||||
bool defaultValue; | ||||||
}; | ||||||
const std::vector<UIControlConfig> uiControls = { | ||||||
{ConfigKey("[Master]", "skin_settings"), false, false}, | ||||||
{ConfigKey("[Microphone]", "show_microphone"), true, true}, | ||||||
{ConfigKey(VINYL_PREF_KEY, "show_vinylcontrol"), true, false}, | ||||||
{ConfigKey("[PreviewDeck]", "show_previewdeck"), true, true}, | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
hidden by default in all official skins. |
||||||
{ConfigKey("[Library]", "show_coverart"), true, true}, | ||||||
{ConfigKey("[Master]", "maximize_library"), true, false}, | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
This is not persistent with official skins anyway. |
||||||
{ConfigKey("[Samplers]", "show_samplers"), true, true}, | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hidden by default, shown in Deere. If we add this and 'Show Effect Rack' the View menu would be complete, wouldn't it? |
||||||
{ConfigKey("[EffectRack1]", "show"), true, true}, | ||||||
{ConfigKey("[Skin]", "show_4effectunits"), true, false}, | ||||||
{ConfigKey("[Master]", "show_mixer"), true, true}, | ||||||
}; | ||||||
m_uiControls.reserve(uiControls.size()); | ||||||
for (const auto& row : uiControls) { | ||||||
m_uiControls.emplace_back(std::make_unique<ControlPushButton>( | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. persist = true already fetches the last value from the config. Line 65 in c7b4dbb
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ah got it. Fixed. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hm, does that mean we need to pick the first-run defaults here? Seems so |
||||||
row.key, row.persist, row.defaultValue)); | ||||||
m_uiControls.back()->setButtonMode(ControlPushButton::TOGGLE); | ||||||
} | ||||||
|
||||||
// Load tracks in args.qlMusicFiles (command line arguments) into player | ||||||
// 1 and 2: | ||||||
const QList<QString>& musicFiles = m_cmdlineArgs.getMusicFiles(); | ||||||
|
@@ -597,6 +625,8 @@ void CoreServices::finalize() { | |||||
|
||||||
m_pTouchShift.reset(); | ||||||
|
||||||
m_uiControls.clear(); | ||||||
|
||||||
m_pControlIndicatorTimer.reset(); | ||||||
|
||||||
t.elapsed(true); | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.