mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-26 03:09:08 +00:00
ProcessManager: Use a single timer for refreshing the view.
Also add a menu for changing the update frequency to some nice values.
This commit is contained in:
@@ -8,15 +8,14 @@ ProcessTableView::ProcessTableView(GWidget* parent)
|
||||
{
|
||||
set_model(GSortingProxyModel::create(ProcessModel::create()));
|
||||
model()->set_key_column_and_sort_order(ProcessModel::Column::CPU, GSortOrder::Descending);
|
||||
start_timer(1000);
|
||||
model()->update();
|
||||
refresh();
|
||||
}
|
||||
|
||||
ProcessTableView::~ProcessTableView()
|
||||
{
|
||||
}
|
||||
|
||||
void ProcessTableView::timer_event(CTimerEvent&)
|
||||
void ProcessTableView::refresh()
|
||||
{
|
||||
model()->update();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user