diff options
Diffstat (limited to 'app/gtk_dnd_util.cc')
-rw-r--r-- | app/gtk_dnd_util.cc | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/app/gtk_dnd_util.cc b/app/gtk_dnd_util.cc index fb2f492..32c5150 100644 --- a/app/gtk_dnd_util.cc +++ b/app/gtk_dnd_util.cc @@ -49,6 +49,16 @@ GdkAtom GtkDndUtil::GetAtomForTarget(int target) { const_cast<char*>("_NETSCAPE_URL"), false); return netscape_url; + case TEXT_PLAIN_NO_CHARSET: + static GdkAtom text_no_charset_atom = gdk_atom_intern( + const_cast<char*>("text/plain"), false); + return text_no_charset_atom; + + case DIRECT_SAVE_FILE: + static GdkAtom xds_atom = gdk_atom_intern( + const_cast<char*>("XdndDirectSave0"), false); + return xds_atom; + default: NOTREACHED(); } @@ -114,10 +124,15 @@ void GtkDndUtil::AddTargetToList(GtkTargetList* targets, int target_code) { case CHROME_TAB: case CHROME_BOOKMARK_ITEM: case CHROME_NAMED_URL: - gtk_target_list_add(targets, GtkDndUtil::GetAtomForTarget(target_code), + gtk_target_list_add(targets, GetAtomForTarget(target_code), GTK_TARGET_SAME_APP, target_code); break; + case DIRECT_SAVE_FILE: + gtk_target_list_add(targets, GetAtomForTarget(DIRECT_SAVE_FILE), 0, + DIRECT_SAVE_FILE); + break; + default: NOTREACHED() << " Unexpected target code: " << target_code; } |