diff --git a/mitterlib/ui/ui_pygtk.py b/mitterlib/ui/ui_pygtk.py index 8a2cb84..ae080b9 100644 --- a/mitterlib/ui/ui_pygtk.py +++ b/mitterlib/ui/ui_pygtk.py @@ -108,6 +108,7 @@ class _WorkerThread(threading.Thread, _IdleObject): # XXX: Check if this catch all warnins too! _log.debug('Exception %s', str(exc)) self.emit("exception", exc) + return _log.debug('Thread %s completed', self.name) @@ -277,13 +278,13 @@ class Interface(object): def _create_grid(self): """Add the displaying grid.""" - self.grid_store = gtk.ListStore(object) + self._grid_store = gtk.ListStore(object) # Trying to store the NetworkData object only # self.grid_store.set_sort_func(0, self._sort_by_time) # self.grid_store.set_sort_column_id(0, gtk.SORT_DESCENDING) - self.grid = gtk.TreeView(self.grid_store) + self.grid = gtk.TreeView(self._grid_store) self.grid.set_property('headers-visible', False) self.grid.set_rules_hint(True) # change color for each row @@ -468,7 +469,7 @@ class Interface(object): cell.set_property('pixbuf', self._default_pixmap) # just make sure we download this pic too. - self.queue_pic(pic) + #self.queue_pic(pic) else: cell.set_property('pixbuf', self._user_pics[pic]) @@ -494,9 +495,9 @@ class Interface(object): message) # use a different highlight for the current user - message = re.sub(r'(@'+self.twitter.username+')', - r'\1', - message) + #message = re.sub(r'(@'+self.twitter.username+')', + # r'\1', + # message) markup = '%s (%s):\n%s\n%s' % \ (data.name, username, message, time) @@ -556,11 +557,14 @@ class Interface(object): # Network related functions # ------------------------------------------------------------ + ### Results from the "messages" request def _post_get_messages(self, widget, results): """Function called after the data from the messages list is retrieved.""" - _log.debug('Got results') - #_log.debug('Results from the request: %s', str(results)) + _log.debug('%d new tweets', len(results)) + for message in results: + _log.debug('Data: %s', str(message)) + self._grid_store.prepend([message]) return def _exception_get_messages(self, widget, exception):