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

[tor-commits] [arm/release] Fill panels immediately at launch instead of waiting for first timeout.



commit aef4158d0436449d696ad26d83b2dfd5c23505c1
Author: Kamran Riaz Khan <krkhan@xxxxxxxxxxxxxx>
Date:   Thu Jul 14 14:15:55 2011 +0500

    Fill panels immediately at launch instead of waiting for first timeout.
---
 src/gui/connections/connPanel.py |   10 +++++++---
 src/gui/stickyPanel.py           |   11 ++++++++---
 2 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/src/gui/connections/connPanel.py b/src/gui/connections/connPanel.py
index e6a7c5b..af9bf06 100644
--- a/src/gui/connections/connPanel.py
+++ b/src/gui/connections/connPanel.py
@@ -49,11 +49,17 @@ class ConnectionPanel(CliConnectionPanel):
     torCmdName = sysTools.getProcessName(torPid, "tor")
     connections.getResolver(torCmdName, torPid, "tor")
 
-    gobject.timeout_add(3000, self._fill_entries)
+    gobject.idle_add(self._fill_entries)
+    gobject.timeout_add(3000, self._timeout_fill_entries)
 
   def pack_widgets(self):
     pass
 
+  def _timeout_fill_entries(self):
+    self._fill_entries()
+
+    return True
+
   def _fill_entries(self):
     self.valsLock.acquire()
 
@@ -106,5 +112,3 @@ class ConnectionPanel(CliConnectionPanel):
 
     self.valsLock.release()
 
-    return True
-
diff --git a/src/gui/stickyPanel.py b/src/gui/stickyPanel.py
index 89b5485..145c452 100644
--- a/src/gui/stickyPanel.py
+++ b/src/gui/stickyPanel.py
@@ -20,12 +20,19 @@ class StickyPanel(CliHeaderPanel):
     CliHeaderPanel.__init__(self, None, time.time())
 
     self.builder = builder
+    self.filled = False
 
-    gobject.timeout_add(3000, self._fill_entries)
+    gobject.idle_add(self._fill_entries)
+    gobject.timeout_add(3000, self._timeout_fill_entries)
 
   def pack_widgets(self):
     pass
 
+  def _timeout_fill_entries(self):
+    self._fill_entries()
+
+    return True
+
   def _fill_entries(self):
     self.valsLock.acquire()
 
@@ -114,5 +121,3 @@ class StickyPanel(CliHeaderPanel):
 
     self.valsLock.release()
 
-    return True
-



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