diff options
author | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-20 00:27:42 +0000 |
---|---|---|
committer | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-20 00:27:42 +0000 |
commit | 1a4a5cc452e74bd71a9702a43e8ba116900e8629 (patch) | |
tree | dfd7e3b1ba84c7fcba17446223a6b90d08015acc /app/gtk_dnd_util.cc | |
parent | bc04c68a59eb4b7d6e154f396f6506cba7ba73e0 (diff) | |
download | chromium_src-1a4a5cc452e74bd71a9702a43e8ba116900e8629.zip chromium_src-1a4a5cc452e74bd71a9702a43e8ba116900e8629.tar.gz chromium_src-1a4a5cc452e74bd71a9702a43e8ba116900e8629.tar.bz2 |
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
Diffstat (limited to 'app/gtk_dnd_util.cc')
-rw-r--r-- | app/gtk_dnd_util.cc | 11 |
1 files changed, 11 insertions, 0 deletions
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<const guchar*>(utf8_text.c_str()), + utf8_text.length()); + break; + } + default: { NOTREACHED(); break; |