Bug 224449 - set relative paths in .directory files
Summary: set relative paths in .directory files
Status: RESOLVED DUPLICATE of bug 73463
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 16.12.2
Platform: Gentoo Packages Unspecified
: NOR wishlist
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-27 11:42 UTC by imehl_adresse
Modified: 2015-05-28 17:33 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
preview breaks things (14.43 KB, image/png)
2015-05-24 20:24 UTC, Nicholas O'Connor
Details

Note You need to log in before you can comment on or make changes to this bug.
Description imehl_adresse 2010-01-27 11:42:43 UTC
Version:            (using KDE 4.3.4)
Installed from:    Gentoo Packages

I want to set inside a directory a Icon for that directory, in KDE-4.3.4 this only work with absolut path´s. 

So if I use it on my external drive, it works only if the drive is plugged in the same Computer. 

If we could set the path relativ, then the icons will work with this external drive on every system
Comment 1 Malte S. Stretz 2010-04-26 17:31:21 UTC
Seems like this is fixed in KDE 4.4.2 (and I think this already worked in KDE 3.5):  Only the base name of the icon is saved in the .directory file.

Or did you set the icon to a file saved in the same directory?  Hmmm... yes, seems like in that case only absolute paths work correctly, even changing the path manually doesn't work.
Comment 2 imehl_adresse 2010-04-27 12:22:06 UTC
(In reply to comment #1)
> Seems like this is fixed in KDE 4.4.2 (and I think this already worked in KDE
> 3.5):  Only the base name of the icon is saved in the .directory file.
> 
> Or did you set the icon to a file saved in the same directory?  Hmmm... yes,
> seems like in that case only absolute paths work correctly, even changing the
> path manually doesn't work.

yes I have icons inside the same directory and want to set the path to that file relativ.

So that i can plug the HDD in a other Computer, and the icons will still work.
Comment 3 Jeroen van Meeuwen (Kolab Systems) 2012-08-24 16:18:24 UTC
Resetting assignee to default as per bug #305719
Comment 4 Nicholas O'Connor 2015-05-23 23:19:28 UTC
I'd like to request someone look at (and hopefully implement) this feature again.

I'd do it myself but I haven't the faintest idea where to begin.
Comment 5 Nicholas O'Connor 2015-05-24 20:24:24 UTC
Created attachment 92809 [details]
preview breaks things

Amendment to previous comment:

Apparently it *is* implemented, but breaks when Dolphin is set to preview a directory. Attached is a screenshot, with preview off in the top example (using ./.face.icon as my directory image) and preview on in the bottom example.
Comment 6 Frank Reininghaus 2015-05-26 17:24:29 UTC
Does it work if you prepend the name of the icon with "./"? See bug 73463. (I found a reference to this report in the source code of the KFileItem class from the KIO framework, which is responsible for determining the icon for a file).
Comment 7 Nicholas O'Connor 2015-05-26 18:20:55 UTC
That's what I've been doing, since previous bugs led me to believe that was the only way Dolphin even realized it was a relative path (perhaps by design?).

Like I said, it only works if I have Preview turned *off* (which led me to think it didn't since I had defaulted to have preview on in all directories).
Comment 8 Frank Reininghaus 2015-05-28 17:33:42 UTC
OK, thanks for the clarification. I can reproduce the problem. It's probably related to the "preview" plugin which creates thumbnails for directories then. Usually, it overlays the generic "folder" icon with thumbnails of the images in the directory. BTW, I can also reproduce this with absolute paths for the custom icon, so it seems that this might not have to do much with relative paths.

If the directory has a custom icon, it should either overlay that icon with the thumbnails or only show the custom icon (probably better).

I guess you should file a new bug report about this issue because it's different from the issue that was originally posted here (and which is a duplicate of bug 73463, which contains instructions how to set a custom directory icon with a relative path). The correct product is kio/thumbnail, I think - AFAIK, there are no separate components for each thumbnailer. Feel free to add a new comment with a link to your new report here, such that others can find the new report more easily.

Thanks!

*** This bug has been marked as a duplicate of bug 73463 ***