QComicBook icon indicating copy to clipboard operation
QComicBook copied to clipboard

Updated desktop file to allow Nautilus to use qcomicbook to open cbr files

Open Yutsa opened this issue 7 years ago • 1 comments

I downloaded qcomicbook today on my Debian testing machine and I couldn't make Nautilus use it to open my cbr files by default.

Although the desktop file specify the right MIME types, the Exec property doens't take any arguments.

I changed it so so that it can take up to one URL. This allows Nautilus to detect qcomicbook as a program that can open the cbr file.

I also removed the png extension to the icon name, as it is not necessary and will give an error in the next gnome releases for icons in /usr/share/pixmaps

We also have the possibility to take multiple URLs as argument but I didn't know if it was useful so I didn't.

If it is useful it's a small change, juste change %u to %U.

Another thing that may not be related to the project directly, but qcomicbook doesn't have any screenshot preview on its gnome-software page on Debian. I don't know if it is something you can change though.

Yutsa avatar Apr 17 '17 12:04 Yutsa

Hi @Yutsa,

I'm not QComicBook developer, although I was almost to submit a similar PR.

Your changes mostly look good, although I spot an issue with the placeholder for Exec: QComicBook can read only local files, and at most just one file as specified as argument, so %u (== can read any URL) is incorrect, as file managers (and file type handlers, in general) could invoke it as eg qcomicbook http://www.example.com/document.pdf. Also, %U cannot be used either, since only one argument is handled. Thus, the right placeholder is %f, which means "only one local file".

See the Desktop Entry Specification, for reference: https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-1.1.html#exec-variables

pinotree avatar Jul 02 '17 14:07 pinotree