* src/GrampsDb/_DbUtils.py (remove_parent_from_family): adjust the

transaction message for appropriate father/mother indicator


svn: r6976
This commit is contained in:
Don Allingham 2006-07-01 03:58:45 +00:00
parent 7d56d70075
commit 1353edcca9
4 changed files with 9 additions and 5 deletions

View File

@ -1,4 +1,6 @@
2006-06-30 Don Allingham <don@gramps-project.org> 2006-06-30 Don Allingham <don@gramps-project.org>
* src/GrampsDb/_DbUtils.py (remove_parent_from_family): adjust the
transaction message for appropriate father/mother indicator
* src/GrampsWidgets.py: Add GenderWidget to try to isolate windows * src/GrampsWidgets.py: Add GenderWidget to try to isolate windows
font problems by switching fonts if needed font problems by switching fonts if needed

View File

@ -138,11 +138,13 @@ class DateEdit:
gtk.ICON_SIZE_MENU)) gtk.ICON_SIZE_MENU))
elif self.date_obj.is_regular(): elif self.date_obj.is_regular():
self.pixmap_obj.set_from_pixbuf( self.pixmap_obj.set_from_pixbuf(
self.pixmap_obj.render_icon(gtk.STOCK_YES,gtk.ICON_SIZE_MENU)) self.pixmap_obj.render_icon(gtk.STOCK_YES,
gtk.ICON_SIZE_MENU))
else: else:
self.pixmap_obj.set_from_pixbuf( self.pixmap_obj.set_from_pixbuf(
self.pixmap_obj.render_icon(gtk.STOCK_DIALOG_WARNING, self.pixmap_obj.render_icon(gtk.STOCK_DIALOG_WARNING,
gtk.ICON_SIZE_MENU)) gtk.ICON_SIZE_MENU))
def parse_and_check(self,*obj): def parse_and_check(self,*obj):
""" """

View File

@ -69,7 +69,9 @@ def remove_parent_from_family(db, person_handle, family_handle, trans=None):
person.remove_family_handle(family_handle) person.remove_family_handle(family_handle)
if family.get_father_handle() == person_handle: if family.get_father_handle() == person_handle:
family.set_father_handle(None) family.set_father_handle(None)
msg = _("Remove father from family")
elif family.get_mother_handle() == person_handle: elif family.get_mother_handle() == person_handle:
msg = _("Remove mother from family")
family.set_mother_handle(None) family.set_mother_handle(None)
child_list = family.get_child_ref_list() child_list = family.get_child_ref_list()
@ -80,10 +82,8 @@ def remove_parent_from_family(db, person_handle, family_handle, trans=None):
child = db.get_person_from_handle(child_list[0].ref) child = db.get_person_from_handle(child_list[0].ref)
child.remove_parent_family_handle(family_handle) child.remove_parent_family_handle(family_handle)
db.commit_person(child, trans) db.commit_person(child, trans)
msg = _("Remove father from family")
else: else:
db.commit_family(family, trans) db.commit_family(family, trans)
msg = _("Remove mother from family")
db.commit_person(person, trans) db.commit_person(person, trans)
if need_commit: if need_commit:

View File

@ -12551,7 +12551,7 @@ Text Beside Icons</property>
<child> <child>
<widget class="GtkImage" id="image2675"> <widget class="GtkImage" id="image2675">
<property name="visible">True</property> <property name="visible">True</property>
<property name="icon_size">4</property> <property name="icon_size">1</property>
<property name="icon_name">stock_lock-open</property> <property name="icon_name">stock_lock-open</property>
<property name="xalign">0.5</property> <property name="xalign">0.5</property>
<property name="yalign">0.5</property> <property name="yalign">0.5</property>
@ -13002,7 +13002,7 @@ Text Beside Icons</property>
<child> <child>
<widget class="GtkImage" id="image2676"> <widget class="GtkImage" id="image2676">
<property name="visible">True</property> <property name="visible">True</property>
<property name="icon_size">4</property> <property name="icon_size">1</property>
<property name="icon_name">stock_lock-open</property> <property name="icon_name">stock_lock-open</property>
<property name="xalign">0.5</property> <property name="xalign">0.5</property>
<property name="yalign">0.5</property> <property name="yalign">0.5</property>