mate-desktop / mate-settings-daemon

MATE settings daemon
https://mate-desktop.org
GNU General Public License v2.0
43 stars 47 forks source link

media-keys: Make sound changes quiet with Alt #252

Closed zhangxianwei8 closed 5 years ago

zhangxianwei8 commented 5 years ago

media-keys: Make sound changes quiet with Alt

\<Alt>+volume control keys will change the sound, without playing a notification sound, which can be useful when things need to be quiet. Note that this doesn't use the settings stored in GSettings, but is hard-coded for those audio keys.

Ported from g-s-d: https://github.com/GNOME/gnome-settings-daemon/commit/1d41ab388a06844c4b46cee6e396a4976f136770 Also see: https://bugzilla.gnome.org/show_bug.cgi?id=651704

lukefromdc commented 5 years ago

I cannot test this, as I do not have working audio notifications at all

monsta commented 5 years ago

It's an old upstream commit. Didn't they modify it later to remove this hardcoding?

This really doesn't look proper. I think the Alt modifier should be checked in some function, not added to the table...

zhangxianwei8 commented 5 years ago

g-s-d does not remove this hardcoding: https://github.com/GNOME/gnome-settings-daemon/blob/a14690bdb46ca3da1ea8a10ebe20ccd100f46fca/plugins/media-keys/shortcuts-list.h#L56 I try to write the configure into xml file, but it looks useless.

zhangxianwei8 commented 5 years ago

Already moved those keys to Gsettings. Please review the PR, thanks. @monsta

monsta commented 5 years ago

Ah ok, I was thinking about re-using the same keybindings and processing Alt in runtime... but now they're configurable separately.

@mate-desktop/core-team: what do you think, which option is better? Hardcode Alt modifier for three existing keybindings and detect it in runtime, or use three new keys in schema for new keybindings?

zhangxianwei8 commented 5 years ago

One of the MATE desktop's goals is configurable for users, so I think use three new keys in schema for new keybindings is better.

lukefromdc commented 5 years ago

I agree better to keep it configurable, though without working sound effects (probably my GTK build), I cannot test this myself as stated before.

raveit65 commented 5 years ago

I agree with adding three new keys in schema for new keybindings.

monsta commented 5 years ago

We'll need changes in mate-keybinding-properties too, as now the remapping has to be done via dconf-editor.

zhangxianwei8 commented 5 years ago

Already updated this PR, and add three new key bindings to m-c-c, please review, thanks. @monsta @raveit65 @lukefromdc See https://github.com/mate-desktop/mate-control-center/pull/395

raveit65 commented 5 years ago

Thank you