[kcmkwin/rules] Return absolute path of decoration color scheme
ClosedPublic

Authored by zzag on Dec 18 2018, 2:24 PM.

Details

Summary

We need to return the absolute path instead of base name so decoColorToCombo
can return the correct index.

Test Plan
  • Go to System Settings > Window Management > Window Rules;
  • Create a new rule for Konsole to force the Oxygen color scheme, close the dialog, and click the Apply button;
  • Open the rules dialog (you don't have to modify anything), click OK button, then Apply button.

Without this patch, Breeze color scheme will be forced after the
last step.

Diff Detail

Repository
R108 KWin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
zzag created this revision.Dec 18 2018, 2:24 PM
Restricted Application added a project: KWin. · View Herald TranscriptDec 18 2018, 2:24 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript
zzag requested review of this revision.Dec 18 2018, 2:24 PM
zzag edited the test plan for this revision. (Show Details)Dec 18 2018, 2:26 PM

Could that be a fallout from the fact that color scheme names are now translated? I get mapping failures all over the place now (Kate, Krita, …) because Honigwabe isn't Honeycomb.

zzag added a comment.Dec 18 2018, 2:32 PM

Could that be a fallout from the fact that color scheme names are now translated?

Wait, filenames are translated as well?

zzag added a comment.Dec 18 2018, 2:37 PM

Could that be a fallout from the fact that color scheme names are now translated? I get mapping failures all over the place now (Kate, Krita, …) because Honigwabe isn't Honeycomb.

Also, why are they translated anyway?

Wait, filenames are translated as well?

Not the filename, the Name in the .colors file, it's a desktop file and as such can also do Name[de]

Also, why are they translated anyway?

To provide a better user experience, not everyone is familiar with the English language.

This definately used to work in the past. I rather think it's a fallout from switching to dbus.

zzag added a comment.Dec 20 2018, 12:06 AM

I rather think it's a fallout from switching to dbus.

Not aware of that switch. Could you please provide hash(es) of related commit(s)?

zzag added a comment.EditedDec 20 2018, 1:51 PM

I think the problem lies in the fact that Rules are "persistent". Initially, decocolor will be an absolute path. After the second step in the test plan, decocolor will be a basename, so in the third step when setRules is called, decoColorToCombo won't be able to return the correct index(basename != absolute path).

In D17655#379802, @zzag wrote:

I rather think it's a fallout from switching to dbus.

Not aware of that switch. Could you please provide hash(es) of related commit(s)?

1d71292e13fc820c12996d28d693d6e02c23defe

zzag added a comment.Dec 20 2018, 8:22 PM

It looks switching to dbus hadn't caused the problem stated in the test plan.

davidedmundson accepted this revision.Jan 14 2019, 8:02 PM
This revision is now accepted and ready to land.Jan 14 2019, 8:02 PM
This revision was automatically updated to reflect the committed changes.