diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-20 20:03:29 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-20 20:03:29 +0000 |
commit | 9db1531af8305e917ff5bb02657bc9130b073b53 (patch) | |
tree | e42a300f476bce1f38c6031b338c3c704e1e14e4 | |
parent | a3b8d979e2c8afa6f72998ad2dfdd95b3f9e577e (diff) | |
download | chromium_src-9db1531af8305e917ff5bb02657bc9130b073b53.zip chromium_src-9db1531af8305e917ff5bb02657bc9130b073b53.tar.gz chromium_src-9db1531af8305e917ff5bb02657bc9130b073b53.tar.bz2 |
GTK: fix task manager grouped row selection
more sorted-path/unsorted-path conversion hoop jumping
BUG=41564
TEST=manual
Review URL: http://codereview.chromium.org/1630031
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45072 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/gtk/task_manager_gtk.cc | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/chrome/browser/gtk/task_manager_gtk.cc b/chrome/browser/gtk/task_manager_gtk.cc index 96a6229..af8010a 100644 --- a/chrome/browser/gtk/task_manager_gtk.cc +++ b/chrome/browser/gtk/task_manager_gtk.cc @@ -860,13 +860,15 @@ void TaskManagerGtk::OnSelectionChanged(GtkTreeSelection* selection) { for (std::set<std::pair<int, int> >::iterator iter = ranges.begin(); iter != ranges.end(); ++iter) { - GtkTreePath* start_path = - gtk_tree_path_new_from_indices(iter->first, -1); - GtkTreePath* end_path = - gtk_tree_path_new_from_indices(iter->first + iter->second - 1, -1); - gtk_tree_selection_select_range(selection, start_path, end_path); - gtk_tree_path_free(start_path); - gtk_tree_path_free(end_path); + for (int i = 0; i < iter->second; ++i) { + GtkTreePath* child_path = gtk_tree_path_new_from_indices(iter->first + i, + -1); + GtkTreePath* sort_path = gtk_tree_model_sort_convert_child_path_to_path( + GTK_TREE_MODEL_SORT(process_list_sort_), child_path); + gtk_tree_selection_select_path(selection, sort_path); + gtk_tree_path_free(child_path); + gtk_tree_path_free(sort_path); + } } bool sensitive = (paths != NULL) && !selection_contains_browser_process; |