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:
parent
dd788c229a
commit
e02e3d29f4
@ -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>
|
2007-01-19 Alex Roitman <shura@gramps-project.org>
|
||||||
* src/GrampsDb/_GrampsInMemDB.py: Support the cached surname list.
|
* src/GrampsDb/_GrampsInMemDB.py: Support the cached surname list.
|
||||||
* src/GrampsDb/_GrampsBSDDB.py: Support the cached surname list.
|
* src/GrampsDb/_GrampsBSDDB.py: Support the cached surname list.
|
||||||
|
@ -71,9 +71,9 @@ class FamilyListView(PageView.ListView):
|
|||||||
def __init__(self, dbstate, uistate):
|
def __init__(self, dbstate, uistate):
|
||||||
|
|
||||||
signal_map = {
|
signal_map = {
|
||||||
'family-add' : self.family_add,
|
'family-add' : self.row_add,
|
||||||
'family-update' : self.family_update,
|
'family-update' : self.row_update,
|
||||||
'family-delete' : self.family_delete,
|
'family-delete' : self.row_delete,
|
||||||
'family-rebuild' : self.build_tree,
|
'family-rebuild' : self.build_tree,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -177,42 +177,6 @@ class FamilyListView(PageView.ListView):
|
|||||||
except Errors.WindowActiveError:
|
except Errors.WindowActiveError:
|
||||||
pass
|
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):
|
def remove(self, obj):
|
||||||
import GrampsDb
|
import GrampsDb
|
||||||
|
|
||||||
|
@ -71,6 +71,7 @@ class PageView:
|
|||||||
self.additional_action_groups = []
|
self.additional_action_groups = []
|
||||||
self.additional_uis = []
|
self.additional_uis = []
|
||||||
self.widget = None
|
self.widget = None
|
||||||
|
self.model = None
|
||||||
self.ui = '<ui></ui>'
|
self.ui = '<ui></ui>'
|
||||||
self.dbstate.connect('no-database',self.disable_action_group)
|
self.dbstate.connect('no-database',self.disable_action_group)
|
||||||
self.dbstate.connect('database-changed',self.enable_action_group)
|
self.dbstate.connect('database-changed',self.enable_action_group)
|
||||||
@ -744,6 +745,7 @@ class ListView(BookMarkView):
|
|||||||
self.dirty = True
|
self.dirty = True
|
||||||
|
|
||||||
def row_update(self,handle_list):
|
def row_update(self,handle_list):
|
||||||
|
if self.model:
|
||||||
self.model.prev_handle = None
|
self.model.prev_handle = None
|
||||||
if self.active:
|
if self.active:
|
||||||
for handle in handle_list:
|
for handle in handle_list:
|
||||||
|
Loading…
Reference in New Issue
Block a user