2007-10-07 Don Allingham <don@gramps-project.org>

* various: gen.utils integrationk



svn: r9100
This commit is contained in:
Don Allingham
2007-10-08 04:02:34 +00:00
parent 4f7ebd5b3e
commit 8038bc0dca
15 changed files with 74 additions and 22 deletions

View File

@@ -201,13 +201,13 @@ class FamilyListView(PageView.ListView):
def remove(self, obj):
self.uistate.set_busy_cursor(1)
import GrampsDb
import gen.utils
mlist = []
self.selection.selected_foreach(self.blist, mlist)
for handle in mlist:
GrampsDb.remove_family_relationships(self.dbstate.db, handle)
gen.utils.remove_family_relationships(self.dbstate.db, handle)
self.build_tree()
self.uistate.set_busy_cursor(0)

View File

@@ -54,7 +54,7 @@ import ThumbNails
import Config
import GrampsWidgets
import Errors
import GrampsDb
import gen.utils
from ReportBase import ReportUtils
@@ -1226,7 +1226,7 @@ class RelationshipView(PageView.PersonNavView):
active_handle = self.dbstate.active.handle
child = self.dbstate.db.get_person_from_handle(active_handle)
GrampsDb.add_child_to_family(
gen.utils.add_child_to_family(
self.dbstate.db,
family,
child)
@@ -1246,7 +1246,7 @@ class RelationshipView(PageView.PersonNavView):
active_handle = self.dbstate.active.handle
child = self.dbstate.db.get_person_from_handle(active_handle)
GrampsDb.add_child_to_family(
gen.utils.add_child_to_family(
self.dbstate.db,
family,
child)
@@ -1285,15 +1285,15 @@ class RelationshipView(PageView.PersonNavView):
def delete_family(self, obj, event, handle):
if event.type == gtk.gdk.BUTTON_PRESS and event.button == 1:
GrampsDb.remove_parent_from_family(self.dbstate.db,
self.dbstate.active.handle,
handle)
gen.utils.remove_parent_from_family(self.dbstate.db,
self.dbstate.active.handle,
handle)
def delete_parent_family(self, obj, event, handle):
if event.type == gtk.gdk.BUTTON_PRESS and event.button == 1:
GrampsDb.remove_child_from_family(self.dbstate.db,
self.dbstate.active.handle,
handle)
gen.utils.remove_child_from_family(self.dbstate.db,
self.dbstate.active.handle,
handle)
def change_to(self, obj, handle):
self.dbstate.change_active_handle(handle)