[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [arm/master] Remove gobject timeout.



commit ae45817503f817f7d97d41358315b516fc4222b8
Author: Kamran Riaz Khan <krkhan@xxxxxxxxxxxxxx>
Date:   Sat Jun 25 15:08:54 2011 +0500

    Remove gobject timeout.
    
    Gobject timeout works well for graphs but creates issues for selecting
    log rows. Instead, call fill_log() in constructor of panel and then
    subsequently on addition of each entry.
---
 src/gui/logPanel.py |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/gui/logPanel.py b/src/gui/logPanel.py
index 0a00137..6ac6418 100644
--- a/src/gui/logPanel.py
+++ b/src/gui/logPanel.py
@@ -62,7 +62,7 @@ class LogPanel:
     conn.addEventListener(TorEventObserver(self.register_event))
     conn.addTorCtlListener(self._register_torctl_event)
 
-    gobject.timeout_add(1000, self.fill_log)
+    self.fill_log()
 
   def pack_widgets(self):
     liststore = self.builder.get_object('liststore_log')
@@ -79,10 +79,9 @@ class LogPanel:
       row = (long(entry.timestamp), timeLabel, entry.type, entry.msg, entry.color)
       liststore.append(row)
 
-    return True
-
   def register_event(self, event):
     self.msgLog.appendleft(event)
+    self.fill_log()
 
   def _register_arm_event(self, level, msg, eventTime):
     eventColor = RUNLEVEL_EVENT_COLOR[level]



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits