From b6a023b6a1e4af74b499ec69efefeb40c5a76939 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Thu, 9 Mar 2006 03:07:41 +0000 Subject: [PATCH] format fixes svn: r6108 --- gramps2/ChangeLog | 4 ++++ gramps2/src/DataViews/_FamilyView.py | 19 ++++++++++++------- gramps2/src/Editors/_EditPrimary.py | 5 ++++- gramps2/src/GenericFilter.py | 2 +- 4 files changed, 21 insertions(+), 9 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index bfc121f4c..ca71ed035 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,4 +1,8 @@ 2006-03-08 Don Allingham + * 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 diff --git a/gramps2/src/DataViews/_FamilyView.py b/gramps2/src/DataViews/_FamilyView.py index b962fd696..e08419319 100644 --- a/gramps2/src/DataViews/_FamilyView.py +++ b/gramps2/src/DataViews/_FamilyView.py @@ -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 = "%s" % 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() diff --git a/gramps2/src/Editors/_EditPrimary.py b/gramps2/src/Editors/_EditPrimary.py index 6c713ccc3..e15155af3 100644 --- a/gramps2/src/Editors/_EditPrimary.py +++ b/gramps2/src/Editors/_EditPrimary.py @@ -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 diff --git a/gramps2/src/GenericFilter.py b/gramps2/src/GenericFilter.py index 54482ad83..c0ee0d164 100644 --- a/gramps2/src/GenericFilter.py +++ b/gramps2/src/GenericFilter.py @@ -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)