diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index ea508419d..b86f685ee 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,3 +1,7 @@ +2006-11-02 Don Allingham + * src/DataViews/_RelationView.py: fix spacing + * src/ScratchPad.py: handle deleting of a person properly + 2006-11-02 Alex Roitman * src/GrampsDb/_GrampsBSDDB.py (gramps_upgrade_9): Typo. diff --git a/gramps2/src/DataViews/_RelationView.py b/gramps2/src/DataViews/_RelationView.py index 6e4ae227a..0838d7371 100644 --- a/gramps2/src/DataViews/_RelationView.py +++ b/gramps2/src/DataViews/_RelationView.py @@ -634,7 +634,7 @@ class RelationshipView(PageView.PersonNavView): label = GrampsWidgets.MarkupLabel(format % cgi.escape(title)) label.set_alignment(0,0) - label.set_padding(0,3) + label.set_padding(0,5) self.attach.attach(label, _PLABEL_START, _PLABEL_STOP, self.row, self.row+1, xoptions=gtk.FILL|gtk.SHRINK, yoptions=gtk.FILL|gtk.SHRINK) @@ -675,7 +675,9 @@ class RelationshipView(PageView.PersonNavView): else: format = "%s" - return GrampsWidgets.MarkupLabel(format % cgi.escape(title)) + lbl = GrampsWidgets.MarkupLabel(format % cgi.escape(title)) + lbl.set_padding(0,5) + return lbl def write_child(self, vbox, handle, index): link_label = GrampsWidgets.LinkLabel(self.get_name(handle, True), diff --git a/gramps2/src/ScratchPad.py b/gramps2/src/ScratchPad.py index a82d57d31..2c8bfb2c2 100644 --- a/gramps2/src/ScratchPad.py +++ b/gramps2/src/ScratchPad.py @@ -781,7 +781,6 @@ class ScratchPadListView: self._db = db db_signals = ( 'person-update', - 'person-delete', 'person-rebuild', 'family-update', 'family-delete', @@ -805,6 +804,8 @@ class ScratchPadListView: for signal in db_signals: self._db.connect(signal,self.remove_invalid_objects) + self._db.connect('person-delete', self.person_delete) + self.remove_invalid_objects() def remove_invalid_objects(self,dummy=None): @@ -814,6 +815,17 @@ class ScratchPadListView: for o in model: if not o[1].is_valid(): model.remove(o.iter) + + def person_delete(self, handle_list): + + model = self._widget.get_model() + + if model: + for o in model: + if o[0] == 'person-link': + data = pickle.loads(o[1]._obj) + if data[2] in handle_list: + model.remove(o.iter) # Method to manage the wrapper classes.