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

Unified Diff: views/controls/table/table_view.cc

Issue 115665: Middle clicking on a bookmark from the bookmark manager now... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « views/controls/table/table_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/table/table_view.cc
===================================================================
--- views/controls/table/table_view.cc (revision 16540)
+++ views/controls/table/table_view.cc (working copy)
@@ -649,6 +649,19 @@
return 0;
}
+ case WM_MBUTTONDOWN: {
+ if (w_param == MK_MBUTTON) {
+ int view_index = GetViewIndexFromMouseEvent(window, l_param);
+ if (view_index != -1) {
+ int model_index = table_view->view_to_model(view_index);
+ // Clear all and select the row that was middle clicked.
+ table_view->Select(model_index);
+ table_view->OnMiddleClick();
+ }
+ }
+ return 0;
+ }
+
case WM_LBUTTONUP: {
if (in_mouse_down) {
in_mouse_down = false;
@@ -1478,6 +1491,11 @@
}
}
+void TableView::OnMiddleClick() {
+ if (!ignore_listview_change_ && table_view_observer_)
+ table_view_observer_->OnMiddleClick();
+}
+
void TableView::OnSelectedStateChanged() {
if (!ignore_listview_change_ && table_view_observer_) {
table_view_observer_->OnSelectionChanged();
« no previous file with comments | « views/controls/table/table_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698