diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-03 20:11:30 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-03 20:11:30 +0000 |
commit | 2083180a0fe0e7b32022f409c7549097f15e5757 (patch) | |
tree | 7510af890fcf567d85c9e756c0b266699db3e016 /chrome/browser | |
parent | a0b0d63b60bbc0675115317a0b08ee4183436787 (diff) | |
download | chromium_src-2083180a0fe0e7b32022f409c7549097f15e5757.zip chromium_src-2083180a0fe0e7b32022f409c7549097f15e5757.tar.gz chromium_src-2083180a0fe0e7b32022f409c7549097f15e5757.tar.bz2 |
GTK: middle click on a bookmark bar folder should open all in tabs.
BUG=34416
TEST=try it
Review URL: http://codereview.chromium.org/569031
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38003 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/bookmarks/bookmark_utils.cc | 1 | ||||
-rw-r--r-- | chrome/browser/gtk/bookmark_bar_gtk.cc | 13 |
2 files changed, 13 insertions, 1 deletions
diff --git a/chrome/browser/bookmarks/bookmark_utils.cc b/chrome/browser/bookmarks/bookmark_utils.cc index e35c55c..816d6d8 100644 --- a/chrome/browser/bookmarks/bookmark_utils.cc +++ b/chrome/browser/bookmarks/bookmark_utils.cc @@ -157,6 +157,7 @@ bool ShouldOpenAll(gfx::NativeWindow parent, MB_YESNO | MB_ICONWARNING | MB_TOPMOST) == IDYES; #else // TODO(port): Display a dialog prompt. + // http://crbug.com/34481 NOTIMPLEMENTED(); return true; #endif diff --git a/chrome/browser/gtk/bookmark_bar_gtk.cc b/chrome/browser/gtk/bookmark_bar_gtk.cc index e35509e..9aefa37 100644 --- a/chrome/browser/gtk/bookmark_bar_gtk.cc +++ b/chrome/browser/gtk/bookmark_bar_gtk.cc @@ -855,6 +855,9 @@ GtkToolItem* BookmarkBarGtk::CreateBookmarkToolItem(const BookmarkNode* node) { } void BookmarkBarGtk::ConnectFolderButtonEvents(GtkWidget* widget) { + // Accept middle mouse clicking (which opens all). + gtk_util::SetButtonClickableByMouseButtons(widget, true, true, false); + gtk_drag_dest_set(widget, GTK_DEST_DEFAULT_ALL, NULL, 0, kDragAction); GtkDndUtil::SetDestTargetList(widget, kDestTargetList); g_signal_connect(widget, "drag-data-received", @@ -1029,7 +1032,15 @@ void BookmarkBarGtk::OnFolderClicked(GtkWidget* sender, if (throbber) throbber->Destroy(); - bar->PopupForButton(sender); + GdkEvent* event = gtk_get_current_event(); + if (event->button.button == 1) { + bar->PopupForButton(sender); + } else if (event->button.button == 2) { + const BookmarkNode* node = bar->GetNodeForToolButton(sender); + bookmark_utils::OpenAll(bar->window_->GetNativeHandle(), + bar->profile_, bar->page_navigator_, + node, NEW_BACKGROUND_TAB); + } } // static |