From 30b37223ffbe72663bc8c0ca7300d616fd44553d Mon Sep 17 00:00:00 2001
From: latu <latu@localhost.localdomain>
Date: Thu, 11 Feb 2010 11:29:05 -0200
Subject: [PATCH] Connection Info Fix
---
extensions/deviceicon/network.py | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/extensions/deviceicon/network.py b/extensions/deviceicon/network.py
index 2e3671b..2f27097 100644
a
|
b
|
class GsmDeviceView(TrayIcon): |
816 | 816 | connection.set_connected() |
817 | 817 | self._connection_timestamp = time.time() - \ |
818 | 818 | connection.get_settings().connection.timestamp |
819 | | self._connection_time_handler = gobject.timeout_add( \ |
820 | | 1000, self.__connection_timecount_cb) |
| 819 | self._connection_time_handler = gobject.timeout_add_seconds( \ |
| 820 | 1, self.__connection_timecount_cb) |
821 | 821 | self._update_stats(0, 0) |
822 | 822 | self._update_connection_time() |
823 | 823 | self._palette.info_box.show() |
824 | 824 | |
825 | | if state is network.DEVICE_STATE_DISCONNECTED: |
| 825 | elif state is network.DEVICE_STATE_DISCONNECTED: |
826 | 826 | gsm_state = _GSM_STATE_DISCONNECTED |
827 | 827 | self._connection_timestamp = 0 |
828 | 828 | if self._connection_time_handler is not None: |
… |
… |
class GsmDeviceView(TrayIcon): |
852 | 852 | self._update_stats(in_bytes, out_bytes) |
853 | 853 | |
854 | 854 | def _update_stats(self, in_bytes, out_bytes): |
855 | | in_kbytes = in_bytes / 1024 |
856 | | out_kbytes = out_bytes / 1024 |
857 | | text = _("Data sent %d kb / received %d kb") % (out_kbytes, in_kbytes) |
| 855 | in_KBytes = in_bytes / 1024 |
| 856 | out_KBytes = out_bytes / 1024 |
| 857 | text = _("Data sent %d KB / received %d KB") % (out_KBytes, in_KBytes) |
858 | 858 | self._palette.data_label.set_text(text) |
859 | 859 | |
860 | 860 | def __connection_timecount_cb(self): |
861 | 861 | self._connection_timestamp = self._connection_timestamp + 1 |
862 | | self._update_connectiontime() |
| 862 | self._update_connection_time() |
863 | 863 | return True |
864 | 864 | |
865 | 865 | def _update_connection_time(self): |