Remove gtkrc-2.0 legacy settings
ClosedPublic

Authored by gikari on Mon, Nov 4, 7:08 PM.

Details

Summary

Previously GTK KCM wrote to gtkrc redundant settings lines:

  1. include "path to chosen gtk2 theme"
style "user-font"
{
font-name="whatever font was chosen"
}
widget_style "*" style "user-font"

Now GTK KCM does not write those lines to configuration file,
but ones that was kept from previous versions of KCM
are causing various glitches, when applying gtk2
configuration, for theme and font configs respectively.

This patch fixes these issues removing these lines from gtkrc
by force, after applying any configuration from GTK KCM.

BUG: 413678

BUG: 413107

Test Plan
  1. Open ~/gtkrc-2.0 and add those lines (theme and font name are arbitrary):
include "/usr/share/themes/Adwaita-dark/gtk-2.0/gtkrc"
style "user-font"
{
    font_name="Noto Sans Regular"
}
widget_class "*" style "user-font"
  1. Open GTK KCM and apply any configuration
  2. Reopen ~/gtkrc-2.0 file and check, that those lines were removed

Diff Detail

Repository
R99 KDE Gtk Configuration Tool
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
gikari created this revision.Mon, Nov 4, 7:08 PM
Restricted Application added a project: Plasma. · View Herald TranscriptMon, Nov 4, 7:08 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
gikari requested review of this revision.Mon, Nov 4, 7:08 PM
gikari edited the test plan for this revision. (Show Details)Mon, Nov 4, 7:10 PM
cblack accepted this revision.Mon, Nov 4, 8:55 PM

This LGTM. Would probably check a variety of configs with a variety of applications just to be on the safe side and make sure there's no visual oddities, but it should be fine.

This revision is now accepted and ready to land.Mon, Nov 4, 8:55 PM
ngraham added a subscriber: ngraham.Mon, Nov 4, 9:22 PM

Presumably 5.17 bugfix material assuming we can test it well enough. @apol, does this look sane to you as well?

ervin added a subscriber: ervin.Tue, Nov 5, 7:24 AM

FWIW, LGTM as well, agree with Nate that it likely requires some more extensive testing though.

ngraham accepted this revision.Tue, Nov 5, 3:16 PM

Seems to work for me. If I create a ~/gtkrc-2.0 file to trigger the bug, this fixes it.

This revision was automatically updated to reflect the committed changes.