[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [arm/release] Remove debug log statement and update log panel regularly via gobject.
commit 01529c340943a2b82cb6b98902e38cd10b4fcb86
Author: Kamran Riaz Khan <krkhan@xxxxxxxxxxxxxx>
Date: Sat Jun 25 15:06:55 2011 +0500
Remove debug log statement and update log panel regularly via gobject.
---
src/gui/controller.py | 2 --
src/gui/logPanel.py | 5 ++++-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/gui/controller.py b/src/gui/controller.py
index 090cc31..1c173af 100644
--- a/src/gui/controller.py
+++ b/src/gui/controller.py
@@ -24,8 +24,6 @@ class GuiController:
self.logPanel = logPanel.LogPanel(self.builder)
self.logPanel.pack_widgets()
- log.log(log.DEBUG, "Hello world!")
-
def run(self):
window = self.builder.get_object('window_main')
diff --git a/src/gui/logPanel.py b/src/gui/logPanel.py
index ab8eb4d..0a00137 100644
--- a/src/gui/logPanel.py
+++ b/src/gui/logPanel.py
@@ -62,6 +62,8 @@ class LogPanel:
conn.addEventListener(TorEventObserver(self.register_event))
conn.addTorCtlListener(self._register_torctl_event)
+ gobject.timeout_add(1000, self.fill_log)
+
def pack_widgets(self):
liststore = self.builder.get_object('liststore_log')
@@ -77,9 +79,10 @@ 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