diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/leap/gui/statuspanel.py | 11 | 
1 files changed, 11 insertions, 0 deletions
| diff --git a/src/leap/gui/statuspanel.py b/src/leap/gui/statuspanel.py index ac0f5162..3e0377f9 100644 --- a/src/leap/gui/statuspanel.py +++ b/src/leap/gui/statuspanel.py @@ -126,6 +126,16 @@ class StatusPanelWidget(QtGui.QWidget):          self._up_rate = RateMovingAverage()          self._down_rate = RateMovingAverage() +    def _reset_traffic_rates(self): +        """ +        Resets up and download rates, and cleans up the labels. +        """ +        self._up_rate.reset() +        self._down_rate.reset() +        zeroed = {VPNManager.TUNTAP_WRITE_KEY: 0, +                  VPNManager.TUNTAP_READ_KEY: 0} +        self.update_vpn_status(zeroed) +      def _update_traffic_rates(self, up, down):          """          Updates up and download rates. @@ -286,6 +296,7 @@ class StatusPanelWidget(QtGui.QWidget):          Sets the state of the widget to how it should look after EIP          has stopped          """ +        self._reset_traffic_rates()          self.ui.btnEipStartStop.setText(self.tr("Turn ON"))          self.ui.btnEipStartStop.disconnect(self)          self.ui.btnEipStartStop.clicked.connect( | 
