[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [arm/master] Use idle_add instead of timeout_add for work in gtk main loop.
commit 224a7d6ac7156815b625b82d7b48daa67173a049
Author: Kamran Riaz Khan <krkhan@xxxxxxxxxxxxxx>
Date: Sun Jun 26 04:02:49 2011 +0500
Use idle_add instead of timeout_add for work in gtk main loop.
---
src/gui/logPanel.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/gui/logPanel.py b/src/gui/logPanel.py
index 97a01cc..fc8e6b8 100644
--- a/src/gui/logPanel.py
+++ b/src/gui/logPanel.py
@@ -21,7 +21,7 @@ from cli.logPanel import (expandEvents, setEventListening, getLogFileEntries,
RUNLEVEL_EVENT_COLOR = {log.DEBUG: "#C73043", log.INFO: "#762A2A", log.NOTICE: "#222222",
log.WARN: "#AB7814", log.ERR: "#EC131F"}
-STARTUP_EVENTS = 'N3'
+STARTUP_EVENTS = 'A'
class LogPanel:
def __init__(self, builder):
@@ -66,7 +66,7 @@ class LogPanel:
conn.addEventListener(TorEventObserver(self.register_event))
conn.addTorCtlListener(self._register_torctl_event)
- gobject.timeout_add(1000, self.fill_log)
+ gobject.idle_add(self.fill_log)
def pack_widgets(self):
liststore = self.builder.get_object('liststore_log')
@@ -95,6 +95,7 @@ class LogPanel:
self.msgLog.appendleft(event)
finally:
self.lock.release()
+ gobject.idle_add(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