mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-19 00:31:52 +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:
parent
d73ed74d1c
commit
ac19fabaaf
Notes:
sideshowbarker
2024-07-19 14:40:09 +09:00
Author: https://github.com/awesomekling
Commit: ac19fabaaf
4 changed files with 25 additions and 8 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue