format fixes

svn: r6108
This commit is contained in:
Don Allingham 2006-03-09 03:07:41 +00:00
parent ecac99da0e
commit 07288ca97f
4 changed files with 21 additions and 9 deletions

View File

@ -1,4 +1,8 @@
2006-03-08 Don Allingham <don@gramps-project.org>
* src/DataViews/_FamilyView.py: fix spacing
* src/Editors/_EditPrimary.py: make sure object is valid before
compare
* src/GenericFilter.py: remove print
* src/Editors/_EditFamily.py: fix family selection
2006-03-08 Alex Roitman <shura@gramps-project.org>

View File

@ -283,7 +283,7 @@ class FamilyView(PageView.PersonNavView):
self.child = gtk.Table(self.attach.max_y,cols)
self.child.set_border_width(12)
self.child.set_col_spacings(12)
self.child.set_row_spacings(6)
self.child.set_row_spacings(9)
for d in self.attach.list:
x0 = d[1]
@ -349,7 +349,8 @@ class FamilyView(PageView.PersonNavView):
image = gtk.Image()
image.set_from_pixbuf(pixbuf)
image.show()
self.attach.attach(image,end,end+1,0,4,xoptions=gtk.SHRINK|gtk.FILL)
self.attach.attach(image,end,end+1,0,4,
xoptions=gtk.SHRINK|gtk.FILL)
self.attach.attach(sep,0,self.attach.max_x,4,5)
@ -386,24 +387,27 @@ class FamilyView(PageView.PersonNavView):
self.attach.attach(GrampsWidgets.BasicLabel(title),_ALABEL_START,
_ALABEL_STOP,self.row,self.row+1,
xoptions=gtk.FILL|gtk.SHRINK)
self.attach.attach(GrampsWidgets.BasicLabel(data),_ADATA_START,_ADATA_STOP,
self.attach.attach(GrampsWidgets.BasicLabel(data),
_ADATA_START,_ADATA_STOP,
self.row,self.row+1)
self.row += 1
def write_label(self,title,family,is_parent):
msg = "<i><b>%s</b></i>" % cgi.escape(title)
self.attach.attach(GrampsWidgets.MarkupLabel(msg),_LABEL_START,_LABEL_STOP,
self.attach.attach(GrampsWidgets.MarkupLabel(msg),
_LABEL_START,_LABEL_STOP,
self.row,self.row+1,gtk.SHRINK|gtk.FILL)
if family:
value = family.gramps_id
else:
value = ""
self.attach.attach(GrampsWidgets.BasicLabel(value),_DATA_START,_DATA_STOP,
self.attach.attach(GrampsWidgets.BasicLabel(value),
_DATA_START,_DATA_STOP,
self.row,self.row+1,gtk.SHRINK|gtk.FILL)
hbox = gtk.HBox()
hbox.set_spacing(6)
hbox.set_spacing(12)
if is_parent:
call_fcn = self.add_parent_family
else:
@ -550,7 +554,8 @@ class FamilyView(PageView.PersonNavView):
value = True
return value
def write_event_ref(self, ename, event,start_col=_SDATA_START,stop_col=_SDATA_STOP):
def write_event_ref(self, ename, event, start_col=_SDATA_START,
stop_col=_SDATA_STOP):
if event:
dobj = event.get_date_object()
phandle = event.get_place_handle()

View File

@ -136,7 +136,10 @@ class EditPrimary(DisplayState.ManagedWindow):
return False
elif self.obj.handle:
orig = self.get_from_handle(self.obj.handle)
return cmp(orig.serialize(),self.obj.serialize()) != 0
if orig:
return cmp(orig.serialize(),self.obj.serialize()) != 0
else:
return True
else:
return True

View File

@ -2622,7 +2622,7 @@ class FilterWidget:
for f in default_filters:
all = GenericFilter()
rule = f[0](f[1])
print rule
#print rule
all.set_name( rule.name)
all.add_rule( rule)
filter_list.append(all)