Add ~/.local/share/icons to icons search paths
ClosedPublic

Authored by abondrov on Mar 18 2017, 3:48 AM.

Details

Diff Detail

Repository
R135 Integration for Qt applications in Plasma
Lint
Lint Skipped
Unit
Unit Tests Skipped
abondrov created this revision.Mar 18 2017, 3:48 AM
Restricted Application edited projects, added Plasma; removed Plasma: Workspaces. · View Herald TranscriptMar 18 2017, 3:48 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik edited edge metadata.Mar 20 2017, 3:13 PM

We need to add

Why? Also, shouldn't it use QStandardPaths as XDG locations can change.

Why? Also, shouldn't it use QStandardPaths as XDG locations can change.

At least some users expect it to be user's path for /usr/share/icons and place icons there.

BTW, shouldn't plasma integration also search for icons in ~/.kde4/share/icons? KDE4 installs icon themes to this location and it should be possible for Qt5/KF5 applications to use such themes, IMHO.

I have various icons in ~/.local/share/icons/hicolor and .desktop files referencing them just by name and that works fine.

I have various icons in ~/.local/share/icons/hicolor and .desktop files referencing them just by name and that works fine.

Likely KF5 application running from KDE 4 Workspace with icon theme set to XXX in KF5's kdeglobals (Theme=XXX) won't see ~/.local/share/icons/XXX theme.

Take a look at KHintsSettings::xdgIconThemePaths() function: https://cgit.kde.org/plasma-integration.git/tree/src/platformtheme/khintssettings.cpp#n167

The only path it takes in account in user's home is ~/.icons

davidedmundson requested changes to this revision.Aug 19 2017, 6:25 PM
davidedmundson added a subscriber: davidedmundson.

I agree we should be including $XDG_DATA_HOME/icons

We shouldn't be hardcoding that though.

Porting to QStandardPaths wtih GenericDataLocation should solve that and simplify this code.

This revision now requires changes to proceed.Aug 19 2017, 6:25 PM
abondrov updated this revision to Diff 18416.Aug 19 2017, 11:33 PM
abondrov edited edge metadata.

Use QStandardPaths wtih GenericDataLocation to include ~/.local/share/icons if it exists.

That diff seems messed up, can you double check it please.

The green lines look good though :)

abondrov updated this revision to Diff 18417.Aug 20 2017, 12:07 AM

Re-create diff against Plasma/5.10 branch.

davidedmundson requested changes to this revision.Sep 1 2017, 11:47 AM

oh, this patch isn't messed up, you're just not removing the original XDG_DATA_DIRS stuff.

This is going to cause duplication of the /usr/share/ results

This revision now requires changes to proceed.Sep 1 2017, 11:47 AM
abondrov updated this revision to Diff 19048.Sep 1 2017, 12:48 PM
abondrov edited edge metadata.

Remove XDG_DATA_DIRS stuff.

davidedmundson accepted this revision.Sep 1 2017, 12:51 PM

Do you have commit access?

This revision is now accepted and ready to land.Sep 1 2017, 12:51 PM

Do you have commit access?

I guess I should still have it. But I don't know how to make commit message look like this one (with phabricator info): https://cgit.kde.org/plasma-integration.git/commit/?id=86be8d49d8988fb6c35e847ed9e0aad3e8514208

rkflx added a subscriber: rkflx.Sep 1 2017, 5:20 PM

I don't know how to make commit message look like this one (with phabricator info)

Oh, this one just used arc land. *blushes*

Seems like you used the Phabricator web interface to upload the patch, but using Arcanist is easy once you wrapped your head around it:

  • Follow [1] to download Arcanist and install credentials
  • Issue arc patch D5093 inside your checkout of plasma-integration which creates a branch reflecting the state of the review including the Phabricator info (if you used arc diff to upload, this step is not necessary)
  • Finally arc land (maybe check your work and read arc help land beforehand)

At [2] you can find more information. Please report back if this is missing any information, which questions you still have after reading it or any issues you encounter when getting to know Arcanist. Or just update the wiki yourself if you can find the answers ;)

[1] https://secure.phabricator.com/book/phabricator/article/arcanist_quick_start/
[2] https://community.kde.org/Infrastructure/Phabricator

In D5093#142156, @rkflx wrote:

At [2] you can find more information. Please report back if this is missing any information, which questions you still have after reading it or any issues you encounter when getting to know Arcanist. Or just update the wiki yourself if you can find the answers ;)

Thanx! But looks I no longer have commit access, both "arc land" and "git push" fail.

rkflx added a comment.Sep 3 2017, 5:07 PM

Are you sure? In R119:8eaf1e1 it seemed to work fine. You can check in https://identity.kde.org whether you are in the "developers" group and you have the correct ssh key set up. ssh git@git.kde.org info should work then. (I can't find your name in Identity although you are on Phabricator, which is strange. Consider opening a ticket.)

Pushing or landing might not work if you use the wrong prefix as the push target. It should be git@git.kde.org:. You can check with git remote -v.

Following [3] was enough to make ssh and git push work for me. If you still have trouble, you can get help on IRC or just ask David to land the patch on your behalf. I'm sure you'll figure it out (assuming you'll eventually want to contribute more patches ☺).

[3] https://techbase.kde.org/Development/Tutorials/Git/GitQuickStart

This revision was automatically updated to reflect the committed changes.
In D5093#142799, @rkflx wrote:

Pushing or landing might not work if you use the wrong prefix as the push target. It should be git@git.kde.org:. You can check with git remote -v.

Thanx for your help! After adding these lines to my git config pushing is working again:

[url "git@git.kde.org:"]

pushInsteadOf = git://anongit.kde.org/