diff options
author | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-22 19:20:42 +0000 |
---|---|---|
committer | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-22 19:20:42 +0000 |
commit | 95fe32f45f41ffd496466bc938968cabae2bad59 (patch) | |
tree | b7e4dfcfb1ccd306eea866f30cf33a2b101b1e47 | |
parent | 6ecb97b1ce16a00dcce6d800ea7670dd58355d59 (diff) | |
download | chromium_src-95fe32f45f41ffd496466bc938968cabae2bad59.zip chromium_src-95fe32f45f41ffd496466bc938968cabae2bad59.tar.gz chromium_src-95fe32f45f41ffd496466bc938968cabae2bad59.tar.bz2 |
gtk: Only accept text/uri-list drops in the tab strip. We were accepting text/plain before, which was giving us the html for a dragged image instead of the url of the image.
BUG=16165
TEST=Go to google.com. Drag the Google logo into the tabstrip. The image should open up in a new tab (or the current tab, depending on the drop).
Review URL: http://codereview.chromium.org/159212
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21304 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/gtk/tabs/tab_strip_gtk.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/chrome/browser/gtk/tabs/tab_strip_gtk.cc b/chrome/browser/gtk/tabs/tab_strip_gtk.cc index 3be68f3..e8bc85e 100644 --- a/chrome/browser/gtk/tabs/tab_strip_gtk.cc +++ b/chrome/browser/gtk/tabs/tab_strip_gtk.cc @@ -702,8 +702,7 @@ void TabStripGtk::Init() { static_cast<GdkDragAction>( GDK_ACTION_COPY | GDK_ACTION_MOVE | GDK_ACTION_LINK)); GtkDndUtil::SetDestTargetListFromCodeMask(tabstrip_.get(), - GtkDndUtil::TEXT_URI_LIST | - GtkDndUtil::TEXT_PLAIN); + GtkDndUtil::TEXT_URI_LIST); g_signal_connect(G_OBJECT(tabstrip_.get()), "expose-event", G_CALLBACK(OnExpose), this); @@ -1866,8 +1865,7 @@ gboolean TabStripGtk::OnDragDataReceived(GtkWidget* widget, TabStripGtk* tabstrip) { bool success = false; - // TODO(jhawkins): Parse URI lists. - if (info == GtkDndUtil::TEXT_PLAIN) { + if (info == GtkDndUtil::TEXT_URI_LIST) { success = tabstrip->CompleteDrop(data->data); } |