mirror of
https://github.com/xzeldon/htop.git
synced 2024-12-25 15:25:45 +00:00
Minor code streamlining
This commit is contained in:
parent
709821ff55
commit
c6b66a75ea
@ -25,11 +25,7 @@ static const char* const MainFunctions[] = {"Help ", "Setup ", "Search", "Filt
|
||||
|
||||
void MainPanel_updateTreeFunctions(MainPanel* this, bool mode) {
|
||||
FunctionBar* bar = MainPanel_getFunctionBar(this);
|
||||
if (mode) {
|
||||
FunctionBar_setLabel(bar, KEY_F(5), "Sorted");
|
||||
} else {
|
||||
FunctionBar_setLabel(bar, KEY_F(5), "Tree ");
|
||||
}
|
||||
FunctionBar_setLabel(bar, KEY_F(5), mode ? "Sorted" : "Tree ");
|
||||
}
|
||||
|
||||
void MainPanel_pidSearch(MainPanel* this, int ch) {
|
||||
|
@ -431,11 +431,11 @@ static void ProcessList_buildTree(ProcessList* this) {
|
||||
}
|
||||
|
||||
void ProcessList_sort(ProcessList* this) {
|
||||
if (!this->settings->treeView) {
|
||||
Vector_insertionSort(this->processes);
|
||||
} else {
|
||||
if (this->settings->treeView) {
|
||||
ProcessList_updateTreeSet(this);
|
||||
Vector_quickSortCustomCompare(this->processes, ProcessList_treeProcessCompare);
|
||||
} else {
|
||||
Vector_insertionSort(this->processes);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user