mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-26 22:38:51 +00:00
LibGUI: Add a GModelNotification class that views will receive.
I don't want to use GEvent here since these need to be synchronous and mixing sync and async GEvents would be stupid.
This commit is contained in:
parent
322f49caec
commit
bff5b71467
Notes:
sideshowbarker
2024-07-19 15:35:07 +09:00
Author: https://github.com/awesomekling
Commit: bff5b71467
6 changed files with 41 additions and 2 deletions
|
@ -19,6 +19,15 @@ void ProcessTableView::timer_event(GTimerEvent&)
|
|||
model().update();
|
||||
}
|
||||
|
||||
void ProcessTableView::model_notification(const GModelNotification& notification)
|
||||
{
|
||||
if (notification.type() == GModelNotification::ModelUpdated) {
|
||||
if (on_status_message)
|
||||
on_status_message(String::format("%d processes", model().row_count()));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
pid_t ProcessTableView::selected_pid() const
|
||||
{
|
||||
return model().selected_pid();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue