Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(333)

Issue 159256: Bookmark bar: Don't connect to the OnDragDrop signal since we can just use th... (Closed)

Created:
11 years, 5 months ago by Evan Stade
Modified:
9 years, 6 months ago
Reviewers:
Elliot Glaysher
CC:
chromium-reviews_googlegroups.com, Ben Goodger (Google)
Visibility:
Public.

Description

Bookmark bar: Don't connect to the OnDragDrop signal since we can just use the default. Eventually we may want to allow dropping more different types, and we will need to implement an OnDragDrop handler so we can properly prioritize these types (preferring BOOKMARK_ITEM over TEXT_PLAIN and so forth). But for now we can just use the default handler. BUG=17501 TEST=drag an image onto the bookmark bar, note that there is only one link created Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=21448

Patch Set 1 #

Patch Set 2 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+0 lines, -24 lines) Patch
M chrome/browser/gtk/bookmark_bar_gtk.h View 1 chunk +0 lines, -3 lines 0 comments Download
M chrome/browser/gtk/bookmark_bar_gtk.cc View 1 2 chunks +0 lines, -21 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
Evan Stade
11 years, 5 months ago (2009-07-23 02:38:57 UTC) #1
Elliot Glaysher
11 years, 5 months ago (2009-07-23 16:37:20 UTC) #2
LGTM

On Wed, Jul 22, 2009 at 7:38 PM, <estade@chromium.org> wrote:
> Reviewers: Elliot Glaysher,
>
> Description:
> Bookmark bar: Don't connect to the OnDragDrop signal since we can just
> use the default.
>
> Eventually we may want to allow dropping more different types, and we
> will need to implement an OnDragDrop handler so we can properly
> prioritize these types (preferring BOOKMARK_ITEM over TEXT_PLAIN and so
> forth). But for now we can just use the default handler.
>
> BUG=3D17501
> TEST=3Ddrag an image onto the bookmark bar, note that there is only one
> link created
>
>
> Please review this at http://codereview.chromium.org/159256
>
> SVN Base: svn://chrome-svn/chrome/trunk/src/
>
> Affected files:
> =A0M =A0 =A0 chrome/browser/gtk/bookmark_bar_gtk.h
> =A0M =A0 =A0 chrome/browser/gtk/bookmark_bar_gtk.cc
>
>
> Index: chrome/browser/gtk/bookmark_bar_gtk.h
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> --- chrome/browser/gtk/bookmark_bar_gtk.h =A0 =A0 =A0 (revision 21363)
> +++ chrome/browser/gtk/bookmark_bar_gtk.h =A0 =A0 =A0 (working copy)
> @@ -183,9 +183,6 @@
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0GdkDra=
gContext* context,
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0guint =
time,
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0Bookma=
rkBarGtk* bar);
> - =A0static gboolean OnToolbarDragDrop(GtkWidget* widget, GdkDragContext*
> context,
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
gint x, gint y, guint time,
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
BookmarkBarGtk* bar);
> =A0 static void OnToolbarDragReceived(GtkWidget* widget,
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 G=
dkDragContext* context,
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 g=
int x, gint y,
> Index: chrome/browser/gtk/bookmark_bar_gtk.cc
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> --- chrome/browser/gtk/bookmark_bar_gtk.cc =A0 =A0 =A0(revision 21363)
> +++ chrome/browser/gtk/bookmark_bar_gtk.cc =A0 =A0 =A0(working copy)
> @@ -165,8 +165,6 @@
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0G_CALLBACK(&OnToolbarDragMotion), =
this);
> =A0 g_signal_connect(bookmark_toolbar_.get(), "drag-leave",
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0G_CALLBACK(&OnToolbarDragLeave), t=
his);
> - =A0g_signal_connect(bookmark_toolbar_.get(), "drag-drop",
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 G_CALLBACK(&OnToolbarDragDrop), thi=
s);
> =A0 g_signal_connect(bookmark_toolbar_.get(), "drag-data-received",
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0G_CALLBACK(&OnToolbarDragReceived)=
, this);
> =A0 g_signal_connect(bookmark_toolbar_.get(), "button-press-event",
> @@ -772,25 +770,6 @@
> =A0}
>
> =A0// static
> -gboolean BookmarkBarGtk::OnToolbarDragDrop(
> - =A0 =A0GtkWidget* widget, GdkDragContext* context,
> - =A0 =A0gint x, gint y, guint time,
> - =A0 =A0BookmarkBarGtk* bar) {
> - =A0gboolean is_valid_drop_site =3D FALSE;
> -
> - =A0if (context->targets) {
> - =A0 =A0GdkAtom target_type =3D
> - =A0 =A0 =A0 =A0GDK_POINTER_TO_ATOM(g_list_nth_data(
> - =A0 =A0 =A0 =A0 =A0 =A0context->targets, GtkDndUtil::CHROME_BOOKMARK_IT=
EM));
> - =A0 =A0gtk_drag_get_data(widget, context, target_type, time);
> -
> - =A0 =A0is_valid_drop_site =3D TRUE;
> - =A0}
> -
> - =A0return is_valid_drop_site;
> -}
> -
> -// static
> =A0void BookmarkBarGtk::OnToolbarDragReceived(GtkWidget* widget,
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0GdkDragContext* context,
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0gint x, gint y,
>
>
>

Powered by Google App Engine
This is Rietveld 408576698