Updates to people list occur only on active display
svn: r1353
This commit is contained in:
parent
360241a3f7
commit
1a9b2e7167
2
gramps2/configure
vendored
2
gramps2/configure
vendored
@ -1621,7 +1621,7 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
LANGUAGES="sv pl de fr es it pt_BR ru da_DK cs ro"
|
LANGUAGES="sv pl de fr es it pt_BR ru da_DK cs ro nl"
|
||||||
|
|
||||||
|
|
||||||
DISTLANGS=
|
DISTLANGS=
|
||||||
|
@ -18,7 +18,7 @@ AC_SUBST(VERSIONSTRING)
|
|||||||
AC_PATH_PROG(MSGFMT, msgfmt)
|
AC_PATH_PROG(MSGFMT, msgfmt)
|
||||||
AC_SUBST(MSGFMT)
|
AC_SUBST(MSGFMT)
|
||||||
|
|
||||||
LANGUAGES="sv pl de fr es it pt_BR ru da_DK cs ro"
|
LANGUAGES="sv pl de fr es it pt_BR ru da_DK cs ro nl"
|
||||||
AC_SUBST(LANGUAGES)
|
AC_SUBST(LANGUAGES)
|
||||||
|
|
||||||
DISTLANGS=
|
DISTLANGS=
|
||||||
|
@ -586,10 +586,8 @@ class GrampsPreferences:
|
|||||||
|
|
||||||
if status_bar == 0:
|
if status_bar == 0:
|
||||||
self.top.get_widget("stat1").set_active(1)
|
self.top.get_widget("stat1").set_active(1)
|
||||||
elif status_bar == 1:
|
|
||||||
self.top.get_widget("stat2").set_active(1)
|
|
||||||
else:
|
else:
|
||||||
self.top.get_widget("stat3").set_active(1)
|
self.top.get_widget("stat2").set_active(1)
|
||||||
|
|
||||||
if toolbar == 0:
|
if toolbar == 0:
|
||||||
self.top.get_widget("tool1").set_active(1)
|
self.top.get_widget("tool1").set_active(1)
|
||||||
|
@ -79,7 +79,7 @@ class Marriage:
|
|||||||
self.top = gtk.glade.XML(const.marriageFile,"marriageEditor")
|
self.top = gtk.glade.XML(const.marriageFile,"marriageEditor")
|
||||||
top_window = self.get_widget("marriageEditor")
|
top_window = self.get_widget("marriageEditor")
|
||||||
|
|
||||||
Utils.set_titles(top_window, self.top.get_window('title'),
|
Utils.set_titles(top_window, self.top.get_widget('title'),
|
||||||
_('Marriage/Relationship Editor'))
|
_('Marriage/Relationship Editor'))
|
||||||
|
|
||||||
self.icon_list = self.get_widget('iconlist')
|
self.icon_list = self.get_widget('iconlist')
|
||||||
|
@ -757,15 +757,12 @@ class Gramps:
|
|||||||
"a gramps.zodb file."))
|
"a gramps.zodb file."))
|
||||||
return
|
return
|
||||||
|
|
||||||
self.status_text(_("Loading %s ...") % filename)
|
|
||||||
|
|
||||||
if self.load_database(filename) == 1:
|
if self.load_database(filename) == 1:
|
||||||
if filename[-1] == '/':
|
if filename[-1] == '/':
|
||||||
filename = filename[:-1]
|
filename = filename[:-1]
|
||||||
name = os.path.basename(filename)
|
name = os.path.basename(filename)
|
||||||
self.topWindow.set_title("%s - GRAMPS" % name)
|
self.topWindow.set_title("%s - GRAMPS" % name)
|
||||||
else:
|
else:
|
||||||
self.status_text("")
|
|
||||||
GrampsCfg.save_last_file("")
|
GrampsCfg.save_last_file("")
|
||||||
|
|
||||||
def on_ok_button2_clicked(self,obj):
|
def on_ok_button2_clicked(self,obj):
|
||||||
@ -949,19 +946,32 @@ class Gramps:
|
|||||||
self.person_model = self.pl_page[0].model
|
self.person_model = self.pl_page[0].model
|
||||||
self.ptabs.set_current_page(0)
|
self.ptabs.set_current_page(0)
|
||||||
return
|
return
|
||||||
|
|
||||||
id = self.active_person.getId()
|
id = self.active_person.getId()
|
||||||
if self.id2col.has_key(id):
|
if self.id2col.has_key(id):
|
||||||
(model,iter) = self.id2col[id]
|
(model,iter) = self.id2col[id]
|
||||||
self.ptabs.set_current_page(self.model2page[model])
|
else:
|
||||||
if not self.model_used.has_key(model) or self.model_used[model] == 0:
|
val = self.db.getPersonDisplay(id)
|
||||||
self.model_used[model] = 1
|
pg = val[5]
|
||||||
self.apply_filter(model)
|
if pg:
|
||||||
|
pg = pg[0]
|
||||||
|
else:
|
||||||
|
pg = '@'
|
||||||
|
model = self.alpha_page[pg]
|
||||||
|
iter = None
|
||||||
|
|
||||||
model.selection.unselect_all()
|
self.ptabs.set_current_page(self.model2page[model])
|
||||||
model.selection.select_iter(iter);
|
|
||||||
itpath = model.model.get_path(iter)
|
if not self.model_used.has_key(model) or self.model_used[model] == 0 or not iter:
|
||||||
col = model.tree.get_column(0)
|
self.model_used[model] = 1
|
||||||
model.tree.scroll_to_cell(itpath,col,1,0.5,0.0)
|
self.apply_filter(model)
|
||||||
|
(model,iter) = self.id2col[id]
|
||||||
|
|
||||||
|
model.selection.unselect_all()
|
||||||
|
model.selection.select_iter(iter);
|
||||||
|
itpath = model.model.get_path(iter)
|
||||||
|
col = model.tree.get_column(0)
|
||||||
|
model.tree.scroll_to_cell(itpath,col,1,0.5,0.0)
|
||||||
|
|
||||||
def change_active_person(self,person):
|
def change_active_person(self,person):
|
||||||
self.active_person = person
|
self.active_person = person
|
||||||
@ -1133,7 +1143,8 @@ class Gramps:
|
|||||||
class_init = mi.get_data("function")
|
class_init = mi.get_data("function")
|
||||||
self.DataFilter = class_init(qualifer)
|
self.DataFilter = class_init(qualifer)
|
||||||
self.DataFilter.set_invert(invert_filter)
|
self.DataFilter.set_invert(invert_filter)
|
||||||
self.apply_filter()
|
self.model_used = {}
|
||||||
|
self.apply_filter(self.person_model)
|
||||||
|
|
||||||
def on_filter_name_changed(self,obj):
|
def on_filter_name_changed(self,obj):
|
||||||
filter = obj.get_data("filter")
|
filter = obj.get_data("filter")
|
||||||
@ -1304,6 +1315,7 @@ class Gramps:
|
|||||||
return 1
|
return 1
|
||||||
|
|
||||||
def load_database(self,name):
|
def load_database(self,name):
|
||||||
|
|
||||||
filename = "%s/%s" % (name,const.xmlFile)
|
filename = "%s/%s" % (name,const.xmlFile)
|
||||||
if not os.path.isfile(filename) and zodb_ok:
|
if not os.path.isfile(filename) and zodb_ok:
|
||||||
filename = "%s/%s" % (name,const.zodbFile)
|
filename = "%s/%s" % (name,const.zodbFile)
|
||||||
@ -1311,8 +1323,11 @@ class Gramps:
|
|||||||
else:
|
else:
|
||||||
self.clear_database(0)
|
self.clear_database(0)
|
||||||
|
|
||||||
|
self.status_text(_("Loading %s ...") % name)
|
||||||
if self.db.load(filename,self.load_progress) == 0:
|
if self.db.load(filename,self.load_progress) == 0:
|
||||||
|
self.status_text('')
|
||||||
return 0
|
return 0
|
||||||
|
self.status_text('')
|
||||||
return self.post_load(name)
|
return self.post_load(name)
|
||||||
|
|
||||||
def load_revision(self,f,name,revision):
|
def load_revision(self,f,name,revision):
|
||||||
@ -1334,21 +1349,7 @@ class Gramps:
|
|||||||
def complete_rebuild(self):
|
def complete_rebuild(self):
|
||||||
self.id2col = {}
|
self.id2col = {}
|
||||||
self.model_used = {}
|
self.model_used = {}
|
||||||
|
|
||||||
for key in self.db.getPersonKeys():
|
|
||||||
person = self.db.getPerson(key)
|
|
||||||
val = self.db.getPersonDisplay(key)
|
|
||||||
pg = val[5]
|
|
||||||
if pg:
|
|
||||||
pg = pg[0]
|
|
||||||
else:
|
|
||||||
pg = ''
|
|
||||||
if pg != '@':
|
|
||||||
if not self.alpha_page.has_key(pg):
|
|
||||||
self.create_new_panel(pg)
|
|
||||||
|
|
||||||
self.apply_filter()
|
self.apply_filter()
|
||||||
|
|
||||||
self.goto_active_person()
|
self.goto_active_person()
|
||||||
self.modify_statusbar()
|
self.modify_statusbar()
|
||||||
|
|
||||||
@ -1357,6 +1358,8 @@ class Gramps:
|
|||||||
self.status_text(_('Updating display...'))
|
self.status_text(_('Updating display...'))
|
||||||
|
|
||||||
datacomp = self.DataFilter.compare
|
datacomp = self.DataFilter.compare
|
||||||
|
if current_model == None:
|
||||||
|
self.id2col = {}
|
||||||
|
|
||||||
for key in self.db.getPersonKeys():
|
for key in self.db.getPersonKeys():
|
||||||
person = self.db.getPerson(key)
|
person = self.db.getPerson(key)
|
||||||
@ -1365,7 +1368,7 @@ class Gramps:
|
|||||||
if pg:
|
if pg:
|
||||||
pg = pg[0]
|
pg = pg[0]
|
||||||
else:
|
else:
|
||||||
pg = ''
|
pg = '@'
|
||||||
|
|
||||||
if datacomp(person):
|
if datacomp(person):
|
||||||
if self.id2col.has_key(key):
|
if self.id2col.has_key(key):
|
||||||
@ -1377,15 +1380,15 @@ class Gramps:
|
|||||||
else:
|
else:
|
||||||
model = self.default_list
|
model = self.default_list
|
||||||
|
|
||||||
if current_model == None or current_model == model:
|
if current_model == model:
|
||||||
iter = model.add([val[0],val[1],val[2],val[3],val[4],val[5],
|
iter = model.add([val[0],val[1],val[2],val[3],val[4],val[5],
|
||||||
val[6],val[7]],key)
|
val[6],val[7]],key)
|
||||||
self.id2col[key] = (model,iter)
|
self.id2col[key] = (model,iter)
|
||||||
else:
|
else:
|
||||||
if self.id2col.has_key(key):
|
if self.id2col.has_key(key):
|
||||||
(model,iter) = self.id2col[key]
|
(model,iter) = self.id2col[key]
|
||||||
if current_model == None or current_model == model:
|
model.remove(iter)
|
||||||
model.remove(iter)
|
|
||||||
for i in self.pl_page:
|
for i in self.pl_page:
|
||||||
i.sort()
|
i.sort()
|
||||||
self.modify_statusbar()
|
self.modify_statusbar()
|
||||||
|
Loading…
Reference in New Issue
Block a user