1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 15:28:11 +00:00

SystemMonitor: Save configuration of columns

Save the columns configuration from the last run in the respective
config file, and add a function to check whether a column should be
visible by default.
This commit is contained in:
Orel 2022-08-30 15:25:11 +03:00 committed by Sam Atkins
parent 290920222a
commit d8474805e8
3 changed files with 32 additions and 10 deletions

View file

@ -528,3 +528,19 @@ void ProcessModel::update()
// It would be good if GUI::Model had a way to orchestrate removal/insertion while preserving indices.
did_update(previous_tid_count == m_threads.size() ? GUI::Model::UpdateFlag::DontInvalidateIndices : GUI::Model::UpdateFlag::InvalidateAllIndices);
}
bool ProcessModel::is_default_column(int index) const
{
switch (index) {
case Column::PID:
case Column::TID:
case Column::Name:
case Column::CPU:
case Column::User:
case Column::Virtual:
case Column::DirtyPrivate:
return true;
default:
return false;
}
}