Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Yutsa
Copy link

@Yutsa Yutsa commented Apr 17, 2017

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.

This will allow Nautilus to detect qcomicbook as a program to open .cbr files by default.
It simply says that the qcomicbook command can take up to one URL parameter.

Maybe it should be %U to allow multiple URLs but I didn't see the need for it.
Icons located in /usr/share/pixmaps should not specify the extension now.
@pinotree
Copy link

pinotree commented Jul 2, 2017

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

plntyk added a commit to plntyk/QComicBook that referenced this pull request May 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants