From 1a4a5cc452e74bd71a9702a43e8ba116900e8629 Mon Sep 17 00:00:00 2001 From: "tony@chromium.org" Date: Wed, 20 Jan 2010 00:27:42 +0000 Subject: Allow link drags from the star, bookmarks bar, and bookmark bar menus to the Gnome desktop (nautilus). These should create shortcuts. Other drag operations should be the same as before. BUG=24210 Review URL: http://codereview.chromium.org/548067 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36585 0039d316-1c4b-4281-b951-d872f2087c98 --- app/gtk_dnd_util.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'app/gtk_dnd_util.cc') diff --git a/app/gtk_dnd_util.cc b/app/gtk_dnd_util.cc index da4362dc..fb2f492 100644 --- a/app/gtk_dnd_util.cc +++ b/app/gtk_dnd_util.cc @@ -154,6 +154,17 @@ void GtkDndUtil::WriteURLWithName(GtkSelectionData* selection_data, pickle.size()); break; } + case NETSCAPE_URL: { + // _NETSCAPE_URL format is URL + \n + title. + std::string utf8_text = url.spec() + "\n" + UTF16ToUTF8(title); + gtk_selection_data_set(selection_data, + selection_data->target, + kBitsPerByte, + reinterpret_cast(utf8_text.c_str()), + utf8_text.length()); + break; + } + default: { NOTREACHED(); break; -- cgit v1.1