Update the hardware view on Pulse()
This lets the network stats update in realtime. Fixes #11395.
This commit is contained in:
@@ -44,6 +44,8 @@ InterfaceHardwareView::InterfaceHardwareView(NetworkSettings* settings)
|
||||
{
|
||||
SetLayout(new BGroupLayout(B_VERTICAL));
|
||||
|
||||
SetFlags(Flags() | B_PULSE_NEEDED);
|
||||
|
||||
// TODO : Small graph of throughput?
|
||||
|
||||
float minimumWidth = be_control_look->DefaultItemSpacing() * 16;
|
||||
@@ -163,6 +165,14 @@ InterfaceHardwareView::MessageReceived(BMessage* message)
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
InterfaceHardwareView::Pulse()
|
||||
{
|
||||
// TODO maybe not everything needs to be updated here.
|
||||
Update();
|
||||
}
|
||||
|
||||
|
||||
// #pragma mark - InterfaceHardwareView public methods
|
||||
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@ public:
|
||||
|
||||
virtual void MessageReceived(BMessage* message);
|
||||
virtual void AttachedToWindow();
|
||||
void Pulse();
|
||||
status_t Revert();
|
||||
status_t Save();
|
||||
|
||||
|
||||
@@ -126,7 +126,6 @@ InterfacesAddOn::MessageReceived(BMessage* msg)
|
||||
break;
|
||||
|
||||
default:
|
||||
msg->PrintToStream();
|
||||
BBox::MessageReceived(msg);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -549,8 +549,6 @@ InterfacesListView::_HandleNetworkMessage(BMessage* message)
|
||||
const char* name;
|
||||
int32 opcode;
|
||||
|
||||
message->PrintToStream();
|
||||
|
||||
if (message->FindInt32("opcode", &opcode) != B_OK)
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user