-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open links and bookmarks, lang, history links in background when pressing ctrl
#158
Conversation
Doesn't seem to work well for me. Once you press Ctrl, all the links in the side panel open in a new tab, even when you have already released it. This could be solved. However, I'm not convinced about the method used of capturing the key press and then saving it to a variable in the I think the check should be done in the module in which a link has been clicked, checking the state of the modifier keys. I'll try to look at it with more time. |
Hi, I've been looking into implementing this as a first contribution to the project but I've run into a few obstacles GtkListBox seems to abstract away the event used to emit the row-activated signal, making it impossible to implement this in most places without either changing what widget is used for the list and its rows (losing all of the niceties that those provide) or handling the modifier key state externally. However, adding support for this inside the WebKit view seems pretty trivial, maybe we could add that while we figure out the rest? Is using an Adwaita ActionRow with a button suffix for opening the link in a new window a good compromise (maybe too cluttered)? Or maybe a preference to open links in new tabs by default (kinda inflexible but at least customizable)? |
You could just not use that signal, but add your own |
Hi @jhenriquelc It should probably be done with Gtk.Gesture as @camelCaseNick says, but it doesn't seem like an easy task.
I think it's more coherent to add support within Webkit if it's added to the rest of the widgets. Currently you can already open a link in another tab with the middle mouse button or with the context menu.
I don't think it's a good idea to make changes to the application's UI because of this. I think it could be an improvement to add support for the Ctrl key but it's not essential either. |
Fixes #157, and depends on #155 (although this dependence can be dropped as it is only used when loading bookmarks and history rows in background).