Cimbali / pympress

Pympress is a simple yet powerful PDF reader designed for dual-screen presentations
https://cimbali.github.io/pympress/
GNU General Public License v2.0
1.14k stars 88 forks source link

Add 'present via pympress' to Explorer's context menu on *.pdf files on Windows #152

Closed ComFreek closed 3 years ago

ComFreek commented 4 years ago

Feature request: when right-clicking on a PDF file in Explorer, show an entry "present via pympress"*. This saves me from

Does this make sense for other OS, too?

*) or "open with pympress", there is probably a recommendation in Microsoft's UX guidelines

Cimbali commented 4 years ago

Not sure if cluttering the right-button menu would be universally welcomed, but I see the issue nonetheless. There’s maybe a way to register pympress with the OS as a pdf-handling program, to be shown in the right click > “Open with” submenu.

We already have that on Linux via the .desktop file. We probably should look into doing this on macOS also.

ComFreek commented 4 years ago

There’s maybe a way to register pympress with the OS as a pdf-handling program, to be shown in the right click > “Open with” submenu.

Yes, registering Pympress as the PDF opening program would work, but I would not want that. The majority of PDFs I open are for reading, not for presenting.

Cimbali commented 4 years ago

I think it’s a more appropriate way to get the same result, no? In my imagination this doesn’t make pympress the default pdf reader, just a possible pdf reader.

Maybe using the assoc command in the post-install process could achieve that, but I’m don’t have a lot of time to look into this right now.

ComFreek commented 4 years ago

I think it’s a more appropriate way to get the same result, no? In my imagination this doesn’t make pympress the default pdf reader, just a possible pdf reader.

You are right, I agree now!

Maybe using the assoc command in the post-install process could achieve that

assoc .pdf gives me .pdf=MiKTeX.pdf.2.9, which is not even a program, so I doubt it is the best interface for modifying the open-with list. Additionally, it only works within cmd.exe, not even within PowerShell, so seems brittle to rely upon.

It seems one can modify the open-with list inside Windows' registry. It seems the way to go is to add a new verb handling program as written here for Wix installers. I am afraid that even after 10min of googling, I could not reliably find how this is done in terms of registry modifcations. Seems indeed to be require a bit of fiddling. Unless, of course, the bdist_msi thing you use for creating the MSI installers offers some options for this. I couldn't find any when googling for that, though.

Cimbali commented 3 years ago

Not easy this one. Seems like MSI installers can do that, but not out of the box with cx_Freeze. I tried to manually specify the Extension / MIME / Verb tables but to no avail so far. It seems doable with other installer builders, but maybe only with admin privileges.

Cimbali commented 3 years ago

image

We’re getting closer, I finally found out how to do it… Just have to figure out how to adjust the text that is displayed now.

Cimbali commented 3 years ago

Done in f3a7fa5, available in beta release for testing

ComFreek commented 3 years ago

Tested and works great so far!

I am only wondering why Pympress doesn't directly appear in the "open with" list in the context menu, but rather I have to click "chose other app" (right context menu, lowest entry): image

Is this list sorted by application start frequencies maybe? But that'd be strange: I never use TeXWorks or Chromium to open PDF files. Maybe this list is sorted alphabetically, but still hasn't updated to include pympress before TeXWorks (by alphabetic sorting as it'd be).

In the ribbon bar, it appears in the "click downwards arrow" list (as you've shown, too): image

edit: I'll restart and see if it's just caching behavior.

Cimbali commented 3 years ago

I’m not sure why either, but does it show up in the proposals once you’ve used it once maybe ?