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:
parent
290920222a
commit
d8474805e8
3 changed files with 32 additions and 10 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue