browser: make sorting optional
This adds a new option, "noop", to browser_sort_mode. If this mode is selected, no sorting is done in the browser view, and the elements are shown in the same order as received from the MPD server.
This commit is contained in:
committed by
Andrzej Rybczak
parent
49f53c07bb
commit
9e8dc741e5
@@ -60,6 +60,9 @@ std::ostream &operator<<(std::ostream &os, SortMode sm)
|
||||
case SortMode::CustomFormat:
|
||||
os << "format";
|
||||
break;
|
||||
case SortMode::NoOp:
|
||||
os << "noop";
|
||||
break;
|
||||
}
|
||||
return os;
|
||||
}
|
||||
@@ -74,6 +77,8 @@ std::istream &operator>>(std::istream &is, SortMode &sm)
|
||||
sm = SortMode::ModificationTime;
|
||||
else if (ssm == "format")
|
||||
sm = SortMode::CustomFormat;
|
||||
else if (ssm == "noop")
|
||||
sm = SortMode::NoOp;
|
||||
else
|
||||
is.setstate(std::ios::failbit);
|
||||
return is;
|
||||
|
||||
Reference in New Issue
Block a user