0001963: Gramplets need an active person for working: two issues: 1) added update on rebuild signal, and 2) cause an initial update when creating a new gramplet
svn: r10612
This commit is contained in:
parent
0d05bbeab9
commit
9d5cc9b876
@ -1164,6 +1164,7 @@ class GrampletView(PageView.PersonNavView):
|
|||||||
self._popup_xy[0], self._popup_xy[1], 0)
|
self._popup_xy[0], self._popup_xy[1], 0)
|
||||||
else:
|
else:
|
||||||
self.drop_widget(self.widget, gramplet, 0, 0, 0)
|
self.drop_widget(self.widget, gramplet, 0, 0, 0)
|
||||||
|
g.pui.update()
|
||||||
else:
|
else:
|
||||||
print "Can't make gramplet of type '%s'." % name
|
print "Can't make gramplet of type '%s'." % name
|
||||||
|
|
||||||
|
@ -73,6 +73,8 @@ class CalendarGramplet(Gramplet):
|
|||||||
self.gui.calendar = gtk.Calendar()
|
self.gui.calendar = gtk.Calendar()
|
||||||
self.gui.calendar.connect('day-selected-double-click', self.double_click)
|
self.gui.calendar.connect('day-selected-double-click', self.double_click)
|
||||||
self.gui.calendar.connect('month-changed', self.refresh)
|
self.gui.calendar.connect('month-changed', self.refresh)
|
||||||
|
self.dbstate.db.connect('person-rebuild', self.update)
|
||||||
|
|
||||||
db_signals = ['event-add',
|
db_signals = ['event-add',
|
||||||
'event-update',
|
'event-update',
|
||||||
'event-delete',
|
'event-delete',
|
||||||
@ -206,6 +208,8 @@ class TopSurnamesGramplet(Gramplet):
|
|||||||
self.dbstate.db.connect('person-add', self.update)
|
self.dbstate.db.connect('person-add', self.update)
|
||||||
self.dbstate.db.connect('person-delete', self.update)
|
self.dbstate.db.connect('person-delete', self.update)
|
||||||
self.dbstate.db.connect('person-update', self.update)
|
self.dbstate.db.connect('person-update', self.update)
|
||||||
|
self.dbstate.db.connect('person-rebuild', self.update)
|
||||||
|
self.dbstate.db.connect('family-rebuild', self.update)
|
||||||
|
|
||||||
def on_load(self):
|
def on_load(self):
|
||||||
if len(self.gui.data) > 0:
|
if len(self.gui.data) > 0:
|
||||||
@ -283,6 +287,8 @@ class SurnameCloudGramplet(Gramplet):
|
|||||||
self.dbstate.db.connect('person-add', self.update)
|
self.dbstate.db.connect('person-add', self.update)
|
||||||
self.dbstate.db.connect('person-delete', self.update)
|
self.dbstate.db.connect('person-delete', self.update)
|
||||||
self.dbstate.db.connect('person-update', self.update)
|
self.dbstate.db.connect('person-update', self.update)
|
||||||
|
self.dbstate.db.connect('person-rebuild', self.update)
|
||||||
|
self.dbstate.db.connect('family-rebuild', self.update)
|
||||||
|
|
||||||
def on_load(self):
|
def on_load(self):
|
||||||
if len(self.gui.data) > 0:
|
if len(self.gui.data) > 0:
|
||||||
@ -373,6 +379,8 @@ class RelativesGramplet(Gramplet):
|
|||||||
self.dbstate.db.connect('person-delete', self.update)
|
self.dbstate.db.connect('person-delete', self.update)
|
||||||
self.dbstate.db.connect('family-add', self.update)
|
self.dbstate.db.connect('family-add', self.update)
|
||||||
self.dbstate.db.connect('family-delete', self.update)
|
self.dbstate.db.connect('family-delete', self.update)
|
||||||
|
self.dbstate.db.connect('person-rebuild', self.update)
|
||||||
|
self.dbstate.db.connect('family-rebuild', self.update)
|
||||||
|
|
||||||
def active_changed(self, handle):
|
def active_changed(self, handle):
|
||||||
self.update()
|
self.update()
|
||||||
@ -489,6 +497,8 @@ class PedigreeGramplet(Gramplet):
|
|||||||
self.dbstate.db.connect('person-delete', self.update)
|
self.dbstate.db.connect('person-delete', self.update)
|
||||||
self.dbstate.db.connect('family-add', self.update)
|
self.dbstate.db.connect('family-add', self.update)
|
||||||
self.dbstate.db.connect('family-delete', self.update)
|
self.dbstate.db.connect('family-delete', self.update)
|
||||||
|
self.dbstate.db.connect('person-rebuild', self.update)
|
||||||
|
self.dbstate.db.connect('family-rebuild', self.update)
|
||||||
|
|
||||||
def active_changed(self, handle):
|
def active_changed(self, handle):
|
||||||
self.update()
|
self.update()
|
||||||
@ -674,6 +684,8 @@ class StatsGramplet(Gramplet):
|
|||||||
self.dbstate.db.connect('person-delete', self.update)
|
self.dbstate.db.connect('person-delete', self.update)
|
||||||
self.dbstate.db.connect('family-add', self.update)
|
self.dbstate.db.connect('family-add', self.update)
|
||||||
self.dbstate.db.connect('family-delete', self.update)
|
self.dbstate.db.connect('family-delete', self.update)
|
||||||
|
self.dbstate.db.connect('person-rebuild', self.update)
|
||||||
|
self.dbstate.db.connect('family-rebuild', self.update)
|
||||||
|
|
||||||
def main(self):
|
def main(self):
|
||||||
self.set_text(_("Processing..."))
|
self.set_text(_("Processing..."))
|
||||||
|
Loading…
Reference in New Issue
Block a user