-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Consolidate midi config widgets & move them out of the core #2289
Conversation
By the way, |
eced6e2
to
45bff92
Compare
We should really consider writing an upgrade path for 1.1 -> 1.2 for this via |
@tresf doesn't that just apply to upgrading projects from one version of lmms to the next? Or does that apply to the |
Also, you've got to sit back and admire the documentation for that file for a few seconds: (line 2)
|
Yes, my mistake... this is loaded as just a plain XML Tree node via -Tres |
Ah, but it does have an upgrade path: src/core/ConfigManager.cpp#L109. I'll insert the appropriate logic there. |
👍 |
Newest commit supports an upgrade path & Travis is happy :-) While I was adding a new Off-topic: ConfigManager stores its values as <MidiAlsaRaw device="default"/>
<Midialsaseq device="default"/>
<app displaydbv="0" configured="1" language="en" nomsgaftersetup="0" disablebackup="0" nommpz="0"/>
... So the fields of any "class" (MidiAlsaRaw, Midialsaseq, etc) are stored as a list of Unless somebody knows a good reason why we use the current internal representation, I'll go ahead and open a ticket for this. |
Not sure if that's necessary, see #2109. Looks like a pretty complete rewrite of everything config related. |
4c3e326
to
f6b696f
Compare
Just rebased this against master (to allow for auto-merge). Pending any further discussion, I'll merge this PR myself sometime over the weekend - it's been open for 2 weeks now. |
Sorry @Wallacoloo somehow I had missed the new commits. I left a comment about the project version comparison. |
Next release candidate will be named 1.1.90
@tresf not a problem! I've addressed your line note. |
👍 |
Consolidate midi config widgets & move them out of the core
This takes
MidiAlsaRaw::setupWidget
,MidiAlsaSeq::setupWidget
,MidiApple::setupWidget
,MidiOss::setupWidget
,MidiDummy::setupWidget
andMidiWinMM::setupWidget
and implements them all through a genericMidiSetupWidget
class.This offers the advantage of removing a significant amount of duplicated code (thus making it easier to change the setup widget appearance for all midi backends) as well as further decoupling the core from the gui.
Behaviorally, nothing has changed except:
ConfigManager::inst()->getValue("MidiAlsaRaw", "Device")
. Now, the field is("MidiAlsaRaw", "device")
, using a lowercase "device" just like all the other backends. The consequence is that the user will lose their midi device setting the first time they open LMMS after applying this patch if using MidiAlsaRaw (very minor side-effect IMO).For context, all of the code changed is just responsible for showing the below "Settings for ..." section: