johnfactotum / foliate

Read e-books in style
https://johnfactotum.github.io/foliate/
GNU General Public License v3.0
5.93k stars 273 forks source link

Add option to choose default action for selected text #1162

Open Klounita opened 8 months ago

Klounita commented 8 months ago

Is your feature request related to a problem? Please describe. It's very convenient to translate selected text immediately. I really liked this feature in the previous version.

Describe the solution you'd like Options in settings "When a word is selected" "When multiple words are selected"

KonstantinDjairo commented 8 months ago

would be good if we could send selected words to goldendict-ng. as it happens in crqt-ng

https://gitlab.com/coolreader-ng/crqt-ng/-/commit/3815433be5a7498c78b62027ba461d81c686f8b0

johnfactotum commented 8 months ago

@KonstantinDjairo That's #791. Also, glancing at the code, I think it's just sending the selected text, and not any other contextual info. In that case you can easily achieve the same thing yourself in any app by using xclip or wl-paste. (Actually I'm not sure whether WebKitGTK would populate the clipboard with HTML that contains the language; theoretically such an HTML fragment should include all inherited attributes such as namespace and language. If so you could even get the language.)

KonstantinDjairo commented 8 months ago

when i select the text, it does copy it to the clipboard but it also shows a popup with more options , can i disable that popup and stay just with the "copy to the clipboard" feature ?

buddhiko1 commented 3 months ago

when i select the text, it does copy it to the clipboard but it also shows a popup with more options , can i disable that popup and stay just with the "copy to the clipboard" feature ?

I have installed the latest goldendict-ng. you can select the text by double click when the cursor is hovered on the text and then the popup of foliate will not show.

This is my config last