Set gtk-modules to auto-load appmenu-gtk-module
ClosedPublic

Authored by broulik on Sep 6 2018, 2:17 PM.

Details

Summary

Makes it work out of the box for both GTK 2 and GTK 3 applications.
Since both krdb and kde-gt-config overwrite their respective gtkrc-2.0 we use a watcher to re-add our config key afterwards.

Test Plan

Tested Pluma (Gtk3), now has global menu
Tested Gimp and Inkscape, now have global menu
When module isn't installed, prints a warning on console, shouldn't be too bad

Diff Detail

Repository
R120 Plasma Workspace
Lint
Lint Skipped
Unit
Unit Tests Skipped
broulik created this revision.Sep 6 2018, 2:17 PM
Restricted Application added a project: Plasma. · View Herald TranscriptSep 6 2018, 2:17 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik requested review of this revision.Sep 6 2018, 2:17 PM
broulik updated this revision to Diff 41115.Sep 6 2018, 3:45 PM
broulik edited the summary of this revision. (Show Details)
broulik edited the test plan for this revision. (Show Details)
  • Support GTK2 too
krop added a subscriber: krop.Sep 7 2018, 9:34 AM

For some reason GTK2_RC_FILES (set by krdb) isn't set here for krunner or plasmashell so launching apps from there doesn't pick up the ~/.config/gtkrc-2.0 but only ~/.gtkrc-2.0.
Krdb sets the launch environment but it's probably not sourced, or too late, for plasmashell and others :/

broulik updated this revision to Diff 41316.Sep 10 2018, 7:45 AM
  • Write into ~/.gtkrc-2.0, the GTK2_RC_FILES variable isn't present for apps launcher by Plasma or KRunner, for some reason (probably only stuff launched through klauncher)
hein accepted this revision.Sep 13 2018, 5:21 PM
This revision is now accepted and ready to land.Sep 13 2018, 5:21 PM
hein added a comment.Sep 13 2018, 5:23 PM

Since we're in the middle of doing tarballs and I know @broulik was anxious to get this in I'm going to be proactive and land it.

This revision was automatically updated to reflect the committed changes.
hein added a comment.Sep 13 2018, 5:25 PM

I'm super sorry, arc patch changed authorship somehow :( It randomly sometimes does and doesn't do this and I forgot to check