! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
[patch] Make URL handler button configurable via hidden setting
Status:
RESOLVED: DUPLICATE
Severity:
enhancement
Product:
Xfce4-terminal
Component:
General

Comments

Description Alexander Butenko 2011-06-11 21:04:24 CEST
Created attachment 3727 
add MiscUrlActivateButton property an use it

Currently you can open links in terminal with middle click press. This brings a problem sometimes with pasting into terminal. If mouse hitting a link during paste it just opens hovered link. 

Attached patch brings an abbility to change url handler to left|middle button from hidden variable in config file.
Comment 1 Alexander Butenko 2011-06-15 05:07:07 CEST
Sorry, patch is kind of buggy. As we listening for button press events, that makes process of copying from terminal very hard. 

I will work it out latter then.
Comment 2 Alexander Butenko 2016-07-20 12:14:58 CEST
any ways to move this forward? thank you
Comment 3 Igor editbugs 2016-07-22 14:33:04 CEST
Hi Alexander. First, thanks for the patch.

But what is the problem with it? Will you be able to resolve it?
Another thing that the patch was created against outdated upstream code. If you could also update it to the current version, that would be great.
Comment 4 Alexander Butenko 2016-07-23 09:45:48 CEST
Hey Igor, 

Here you go. This one includes a fix for a problem ive been talking about.
Comment 5 Alexander Butenko 2016-07-23 09:46:33 CEST
Created attachment 6747 
url clicking fix v 2.0
Comment 6 Igor editbugs 2016-07-25 12:43:08 CEST
Alexander, I have just tried your patch v2.0, and, if having text in the clipboard, it both inserts text and opens a link when middle-clicking. This is not happening on the git version.
Comment 7 Alexander Butenko 2016-07-25 12:49:40 CEST
indeed, problem exists on a MiscUrlActivateButton default value. 
Let me work it out
Comment 8 Alexander Butenko 2016-07-26 00:06:13 CEST
ok. i took a look on the issue one more time. 
Initial issue im trying to solve is to avoid links opening while pasting from buffer via middle click (button id = 2)
On a clean master with a middle click on the URL terminal opens up a link in the browser, middle click not on the link -- pasting selection as expected

With my patch and MiscUrlActivateButton = 2 (default) middle clicking on url pastes selection + opens an url in browser, middle click not on the link -- pastes selection

With my patch and MiscUrlActivateButton = 1, middle clicking on url or outside  pastes selection, left btn click opens up a URL. 


From all 3 options I like the last one the most as its making middle click consistent. Looks like making default scenario to work as 'open link or paste selection' is impossible. The only solution will be or to change the default or to keep things as is.
Comment 9 Igor editbugs 2016-07-26 10:17:05 CEST
Alexander, thanks for your investigations.
I don't think changing open-url action from middle click to e.g. left click by default would be good as middle click looks like a standard for that. So, unless it's possible to make the proposed configuration work properly, I'd prefer to not make any changes in this area, ok?
Comment 10 Alexander Butenko 2016-07-26 11:00:59 CEST
Yeh, lets keep it as is for now. Ill work out different not intrusive patch later on. Thank you for your time.
Comment 11 Igor editbugs 2016-07-26 11:18:04 CEST
Ok, will keep this one open and ready to receive new patches.
Comment 12 Igor editbugs 2016-07-26 17:59:32 CEST
What do you think about the solution proposed in bug 10621 ?
Comment 13 Alexander Butenko 2016-07-26 22:16:54 CEST
Yeh, i think that will be an easiest and more intuitive solution. Lets stick with it if you are ok with this solution.
Comment 14 Igor editbugs 2016-07-27 11:09:28 CEST
Yeah, I've merged the solution, and marking this bug as duplicate to that one. Thanks!

*** This bug has been marked as a duplicate of bug 10621 ***

Bug #7714

Reported by:
Alexander Butenko
Reported on: 2011-06-11
Last modified on: 2016-07-27

People

CC List:
1 user

Version

Attachments

add MiscUrlActivateButton property an use it (3.28 KB, application/octet-stream)
2011-06-11 21:04 CEST , Alexander Butenko
no flags
url clicking fix v 2.0 (4.88 KB, patch)
2016-07-23 09:46 CEST , Alexander Butenko
no flags

Additional information