From 2a9bfb68fbf05b4ccbc83cc070ab61f7aafee904 Mon Sep 17 00:00:00 2001 From: "estade@chromium.org" Date: Tue, 18 May 2010 19:14:50 +0000 Subject: GTK: prepend protocol to cuts/copies from the omnibox. I messed this up with r46767 BUG=44244 TEST=cut and copy both prepend the protocol when used on the entire omnibox contents. Review URL: http://codereview.chromium.org/2081005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47544 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'chrome/browser/autocomplete') diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc b/chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc index 5f4b1aaf..7977253 100644 --- a/chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc +++ b/chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc @@ -1226,10 +1226,13 @@ void AutocompleteEditViewGtk::HandleCopyOrCutClipboard(bool copy) { scw.WriteHyperlink(EscapeForHTML(text16), url.spec()); // Stop propagating the signal. - static guint signal_id = copy ? - g_signal_lookup("copy-clipboard", GTK_TYPE_TEXT_VIEW) : + static guint copy_signal_id = + g_signal_lookup("copy-clipboard", GTK_TYPE_TEXT_VIEW); + static guint cut_signal_id = g_signal_lookup("cut-clipboard", GTK_TYPE_TEXT_VIEW); - g_signal_stop_emission(text_view_, signal_id, 0); + g_signal_stop_emission(text_view_, + copy ? copy_signal_id : cut_signal_id, + 0); } } -- cgit v1.1