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

Unified Diff: chrome/browser/cocoa/task_manager_mac.mm

Issue 3035040: Revert 54206 - Mac: Keep groups when sorting task manager, like windows does.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/task_manager_mac.mm
===================================================================
--- chrome/browser/cocoa/task_manager_mac.mm (revision 54210)
+++ chrome/browser/cocoa/task_manager_mac.mm (working copy)
@@ -60,19 +60,10 @@
model_(model) {}
bool operator()(int a, int b) {
- std::pair<int, int> group_range1 = model_->GetGroupRangeForResource(a);
- std::pair<int, int> group_range2 = model_->GetGroupRangeForResource(b);
- if (group_range1 == group_range2) {
- // The two rows are in the same group, sort so that items in the same
- // group always appear in the same order. |ascending_| is intentionally
- // ignored.
- return a < b;
- }
- // Sort by the first entry of each of the groups.
- int cmp_result = model_->CompareValues(
- group_range1.first, group_range2.first, sort_column_);
+ int cmp_result = model_->CompareValues(a, b, sort_column_ );
if (!ascending_)
cmp_result = -cmp_result;
+ // TODO(thakis): Do grouping like on GTK.
return cmp_result < 0;
}
private:
@@ -419,8 +410,7 @@
NSString* title = [self modelTextForRow:rowIndex
column:[[tableColumn identifier] intValue]];
[buttonCell setTitle:title];
- [buttonCell setImage:
- taskManagerObserver_->GetImageForRow(indexShuffle_[rowIndex])];
+ [buttonCell setImage:taskManagerObserver_->GetImageForRow(rowIndex)];
[buttonCell setRefusesFirstResponder:YES]; // Don't push in like a button.
[buttonCell setHighlightsBy:NSNoCellMask];
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698