Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Gueret <christophe.gueret@gmail.com>2012-11-08 22:46:55 (GMT)
committer Christophe Gueret <christophe.gueret@gmail.com>2012-11-08 22:46:55 (GMT)
commit66a101eb5e83940086908db5c51030ebb4408dec (patch)
tree1bd4fa2c757e526da72a6a9ed16bf1a0fbfe1c1f
parent10d303b9f9488a9012b674927a35dbd1fba306da (diff)
Added refresh of talks/comments
-rw-r--r--activity_review/src/View.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/activity_review/src/View.py b/activity_review/src/View.py
index 3eae5a5..8b50c42 100644
--- a/activity_review/src/View.py
+++ b/activity_review/src/View.py
@@ -3,7 +3,7 @@ Created on 22 Oct 2012
@author: cgueret
'''
-from gi.repository import Gtk
+from gi.repository import Gtk, GObject
from semanticxo import graphstore
from Model import ReviewModel
@@ -16,12 +16,15 @@ class Main(object):
# Create the internal variables used to store the list of talks
self._talks = {}
self._talks_notebook = builder.get_object("talks_notebook")
-
+
# Get the main widget
self._widget = builder.get_object("main_box")
# Load the talks
self.reload_talks()
+
+ # The timeout to reload the talks
+ self._timeout_id = GObject.timeout_add(1000, self.reload_talks, None)
def get_widget(self):
return self._widget
@@ -38,7 +41,7 @@ class Main(object):
self.reload_talks()
dialog.destroy()
- def reload_talks(self):
+ def reload_talks(self, data=None):
model = ReviewModel()
talks_list = model.get_talks_list()
for talk_id in talks_list:
@@ -87,6 +90,9 @@ class TalkPanel(object):
# Load the comments
self.update_comments(model)
+
+ # The timeout to reload the talks
+ self._timeout_id = GObject.timeout_add(120000, self.update_comments, model)
# Connect the mood bar buttons to the call back
for mood_id in [1, 2, 3, 4]: