diff --git a/src/gen/plug/_gramplet.py b/src/gen/plug/_gramplet.py index b14f6207c..8db648421 100644 --- a/src/gen/plug/_gramplet.py +++ b/src/gen/plug/_gramplet.py @@ -67,9 +67,9 @@ class Gramplet(object): self.gui.on_motion) self.connect_signal('Person', self._active_changed) + self._db_changed(self.dbstate.db) active_person = self.get_active('Person') if active_person: # already changed - self._db_changed(self.dbstate.db) self._active_changed(active_person) self.post_init() @@ -284,6 +284,8 @@ class Gramplet(object): if self.dbstate.open: #print " %s is not active" % self.gui.gname self.update_has_data() + else: + self.set_has_data(False) return #print " %s is UPDATING" % self.gui.gname self.dirty = False diff --git a/src/plugins/gramplet/Attributes.py b/src/plugins/gramplet/Attributes.py index 716d9deb2..4b748d2d1 100644 --- a/src/plugins/gramplet/Attributes.py +++ b/src/plugins/gramplet/Attributes.py @@ -84,7 +84,6 @@ class PersonAttributes(Attributes): """ def db_changed(self): self.dbstate.db.connect('person-update', self.update) - self.update() def active_changed(self, handle): self.update() @@ -111,7 +110,6 @@ class EventAttributes(Attributes): def db_changed(self): self.dbstate.db.connect('event-update', self.update) self.connect_signal('Event', self.update) - self.update() def update_has_data(self): active_handle = self.get_active('Event') @@ -135,7 +133,6 @@ class FamilyAttributes(Attributes): def db_changed(self): self.dbstate.db.connect('family-update', self.update) self.connect_signal('Family', self.update) - self.update() def update_has_data(self): active_handle = self.get_active('Family') @@ -159,7 +156,6 @@ class MediaAttributes(Attributes): def db_changed(self): self.dbstate.db.connect('media-update', self.update) self.connect_signal('Media', self.update) - self.update() def update_has_data(self): active_handle = self.get_active('Media') diff --git a/src/plugins/gramplet/Backlinks.py b/src/plugins/gramplet/Backlinks.py index 2f6bf6196..ab6c0afa4 100644 --- a/src/plugins/gramplet/Backlinks.py +++ b/src/plugins/gramplet/Backlinks.py @@ -72,7 +72,6 @@ class PersonBacklinks(Backlinks): """ def db_changed(self): self.dbstate.db.connect('person-update', self.update) - self.update() def active_changed(self, handle): self.update() @@ -96,7 +95,6 @@ class EventBacklinks(Backlinks): def db_changed(self): self.dbstate.db.connect('event-update', self.update) self.connect_signal('Event', self.update) - self.update() def update_has_data(self): active_handle = self.get_active('Event') @@ -117,7 +115,6 @@ class FamilyBacklinks(Backlinks): def db_changed(self): self.dbstate.db.connect('family-update', self.update) self.connect_signal('Family', self.update) - self.update() def update_has_data(self): active_handle = self.get_active('Family') @@ -138,7 +135,6 @@ class PlaceBacklinks(Backlinks): def db_changed(self): self.dbstate.db.connect('place-update', self.update) self.connect_signal('Place', self.update) - self.update() def update_has_data(self): active_handle = self.get_active('Place') @@ -159,7 +155,6 @@ class SourceBacklinks(Backlinks): def db_changed(self): self.dbstate.db.connect('source-update', self.update) self.connect_signal('Source', self.update) - self.update() def update_has_data(self): active_handle = self.get_active('Source') @@ -180,7 +175,6 @@ class CitationBacklinks(Backlinks): def db_changed(self): self.dbstate.db.connect('citation-update', self.update) self.connect_signal('Citation', self.update) - self.update() def update_has_data(self): active_handle = self.get_active('Citation') @@ -201,7 +195,6 @@ class RepositoryBacklinks(Backlinks): def db_changed(self): self.dbstate.db.connect('repository-update', self.update) self.connect_signal('Repository', self.update) - self.update() def update_has_data(self): active_handle = self.get_active('Repository') @@ -222,7 +215,6 @@ class MediaBacklinks(Backlinks): def db_changed(self): self.dbstate.db.connect('media-update', self.update) self.connect_signal('Media', self.update) - self.update() def update_has_data(self): active_handle = self.get_active('Media') @@ -243,7 +235,6 @@ class NoteBacklinks(Backlinks): def db_changed(self): self.dbstate.db.connect('note-update', self.update) self.connect_signal('Note', self.update) - self.update() def update_has_data(self): active_handle = self.get_active('Note') diff --git a/src/plugins/gramplet/Children.py b/src/plugins/gramplet/Children.py index 93aec42dd..4ea13c4f9 100644 --- a/src/plugins/gramplet/Children.py +++ b/src/plugins/gramplet/Children.py @@ -92,7 +92,6 @@ class PersonChildren(Children): def db_changed(self): self.dbstate.db.connect('person-update', self.update) - self.update() def active_changed(self, handle): self.update() @@ -189,7 +188,6 @@ class FamilyChildren(Children): def db_changed(self): self.dbstate.db.connect('family-update', self.update) self.connect_signal('Family', self.update) - self.update() def main(self): active_handle = self.get_active('Family') diff --git a/src/plugins/gramplet/Citations.py b/src/plugins/gramplet/Citations.py index fd8522348..af3c51660 100644 --- a/src/plugins/gramplet/Citations.py +++ b/src/plugins/gramplet/Citations.py @@ -257,7 +257,6 @@ class PersonCitations(Citations): """ def db_changed(self): self.dbstate.db.connect('person-update', self.update) - self.update() def active_changed(self, handle): self.update() @@ -332,7 +331,6 @@ class EventCitations(Citations): def db_changed(self): self.dbstate.db.connect('event-update', self.update) self.connect_signal('Event', self.update) - self.update() def update_has_data(self): active_handle = self.get_active('Event') @@ -375,7 +373,6 @@ class FamilyCitations(Citations): def db_changed(self): self.dbstate.db.connect('family-update', self.update) self.connect_signal('Family', self.update) - self.update() def update_has_data(self): active_handle = self.get_active('Family') @@ -431,7 +428,6 @@ class PlaceCitations(Citations): def db_changed(self): self.dbstate.db.connect('place-update', self.update) self.connect_signal('Place', self.update) - self.update() def update_has_data(self): active_handle = self.get_active('Place') @@ -474,7 +470,6 @@ class MediaCitations(Citations): def db_changed(self): self.dbstate.db.connect('media-update', self.update) self.connect_signal('Media', self.update) - self.update() def update_has_data(self): active_handle = self.get_active('Media') diff --git a/src/plugins/gramplet/Events.py b/src/plugins/gramplet/Events.py index 079c7d6ce..7f6c42f17 100644 --- a/src/plugins/gramplet/Events.py +++ b/src/plugins/gramplet/Events.py @@ -97,7 +97,6 @@ class PersonEvents(Events): """ def db_changed(self): self.dbstate.db.connect('person-update', self.update) - self.update() def active_changed(self, handle): self.update() @@ -155,7 +154,6 @@ class FamilyEvents(Events): def db_changed(self): self.dbstate.db.connect('family-update', self.update) self.connect_signal('Family', self.update) - self.update() def update_has_data(self): active_handle = self.get_active('Family') diff --git a/src/plugins/gramplet/Gallery.py b/src/plugins/gramplet/Gallery.py index d3985d57c..a38c3ced8 100644 --- a/src/plugins/gramplet/Gallery.py +++ b/src/plugins/gramplet/Gallery.py @@ -91,7 +91,6 @@ class PersonGallery(Gallery): """ def db_changed(self): self.dbstate.db.connect('person-update', self.update) - self.update() def active_changed(self, handle): self.update() @@ -118,7 +117,6 @@ class FamilyGallery(Gallery): def db_changed(self): self.dbstate.db.connect('family-update', self.update) self.connect_signal('Family', self.update) - self.update() def update_has_data(self): active_handle = self.get_active('Family') @@ -142,7 +140,6 @@ class EventGallery(Gallery): def db_changed(self): self.dbstate.db.connect('event-update', self.update) self.connect_signal('Event', self.update) - self.update() def update_has_data(self): active_handle = self.get_active('Event') @@ -166,7 +163,6 @@ class PlaceGallery(Gallery): def db_changed(self): self.dbstate.db.connect('place-update', self.update) self.connect_signal('Place', self.update) - self.update() def update_has_data(self): active_handle = self.get_active('Place') @@ -190,7 +186,6 @@ class SourceGallery(Gallery): def db_changed(self): self.dbstate.db.connect('event-update', self.update) self.connect_signal('Source', self.update) - self.update() def update_has_data(self): active_handle = self.get_active('Source') @@ -214,7 +209,6 @@ class CitationGallery(Gallery): def db_changed(self): self.dbstate.db.connect('event-update', self.update) self.connect_signal('Citation', self.update) - self.update() def update_has_data(self): active_handle = self.get_active('Citation') diff --git a/src/plugins/gramplet/MediaPreview.py b/src/plugins/gramplet/MediaPreview.py index 50a4114ba..e76d64aad 100644 --- a/src/plugins/gramplet/MediaPreview.py +++ b/src/plugins/gramplet/MediaPreview.py @@ -46,7 +46,6 @@ class MediaPreview(Gramplet): def db_changed(self): self.dbstate.db.connect('media-update', self.update) self.connect_signal('Media', self.update) - self.update() def update_has_data(self): active_handle = self.get_active('Media') diff --git a/src/plugins/gramplet/Notes.py b/src/plugins/gramplet/Notes.py index 6d527eece..f76a6e084 100644 --- a/src/plugins/gramplet/Notes.py +++ b/src/plugins/gramplet/Notes.py @@ -138,7 +138,6 @@ class PersonNotes(Notes): """ def db_changed(self): self.dbstate.db.connect('person-update', self.update) - self.update() def active_changed(self, handle): self.update() @@ -164,7 +163,6 @@ class EventNotes(Notes): def db_changed(self): self.dbstate.db.connect('event-update', self.update) self.connect_signal('Event', self.update) - self.update() def update_has_data(self): active_handle = self.get_active('Event') @@ -187,7 +185,6 @@ class FamilyNotes(Notes): def db_changed(self): self.dbstate.db.connect('family-update', self.update) self.connect_signal('Family', self.update) - self.update() def update_has_data(self): active_handle = self.get_active('Family') @@ -210,7 +207,6 @@ class PlaceNotes(Notes): def db_changed(self): self.dbstate.db.connect('place-update', self.update) self.connect_signal('Place', self.update) - self.update() def update_has_data(self): active_handle = self.get_active('Place') @@ -233,7 +229,6 @@ class SourceNotes(Notes): def db_changed(self): self.dbstate.db.connect('source-update', self.update) self.connect_signal('Source', self.update) - self.update() def update_has_data(self): active_handle = self.get_active('Source') @@ -256,7 +251,6 @@ class CitationNotes(Notes): def db_changed(self): self.dbstate.db.connect('citation-update', self.update) self.connect_signal('Citation', self.update) - self.update() def update_has_data(self): active_handle = self.get_active('Citation') @@ -279,7 +273,6 @@ class RepositoryNotes(Notes): def db_changed(self): self.dbstate.db.connect('repository-update', self.update) self.connect_signal('Repository', self.update) - self.update() def update_has_data(self): active_handle = self.get_active('Repository') @@ -302,7 +295,6 @@ class MediaNotes(Notes): def db_changed(self): self.dbstate.db.connect('media-update', self.update) self.connect_signal('Media', self.update) - self.update() def update_has_data(self): active_handle = self.get_active('Media') diff --git a/src/plugins/gramplet/PersonDetails.py b/src/plugins/gramplet/PersonDetails.py index 4975fe1c7..c07e5bcf9 100644 --- a/src/plugins/gramplet/PersonDetails.py +++ b/src/plugins/gramplet/PersonDetails.py @@ -84,7 +84,6 @@ class PersonDetails(Gramplet): def db_changed(self): self.dbstate.db.connect('person-update', self.update) - self.update() def active_changed(self, handle): self.update() diff --git a/src/plugins/gramplet/PersonResidence.py b/src/plugins/gramplet/PersonResidence.py index 3db32548d..039b0584d 100644 --- a/src/plugins/gramplet/PersonResidence.py +++ b/src/plugins/gramplet/PersonResidence.py @@ -53,7 +53,6 @@ class PersonResidence(Gramplet): def db_changed(self): self.dbstate.db.connect('person-update', self.update) - self.update() def active_changed(self, handle): self.update() diff --git a/src/plugins/gramplet/PlaceDetails.py b/src/plugins/gramplet/PlaceDetails.py index 21fee3e19..5a4a7087e 100644 --- a/src/plugins/gramplet/PlaceDetails.py +++ b/src/plugins/gramplet/PlaceDetails.py @@ -81,7 +81,6 @@ class PlaceDetails(Gramplet): def db_changed(self): self.dbstate.db.connect('place-update', self.update) self.connect_signal('Place', self.update) - self.update() def update_has_data(self): active_handle = self.get_active('Person') diff --git a/src/plugins/gramplet/RepositoryDetails.py b/src/plugins/gramplet/RepositoryDetails.py index b0685f922..7e44cdd93 100644 --- a/src/plugins/gramplet/RepositoryDetails.py +++ b/src/plugins/gramplet/RepositoryDetails.py @@ -77,7 +77,6 @@ class RepositoryDetails(Gramplet): def db_changed(self): self.dbstate.db.connect('repository-update', self.update) self.connect_signal('Repository', self.update) - self.update() def update_has_data(self): active_handle = self.get_active('Person')