Summary: | Gwenview doesn't realise it's just opened an image from a "Tag" folder | ||
---|---|---|---|
Product: | [Applications] gwenview | Reporter: | tagwerk19 |
Component: | general | Assignee: | Gwenview Bugs <gwenview-bugs-null> |
Status: | CONFIRMED --- | ||
Severity: | minor | CC: | faure, goodaqua |
Priority: | NOR | ||
Version: | 24.08.1 | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Bug Depends on: | |||
Bug Blocks: | 473661 |
Description
tagwerk19
2020-02-16 07:38:54 UTC
Does Dolphin actually pass the tags:/ URL or does it pass the actual file to Gwenview? The issue might be in Dolphin. Yes, seems to be the case. With an strace: strace -o trace -t -f /usr/bin/dolphin tags:/mytag and looking for the exec: grep gwenview trace | grep exec I get: 3128 08:40:15 execve("/usr/bin/gwenview", ["/usr/bin/gwenview", "/home/test/Pictures/2020-02-10/i"...], 0x56373a8ce270 /* 63 vars */ <unfinished ...> If I launch gwenview from the command line: gwenview Pictures/2020-02-10/image1.png displays "image1.png" and the next image is the next image in the "Pictures/2020-02-10" folder and gwenview tags:/mytag/image1.png displays "image1.png" and the next image is the next image in the "mytag" tag folder. So yes, gwenview on its own works as expected. Desktop file says %U, so it is expected that Gwenview can open any URLs. Not sure if virtual URL protocols like tags:/, desktop:/, or trash:/ need to be specified separately in the desktop file. The 'Protocols' key is deprecated. Needs input from a KIO developer; adding David. (In reply to tagwerk19 from comment #2) > Yes, seems to be the case. Whups, that might have been that was ambiguous... as I read the 'execve' call in the strace, dolphin uses the filesystem directory, not the tags:/ Christoph: X-KDE-Protocol still exists, and allows to list supported protocols. The special value "KIO" means all protocols supported by KIO, and is assumed by default for apps with "KDE" in "Categories" (desktopexecparser.cpp:204). But the problem here is that Dolphin resolves the tag URL to a file URL before all this. DolphinViewContainer::slotItemActivated: KRun *run = new KRun(item.targetUrl(), this); And kio_tags sets UDS_TARGET_URL to the local file path, i.e. it's actually asking for this to happen. git log says this goes back to the big rewrite, so no specific justification. Someone who actually uses tags (I don't) could try commenting out the only line that mentions UDS_TARGET_URL in baloo/src/kioslaves/tags/kio_tags.cpp and testing that in multiple ways to find out if anything would break. I can't really test any of this here; I was able to tag a few files, and the tag does appear on the right panel in dolphin when selecting the file, but clicking on it says "tags:Foo does not exist", and tags:/ is empty. And I have to create the tag every time, it doesn't get stored. I guess I disabled something somewhere long ago? |