2006-11-02 Don Allingham <don@gramps-project.org>
* src/DataViews/_RelationView.py: fix spacing * src/ScratchPad.py: handle deleting of a person properly svn: r7541
This commit is contained in:
parent
708cb96d8f
commit
34e8744b6a
@ -1,3 +1,7 @@
|
|||||||
|
2006-11-02 Don Allingham <don@gramps-project.org>
|
||||||
|
* src/DataViews/_RelationView.py: fix spacing
|
||||||
|
* src/ScratchPad.py: handle deleting of a person properly
|
||||||
|
|
||||||
2006-11-02 Alex Roitman <shura@gramps-project.org>
|
2006-11-02 Alex Roitman <shura@gramps-project.org>
|
||||||
* src/GrampsDb/_GrampsBSDDB.py (gramps_upgrade_9): Typo.
|
* src/GrampsDb/_GrampsBSDDB.py (gramps_upgrade_9): Typo.
|
||||||
|
|
||||||
|
@ -634,7 +634,7 @@ class RelationshipView(PageView.PersonNavView):
|
|||||||
|
|
||||||
label = GrampsWidgets.MarkupLabel(format % cgi.escape(title))
|
label = GrampsWidgets.MarkupLabel(format % cgi.escape(title))
|
||||||
label.set_alignment(0,0)
|
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.attach.attach(label, _PLABEL_START, _PLABEL_STOP, self.row,
|
||||||
self.row+1, xoptions=gtk.FILL|gtk.SHRINK,
|
self.row+1, xoptions=gtk.FILL|gtk.SHRINK,
|
||||||
yoptions=gtk.FILL|gtk.SHRINK)
|
yoptions=gtk.FILL|gtk.SHRINK)
|
||||||
@ -675,7 +675,9 @@ class RelationshipView(PageView.PersonNavView):
|
|||||||
else:
|
else:
|
||||||
format = "%s"
|
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):
|
def write_child(self, vbox, handle, index):
|
||||||
link_label = GrampsWidgets.LinkLabel(self.get_name(handle, True),
|
link_label = GrampsWidgets.LinkLabel(self.get_name(handle, True),
|
||||||
|
@ -781,7 +781,6 @@ class ScratchPadListView:
|
|||||||
self._db = db
|
self._db = db
|
||||||
db_signals = (
|
db_signals = (
|
||||||
'person-update',
|
'person-update',
|
||||||
'person-delete',
|
|
||||||
'person-rebuild',
|
'person-rebuild',
|
||||||
'family-update',
|
'family-update',
|
||||||
'family-delete',
|
'family-delete',
|
||||||
@ -805,6 +804,8 @@ class ScratchPadListView:
|
|||||||
|
|
||||||
for signal in db_signals:
|
for signal in db_signals:
|
||||||
self._db.connect(signal,self.remove_invalid_objects)
|
self._db.connect(signal,self.remove_invalid_objects)
|
||||||
|
self._db.connect('person-delete', self.person_delete)
|
||||||
|
|
||||||
self.remove_invalid_objects()
|
self.remove_invalid_objects()
|
||||||
|
|
||||||
def remove_invalid_objects(self,dummy=None):
|
def remove_invalid_objects(self,dummy=None):
|
||||||
@ -815,6 +816,17 @@ class ScratchPadListView:
|
|||||||
if not o[1].is_valid():
|
if not o[1].is_valid():
|
||||||
model.remove(o.iter)
|
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.
|
# Method to manage the wrapper classes.
|
||||||
|
|
||||||
def register_wrapper_classes(self):
|
def register_wrapper_classes(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user