It is now possible to change volume of notification sounds.
BUG: 355470
FIXED-IN: 5.7.0
Plasma: Design | |
Plasma |
It is now possible to change volume of notification sounds.
BUG: 355470
FIXED-IN: 5.7.0
Automatic diff as part of commit; lint not applicable. |
Automatic diff as part of commit; unit tests not applicable. |
Event sounds are usually notifications, right? If so, I'd just use the notifications icon (preferences-desktop-notification)
src/context.cpp | ||
---|---|---|
154 | Braces pls | |
449 | Avoid creating a temporary list keys() just to find something in it, use constFind and std::distance | |
src/eventstream.cpp | ||
29–32 ↗ | (On Diff #3431) | Initializer list: |
41 ↗ | (On Diff #3431) | const |
src/kcm/package/contents/ui/StreamListItem.qml | ||
74 | I can't move notification sounds to another device? :( |
src/kcm/package/contents/ui/StreamListItem.qml | ||
---|---|---|
74 | omg i had lengthy answer and phab ate it... So in short, you can't even do that in pavucontrol. There is an issue with module-stream-restore streams, because its device may be even device that is not currently available (the structure holds the device name, not its index), but in our GUI it only lists available devices. I'll rewrite this patch to make it less hacky on the C++ side (it now derives from SinkInput, but the underlying pa object differs a lot from the sinkinput object) and try to think of a way to solve that issue. |
src/context.cpp | ||
---|---|---|
449 | You can merge this one and the earlier isNew i think. Something like: auto result = m_sinkInputs.data().constFind(eventRoleIndex); if (result == m_sinkInputs.data().constEnd()) { emit m_sinkInputs.added(... something ...); } else { emit m_sinkInputs.updated(result.value() .. or something like it); } You have to change it obviously, but you can make it nicer by using constFind | |
src/kcm/package/contents/ui/StreamListItem.qml | ||
57–66 | Just a preference, feel free to ignore. In fact, you might be able to tweak PulseObject.name and and just use that as text. | |
src/maps.h | ||
74 | This isn't a neat way. You're returning the data in a writeable way so that you can add items later on. I think it would be cleaner and better if you simply add an "insertEntry" function (just like you already have an updateEntry and a removeEntry). Then use the new "insertEntry" where you use this data() method instead. | |
77–78 | Big pros if you rewrite this to a: auto result = m_data.constFind(t); if (result != m_data.constEnd()) { return result.value(); } else { return -1; } Or something alike. My example probably doesn't work _exactly_ like that ;) | |
159 | Massive +1 (i know you didn't touch this here.. just commenting on it since i'm reading the code now). If you transform this into smart pointers you save quite some code within the removeEntry and the reset method. And you prevent accidental "oops, forgot to delete the object" mistakes (aka, memory leaks). Note: that could also make m_pendingRemovals redundant. But you would have to test that. |