Gramplets only update when active, detached, or forced

svn: r14138
This commit is contained in:
Doug Blank
2010-01-26 12:00:01 +00:00
parent f5fe747716
commit cf4748ecaf
2 changed files with 30 additions and 8 deletions

View File

@@ -1197,8 +1197,24 @@ class GrampletView(PageView):
"""
return 'gramps-gramplet'
def build_tree(self):
return
def set_inactive(self):
print "gramplet page inactive..."
self.active = False
for title in self.gramplet_map:
if self.gramplet_map[title].pui:
if self.gramplet_map[title].state != "detached":
self.gramplet_map[title].pui.active = False
def set_active(self):
print "gramplet page active!"
self.active = True
for title in self.gramplet_map:
if self.gramplet_map[title].pui:
self.gramplet_map[title].pui.active = True
if self.gramplet_map[title].pui.dirty:
if self.gramplet_map[title].state == "maximized":
# FIXME: do in background?
self.gramplet_map[title].pui.update()
def ui_definition(self):
return """