diff options
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; |