TrilbyWhite / Slider

PDF presentation tool
GNU General Public License v3.0
54 stars 12 forks source link

added support for action links #19

Closed iffsid closed 10 years ago

iffsid commented 10 years ago

Hey, I added in support for action links (again!). I didn't make a conf.launch_handler like you did for url, movie, and audio because all the information in the action launch was self-contained. Although, if you'd prefer it, I can still make things go through conf.launch_handler. You essentially get the action to launch by ctrl+a or by assigning another key to 'action 2'.

TrilbyWhite commented 10 years ago

Thanks. I'm going to look this over, and as in the previous version I'm going to put it in a boolean value (or handler string) in the config that will be disabled by default. The previous version had conditional compile blocks which was perhaps over extreme caution - but I do feel that allowing action links needs to be an explicit opt-in option as malicious actions can easily be included in pdfs.

TrilbyWhite commented 10 years ago

I just did some substantial revision to this. Two options in the config will need to be changed to use this: first is the "*.Action.Launch" which is a boolean value; set it to true.

Then assign a key binding - a binding for "l" is commented out.

This works differently then the normal action links. Launch links can be used just like other links as long as the boolean value is set to true: when you press "a" they will be highlighted and you can select one of them. But as your goal is to play all of the launch links simultaneously, I've added an "action launch" command which will do just this. The "action launch" command loops through all links on the page and plays every one that is a launch link.

As I don't use launch links, I am unable to test this. In addition to adding the new command, I've revised the handling of the rectangle coordinates - I have a habit of screwing up these calculations, so feel free to point out if the video (or other launched program) shows up at the completely wrong spot.