diff options
Diffstat (limited to 'chrome/views/table_view.cc')
-rw-r--r-- | chrome/views/table_view.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/chrome/views/table_view.cc b/chrome/views/table_view.cc index bf35e1b..a94b9a3 100644 --- a/chrome/views/table_view.cc +++ b/chrome/views/table_view.cc @@ -516,6 +516,7 @@ bool TableView::GetCellColors(int model_row, return false; } +// static LRESULT CALLBACK TableView::TableWndProc(HWND window, UINT message, WPARAM w_param, @@ -537,6 +538,22 @@ LRESULT CALLBACK TableView::TableWndProc(HWND window, return result; } + case WM_KEYDOWN: { + if (!table_view->single_selection_ && w_param == 'A' && + GetKeyState(VK_CONTROL) < 0 && table_view->RowCount() > 0) { + // Select everything. + ListView_SetItemState(window, -1, LVIS_SELECTED, LVIS_SELECTED); + // And make the first row focused. + ListView_SetItemState(window, 0, LVIS_FOCUSED, LVIS_FOCUSED); + return 0; + } else if (w_param == VK_DELETE && table_view->table_view_observer_) { + table_view->table_view_observer_->OnTableViewDelete(table_view); + return 0; + } + // else case: fall through to default processing. + break; + } + default: break; } |