[haiku-commits] haiku: hrev48355 - src/preferences/network/InterfacesAddOn

  • From: pulkomandy@xxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Fri, 21 Nov 2014 11:19:16 +0100 (CET)

hrev48355 adds 1 changeset to branch 'master'
old head: ea68c297095499acdcb0866f54346cf89fd073be
new head: 21e5fc49a70cccc13e033a1e62b281dab27b1ea2
overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=21e5fc4+%5Eea68c29

----------------------------------------------------------------------------

21e5fc4: Update the hardware view on Pulse()
  
  This lets the network stats update in realtime.
  Fixes #11395.

                                 [ Adrien Destugues <pulkomandy@xxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev48355
Commit:      21e5fc49a70cccc13e033a1e62b281dab27b1ea2
URL:         http://cgit.haiku-os.org/haiku/commit/?id=21e5fc4
Author:      Adrien Destugues <pulkomandy@xxxxxxxxx>
Date:        Fri Nov 21 10:18:43 2014 UTC

Ticket:      https://dev.haiku-os.org/ticket/11395

----------------------------------------------------------------------------

4 files changed, 11 insertions(+), 3 deletions(-)
.../network/InterfacesAddOn/InterfaceHardwareView.cpp      | 10 ++++++++++
.../network/InterfacesAddOn/InterfaceHardwareView.h        |  1 +
.../network/InterfacesAddOn/InterfacesAddOn.cpp            |  1 -
.../network/InterfacesAddOn/InterfacesListView.cpp         |  2 --

----------------------------------------------------------------------------

diff --git a/src/preferences/network/InterfacesAddOn/InterfaceHardwareView.cpp 
b/src/preferences/network/InterfacesAddOn/InterfaceHardwareView.cpp
index 4485d69..9c1f8e8 100644
--- a/src/preferences/network/InterfacesAddOn/InterfaceHardwareView.cpp
+++ b/src/preferences/network/InterfacesAddOn/InterfaceHardwareView.cpp
@@ -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
 
 
diff --git a/src/preferences/network/InterfacesAddOn/InterfaceHardwareView.h 
b/src/preferences/network/InterfacesAddOn/InterfaceHardwareView.h
index abb4cbb..36f8a54 100644
--- a/src/preferences/network/InterfacesAddOn/InterfaceHardwareView.h
+++ b/src/preferences/network/InterfacesAddOn/InterfaceHardwareView.h
@@ -33,6 +33,7 @@ public:
 
        virtual void                            MessageReceived(BMessage* 
message);
        virtual void                            AttachedToWindow();
+                       void                            Pulse();
                        status_t                        Revert();
                        status_t                        Save();
 
diff --git a/src/preferences/network/InterfacesAddOn/InterfacesAddOn.cpp 
b/src/preferences/network/InterfacesAddOn/InterfacesAddOn.cpp
index 25c9ab5..d8a3ad0 100644
--- a/src/preferences/network/InterfacesAddOn/InterfacesAddOn.cpp
+++ b/src/preferences/network/InterfacesAddOn/InterfacesAddOn.cpp
@@ -126,7 +126,6 @@ InterfacesAddOn::MessageReceived(BMessage* msg)
                        break;
 
                default:
-                       msg->PrintToStream();
                        BBox::MessageReceived(msg);
        }
 }
diff --git a/src/preferences/network/InterfacesAddOn/InterfacesListView.cpp 
b/src/preferences/network/InterfacesAddOn/InterfacesListView.cpp
index 23a577d..be31545 100644
--- a/src/preferences/network/InterfacesAddOn/InterfacesListView.cpp
+++ b/src/preferences/network/InterfacesAddOn/InterfacesListView.cpp
@@ -549,8 +549,6 @@ InterfacesListView::_HandleNetworkMessage(BMessage* message)
        const char* name;
        int32 opcode;
 
-       message->PrintToStream();
-
        if (message->FindInt32("opcode", &opcode) != B_OK)
                return;
 


Other related posts:

  • » [haiku-commits] haiku: hrev48355 - src/preferences/network/InterfacesAddOn - pulkomandy