2007-01-19 Don Allingham <don@gramps-project.org>

* src/DataViews/_FamilyList.py: remove loop
	* src/PageView.py: check for null model



svn: r7935
This commit is contained in:
Don Allingham 2007-01-20 04:22:31 +00:00
parent dd788c229a
commit e02e3d29f4
3 changed files with 10 additions and 40 deletions

View File

@ -1,3 +1,7 @@
2007-01-19 Don Allingham <don@gramps-project.org>
* src/DataViews/_FamilyList.py: remove loop
* src/PageView.py: check for null model
2007-01-19 Alex Roitman <shura@gramps-project.org>
* src/GrampsDb/_GrampsInMemDB.py: Support the cached surname list.
* src/GrampsDb/_GrampsBSDDB.py: Support the cached surname list.

View File

@ -71,9 +71,9 @@ class FamilyListView(PageView.ListView):
def __init__(self, dbstate, uistate):
signal_map = {
'family-add' : self.family_add,
'family-update' : self.family_update,
'family-delete' : self.family_delete,
'family-add' : self.row_add,
'family-update' : self.row_update,
'family-delete' : self.row_delete,
'family-rebuild' : self.build_tree,
}
@ -177,42 +177,6 @@ class FamilyListView(PageView.ListView):
except Errors.WindowActiveError:
pass
def family_add(self, handle_list):
while not self.family_add_loop(handle_list):
pass
def family_update(self, handle_list):
while not self.family_update_loop(handle_list):
pass
def family_delete(self, handle_list):
while not self.family_delete_loop(handle_list):
pass
def family_add_loop(self, handle_list):
if self.updating:
return False
self.updating = True
self.row_add(handle_list)
self.updating = False
return True
def family_update_loop(self, handle_list):
if self.updating:
return False
self.updating = True
self.row_update(handle_list)
self.updating = False
return True
def family_delete_loop(self, handle_list):
if self.updating:
return False
self.updating = True
self.row_delete(handle_list)
self.updating = False
return True
def remove(self, obj):
import GrampsDb

View File

@ -71,6 +71,7 @@ class PageView:
self.additional_action_groups = []
self.additional_uis = []
self.widget = None
self.model = None
self.ui = '<ui></ui>'
self.dbstate.connect('no-database',self.disable_action_group)
self.dbstate.connect('database-changed',self.enable_action_group)
@ -744,7 +745,8 @@ class ListView(BookMarkView):
self.dirty = True
def row_update(self,handle_list):
self.model.prev_handle = None
if self.model:
self.model.prev_handle = None
if self.active:
for handle in handle_list:
self.model.update_row_by_handle(handle)