mate-desktop / mate-settings-daemon

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

gtk-overlay-scrolling and automatic-nmemonics are not applied to GTK3 programs #153

Open KlipperKyle opened 8 years ago

KlipperKyle commented 8 years ago

I have changed some of the backend settings. Although they work fine in GTK2, they are not applied to GTK3 programs.

$ gsettings get org.mate.interface gtk-overlay-scrolling
false
$ gsettings get org.mate.interface automatic-mnemonics
false
$ gtk-query-settings mnemonic
              gtk-enable-mnemonics: TRUE
                gtk-auto-mnemonics: TRUE

gtk-overlay-scrolling fixes the scrollbars outside the area they control. automatic-mnemonics controls the behavior of the little underscores under menu items. If true, they autohide when pressing the ALT key. If false, they remain displayed statically.

It looks like the only way to pass over gtk-overlay-scrolling is through an environment variable:

https://github.com/linuxmint/cinnamon-session/commit/96f25057cac202e13c338886d00bc0383394ad26

I'm not sure if the mnemonics can even be set anymore. It looks like they were deprecated in GTK 3.10.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/35099661-gtk-overlay-scrolling-and-automatic-nmemonics-are-not-applied-to-gtk3-programs?utm_campaign=plugin&utm_content=tracker%2F867277&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F867277&utm_medium=issues&utm_source=github).
raveit65 commented 8 years ago

gtk-overlay-scrolling is disabled as default in mate session, this setting sets this env variable, means it does not work for windows starting as root or with sudo. This works out of box in fedora. If a developer have dropped deprecated mnemonics from his application than this does not work anymore. This should work with mate applications. Btw. you should check your gtk theme. This can be set there. Ie. https://github.com/mate-desktop/mate-themes/blob/master/desktop-themes/BlueMenta/gtk-3.0/settings.ini#L3

KlipperKyle commented 8 years ago

gtk-overlay-scrolling is disabled as default in mate session, this setting sets this env variable, means it does not work for windows starting as root or with sudo. This works out of box in fedora.

The issue is that in my testing, the environment variable is not set. This is MATE 1.14.0 in Arch Linux (built using the PKGBUILDs from Manjaro). Do I need to logout and login for the setting change to take effect?

Btw. you should check your gtk theme. This can be set there. Ie.

I tried that. (I am hacking together my own GTK theme.) I think GNOME really wants auto-mnemonics gone.

https://gitlab.com/KlipKyle/Blueshell/issues/5#note_12409352

raveit65 commented 8 years ago

Do I need to logout and login for the setting change to take effect?

yes, after updating the package you need to logout/in for applying the setting. It's an env variable. Same if you enable overlay-scrollbars again, for what reason ever.....

KlipperKyle commented 8 years ago

OK. I will test later tonight. Thanks!

raveit65 commented 8 years ago

I tried that. (I am hacking together my own GTK theme.) I think GNOME really wants auto-mnemonics gone.

I just tested this in fedora 24 (similar to archlinux) and Blue-Submarine theme and caja. I can enable the mnemonics here with using alt key if i'm over the menuitem.

KlipperKyle commented 8 years ago

Regarding gtk-overlay-scrollbars:

I can confirm that under mate-session, the environment variable GTK_OVERLAY_SCROLLING is set upon login by mate-session according to the preference org.mate.interface gtk-overlay-scrolling. If the org.mate.interface gtk-overlay-scrolling preference is changed, then the environment variable is not changed until logging out and logging in again. However, the new value does take effect in the new login session.

However, if I take out mate-session (e.g. by running mate-settings-daemon directly under Window Maker), then no environment variables are set. I think this is probably out of the scope of mate-settings-daemon, but I thought I should let you know anyway. (I'm perfectly happy setting an environment variable myself as a fallback.)

Regarding auto-mnemonics:

Under mate-session, the setting automatic-mnemonics applies to GTK2 programs; I just need to restart them. However, GTK3 programs still have the auto-mnemonics even if I set org.mate.interface automatic-mnemonics to false.

Also, GTK3 programs still have auto-mnemonics if I set the aforementioned property to false in gtk-3.0/settings.ini under the theme directory. However, if I run gtk-query-settings, it comes back with "gtk-auto-mnemonics: FALSE". So, the setting is stored, but it is ignored.

https://developer.gnome.org/gtk3/unstable/GtkSettings.html#GtkSettings--gtk-auto-mnemonics

I might hail one of the GNOME mail lists about the auto-mnemonics. The must be some weird hack to disable them.