After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 378165 - Middle click paste onto smart bookmark
Middle click paste onto smart bookmark
Product: epiphany
Classification: Core
Component: Interface
Other Linux
: Normal enhancement
: ---
Assigned To: Epiphany Maintainers
Epiphany Maintainers
Depends on:
Reported: 2006-11-22 16:33 UTC by Sven Arvidsson
Modified: 2008-08-04 13:24 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement

enable middle click paste onto smart bookmark (2.76 KB, patch)
2007-12-18 18:12 UTC, Cosimo Cecchi
reviewed Details | Review
committed patch (2.71 KB, patch)
2007-12-18 18:42 UTC, Cosimo Cecchi
committed Details | Review
patch (839 bytes, patch)
2008-03-17 23:03 UTC, Cosimo Cecchi
committed Details | Review

Description Sven Arvidsson 2006-11-22 16:33:32 UTC
This bug was reported to the Debian BTS.

"I'm considering switching from galeon to epiphany...
The feature I'm currently missing most is the ability to paste a URL
into a tab directly.

With galeon, I can middle-click-paste the URL to the new-tab button to
get a new tab, or onto an existing tab.
With firefox I think I can paste onto any place in the current frame to
replace it with the new URL (I don't like this behaviour as much though)

At least the paste-onto-new-tab-toolbar-icon behaviour should be added
IMHO. It won't break anything, middle clicking on toolbar icons is
completely unused afaict.

That should be added for smart bookmarks, too. Currently if you
middle-click on a smart bookmark, it will just open the non-smart URL in
a new tab. IMHO it should use the pastebuffer contents for searching."
Comment 1 Jean-François Rameau 2006-11-22 20:58:19 UTC
The paste-onto-new-tab-toolbar-icon behaviour is available with HEAD (2.17). See #149715.

I'm trying to code the same behaviour for smart bookmarks: that's an interesting feature :)
Comment 2 Sven Arvidsson 2006-11-22 21:34:18 UTC
That's very cool, thank you! :)
Comment 3 Cosimo Cecchi 2007-09-12 17:50:23 UTC
Middle click paste onto buttons now works in Epiphany. Is there any other reason why this is still open?
Comment 4 Cosimo Cecchi 2007-12-18 18:11:43 UTC
Heh, the reason for this bug to be still opened was to have it also for smart bookmarks...updating summary and patch following.
Comment 5 Cosimo Cecchi 2007-12-18 18:12:59 UTC
Created attachment 101207 [details] [review]
enable middle click paste onto smart bookmark

This patch basically adapts the code from ephy-home-action.c to ephy-bookmark-action.c.
Comment 6 Christian Persch 2007-12-18 18:23:36 UTC
+		ctx = g_new (ClipboardCtx, 1);

Use g_slice_new (and g_slice_free later on).

+	if (event->button == 2) //middle click

No C++ comments please.

+		gtk_clipboard_request_text
+			(gtk_clipboard_get_for_display (gdk_display_get_default(), 
+						        GDK_SELECTION_PRIMARY),

Use gtk_widget_get_clipboard (entry).

With these fixed, oktc. Thanks!
Comment 7 Cosimo Cecchi 2007-12-18 18:42:06 UTC
Created attachment 101208 [details] [review]
committed patch

Ok, thanks. I'm attaching here the committed patch for reference.
Comment 8 Cosimo Cecchi 2007-12-18 18:42:35 UTC
Closing as FIXED.

r7784 | cosimoc | 2007-12-18 19:38:45 +0100 (mar, 18 dic 2007) | 3 lines

Add middle-click-paste for smart bookmarks, as it is for new tab/window
buttons. Close bug #378165.
Comment 9 Christian Lohmaier 2008-03-13 23:34:56 UTC
I hate this new behaviour - is there any chance on making it a preference?

epiphany 2.22.0 opens the smartbookmark with searchitem immediately, without giving the user to change the contents before actually launching it.

I want to paste the clipboard contents into the textbox in the toolbar, modify/extend it and then launch the bookmark.

And as for the nonsmart-URL that is opened when klicking the label, I'd really prefer the galeon way of solving it (i.e. add the possiblity to add a seperate non-smart URL - see bug #332900)
Comment 10 Frederic Crozat 2008-03-17 16:30:59 UTC
Reopening : this change is breaking common usage of paste on X Window. I agree for the new behaviour if paste is done on the button but if done in the entry field, it should be as before.
Comment 11 Reinout van Schouwen 2008-03-17 16:41:36 UTC
Agreed with Frederic, marking NEW again.
Comment 12 Cosimo Cecchi 2008-03-17 23:03:12 UTC
Created attachment 107495 [details] [review]

Attached patch does not activate the entry after setting the text into it.
Comment 13 Christian Persch 2008-08-04 13:00:49 UTC
Thanks! Please commit to trunk and 2-24.
Comment 14 Cosimo Cecchi 2008-08-04 13:24:49 UTC
Committed to trunk and gnome-2-24, closing as FIXED.

r8377 | cosimoc | 2008-08-04 15:17:47 +0200 (Mon, 04 Aug 2008) | 3 lines

Bug #378165: do not activate the smart bookmark entry after middle-clicking
paste text into it.