holomorph / transmission

Emacs interface to a Transmission session
GNU General Public License v3.0
85 stars 11 forks source link

Spurious dialog box when `transmission-turtle-toggle` is called #10

Closed Ambrevar closed 7 years ago

Ambrevar commented 7 years ago

Emacs: 25.2

Whenever I call transmission-turtle-toggle I get a "Enable turtle mode? Yes No" graphical dialog box. Which I don't like much... Sometimes it does not happen the first time. But it does every subsequent calls.

I've had a look at the code but it left me puzzled with why it does this. Other commands using the y-or-no-p such as transmission-verify do not display that behaviour.

holomorph commented 7 years ago

I can reproduce. If you never want dialog boxes, you can alter the variable use-dialog-box. At first sight, transmission-turtle-toggle appears to be the only place where y-or-n-p is in an asynchronous callback, so perhaps that has something to do with it.

holomorph commented 7 years ago

In any case, I think it makes sense to simply remove the prompt and have the ultimate message tell whether it was enabled or disabled. Alternatively, do like transmission-turtle-set-speeds and have the first request be synchronous and the y-or-n-p prompts in the interactive spec where they belong :)

Ambrevar commented 7 years ago

:+1:

holomorph commented 7 years ago

fixed in a48571d. thanks!