mirror of https://github.com/xzeldon/htop.git
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) {
|
void MainPanel_updateTreeFunctions(MainPanel* this, bool mode) {
|
||||||
FunctionBar* bar = MainPanel_getFunctionBar(this);
|
FunctionBar* bar = MainPanel_getFunctionBar(this);
|
||||||
if (mode) {
|
FunctionBar_setLabel(bar, KEY_F(5), mode ? "Sorted" : "Tree ");
|
||||||
FunctionBar_setLabel(bar, KEY_F(5), "Sorted");
|
|
||||||
} else {
|
|
||||||
FunctionBar_setLabel(bar, KEY_F(5), "Tree ");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainPanel_pidSearch(MainPanel* this, int ch) {
|
void MainPanel_pidSearch(MainPanel* this, int ch) {
|
||||||
|
|
|
@ -431,11 +431,11 @@ static void ProcessList_buildTree(ProcessList* this) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void ProcessList_sort(ProcessList* this) {
|
void ProcessList_sort(ProcessList* this) {
|
||||||
if (!this->settings->treeView) {
|
if (this->settings->treeView) {
|
||||||
Vector_insertionSort(this->processes);
|
|
||||||
} else {
|
|
||||||
ProcessList_updateTreeSet(this);
|
ProcessList_updateTreeSet(this);
|
||||||
Vector_quickSortCustomCompare(this->processes, ProcessList_treeProcessCompare);
|
Vector_quickSortCustomCompare(this->processes, ProcessList_treeProcessCompare);
|
||||||
|
} else {
|
||||||
|
Vector_insertionSort(this->processes);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue