jlebon / textern

A Firefox add-on for editing text in your favourite external editor!
GNU General Public License v3.0
138 stars 21 forks source link

On exit terminate editors that aren't finished yet #47

Closed phdru closed 1 year ago

phdru commented 5 years ago

To be honest I'm not sure termination must be that cruel. I'd prefer to have a checkbox in the web interface "Terminate editors on exit". But I'm a Python programmer and don't know much about WebExtension API. I could try to add something to the already existing interface but that could take a lot of time — I'm extremely busy at the job.

cassava commented 3 years ago

You should reference issue #44 in the commit, which will then link this PR to that issue. Also, if I look at the other commits in the repository, @jlebon uses the prefix textern.py:, which might be better than feat(native):

You can fix the commit by doing an interactive rebase (or just commit amend) followed by a force push. Github should show that change here.

phdru commented 3 years ago

You should reference issue #44 in the commit, which will then link this PR to that issue.

Ok.

Also, if I look at the other commits in the repository, @jlebon uses the prefix textern.py:, which might be better than feat(native):

This time I disagree it's better. It's a conventional commit format. The scope could be discussed.

phdru commented 3 years ago

I'm returning to extend this. I downloaded and installed Firefox Developer's Edition, in about:config switched xpinstall.requires.signature to false.

In the source tree I ran make xpi. Then tried to install the xpi into Fox. It rejected the xpi with error "The extension is unverified".

What I'm missing?

phdru commented 3 years ago

Currently I create a separate checkbox "Kill editors on exit" and an input field to input timeout between retries. But I think I can use timeout=0 or timeout<0 as a signal to not to kill editors.

What would be the better interface? Checkbox seems to be more user-friendly. Using timeout with two different purpose seems hackish but lowers the number of interface elements.

phdru commented 3 years ago

The new code is untested, unfortunately. I still cannot debug the xpi.

phdru commented 3 years ago

Last push: fixed .value -> .checked for the checkbox "Allow to kill editors" in the options. Still not tested.

phdru commented 3 years ago

I managed to install textern.xpi into a nightly build of FFox 92.0a1. Continue debugging…

phdru commented 3 years ago

This is the debugged version. Please review and test.

jlebon commented 1 year ago

Continued in #88. (FWIW, I wouldn't create a separate PR for this. Just updating this one would've been fine. :) )

phdru commented 1 year ago

I wouldn't create a separate PR for this. Just updating this one would've been fine. :) )

I want to preserve the code in the branch. I very much hope sooner or later it will be used on non-Linux platforms.