Add update_all method to Gramplet to update directly without the gobject idle processing method

svn: r11637
This commit is contained in:
Doug Blank 2009-01-16 23:05:42 +00:00
parent 5e74a57142
commit 2db7113c5d

View File

@ -329,6 +329,12 @@ class Gramplet(object):
self._idle_id = gobject.idle_add(self._updater, self._idle_id = gobject.idle_add(self._updater,
priority=gobject.PRIORITY_LOW - 10) priority=gobject.PRIORITY_LOW - 10)
def update_all(self, *args):
self._generator = self.main()
if isinstance(self._generator, types.GeneratorType):
for step in self._generator:
pass
def interrupt(self): def interrupt(self):
""" """
Force the generator to stop running. Force the generator to stop running.