Summary: | icon location for Desktop Entries | ||
---|---|---|---|
Product: | [Applications] konqueror | Reporter: | Pieter <eendebak> |
Component: | general | Assignee: | Konqueror Developers <konq-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | CC: | imehl_adresse, markl |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | RedHat Enterprise Linux | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | partial patch |
Description
Pieter
2004-01-25 15:09:12 UTC
Created attachment 4394 [details]
partial patch
Based on the patch by Pieter, this turns ./foo.jpg into an absolute path when
parsing the .directory file.
But it doesn't seem to work, KMimeType::pixmap() passes the full path to
KIconLoader (which is necessary anyway, to apply icon effects etc.), and
KIconLoader returns an null pixmap. Needs debugging inside kiconloader... (no
time for that right now).
I tested the patch by David attached for KDE 3.1.5 (compiled with konstruct) and it works for me. The exact .directory file I used was [Desktop Entry] Icon = ./.folder.png with of course a corresponding image .folder.png present. I also cannot image that there is any problem in KIconLoader since KFolderType::icon() (which is affected by the patch) only passes a string to the rest of the program. Perhaps the image file was not present? Could someone compile kdelibs with the patch and test if konqueror works? thanks, pieter CVS commit by faure: Support for Icon=./foo.png in .directory files, bsaed on patch by Pieter Eendebak. CCMAIL: 73463-done@bugs.kde.org M +8 -0 kmimetype.cpp 1.187 --- kdelibs/kio/kio/kmimetype.cpp #1.186:1.187 @@ -631,4 +631,12 @@ QString KFolderType::icon( const KURL& _ return KMimeType::icon( _url, _is_local ); + if ( icon.startsWith( "./" ) ) { + // path is relative with respect to the location + // of the .directory file (#73463) + KURL v( _url ); + v.addPath( icon.mid( 2 ) ); + icon = v.path(); + } + return icon; } *** Bug 68507 has been marked as a duplicate of this bug. *** *** Bug 224449 has been marked as a duplicate of this bug. *** |