Delay attaching ListStore to TreeView until after names have been loaded.
svn: r1191
This commit is contained in:
parent
65f8f4c87b
commit
ae834aec56
2
configure
vendored
2
configure
vendored
@ -1567,7 +1567,7 @@ INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
RELEASE=pre4
|
RELEASE=pre5
|
||||||
|
|
||||||
VERSIONSTRING=$VERSION
|
VERSIONSTRING=$VERSION
|
||||||
if test x"$RELEASE" != "x"
|
if test x"$RELEASE" != "x"
|
||||||
|
@ -2,7 +2,7 @@ dnl Process this file with autoconf to produce a configure script.
|
|||||||
dnl May need to run automake && aclocal first
|
dnl May need to run automake && aclocal first
|
||||||
AC_INIT(src/gramps.py)
|
AC_INIT(src/gramps.py)
|
||||||
AM_INIT_AUTOMAKE(gramps, 0.9.0)
|
AM_INIT_AUTOMAKE(gramps, 0.9.0)
|
||||||
RELEASE=pre4
|
RELEASE=pre5
|
||||||
|
|
||||||
VERSIONSTRING=$VERSION
|
VERSIONSTRING=$VERSION
|
||||||
if test x"$RELEASE" != "x"
|
if test x"$RELEASE" != "x"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
%define ver 0.9.0
|
%define ver 0.9.0
|
||||||
%define rel pre4
|
%define rel pre5
|
||||||
%define prefix /usr
|
%define prefix /usr
|
||||||
|
|
||||||
Summary: Genealogical Research and Analysis Management Programming System.
|
Summary: Genealogical Research and Analysis Management Programming System.
|
||||||
|
@ -25,11 +25,12 @@ class ListModel:
|
|||||||
def __init__(self,tree,dlist,select_func=None,event_func=None):
|
def __init__(self,tree,dlist,select_func=None,event_func=None):
|
||||||
self.tree = tree
|
self.tree = tree
|
||||||
l = len(dlist)
|
l = len(dlist)
|
||||||
mylist = [TYPE_STRING]*l + [TYPE_PYOBJECT]
|
self.mylist = [TYPE_STRING]*l + [TYPE_PYOBJECT]
|
||||||
self.model = gtk.ListStore(*mylist)
|
|
||||||
|
self.new_model()
|
||||||
|
self.connect_model()
|
||||||
|
|
||||||
self.selection = self.tree.get_selection()
|
self.selection = self.tree.get_selection()
|
||||||
self.tree.set_model(self.model)
|
|
||||||
|
|
||||||
self.data_index = l
|
self.data_index = l
|
||||||
|
|
||||||
@ -61,6 +62,12 @@ class ListModel:
|
|||||||
self.double_click = event_func
|
self.double_click = event_func
|
||||||
self.tree.connect('event',self.button_press)
|
self.tree.connect('event',self.button_press)
|
||||||
|
|
||||||
|
def new_model(self):
|
||||||
|
self.model = gtk.ListStore(*self.mylist)
|
||||||
|
|
||||||
|
def connect_model(self):
|
||||||
|
self.tree.set_model(self.model)
|
||||||
|
|
||||||
def get_selected(self):
|
def get_selected(self):
|
||||||
return self.selection.get_selected()
|
return self.selection.get_selected()
|
||||||
|
|
||||||
|
@ -99,7 +99,7 @@ startup = 1
|
|||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
progName = "GRAMPS"
|
progName = "GRAMPS"
|
||||||
version = "0.9.0-pre4"
|
version = "0.9.0-pre5"
|
||||||
copyright = "© 2001-2002 Donald N. Allingham"
|
copyright = "© 2001-2002 Donald N. Allingham"
|
||||||
authors = ["Donald N. Allingham", "David Hampton","Donald A. Peterson"]
|
authors = ["Donald N. Allingham", "David Hampton","Donald A. Peterson"]
|
||||||
comments = _("GRAMPS (Genealogical Research and Analysis "
|
comments = _("GRAMPS (Genealogical Research and Analysis "
|
||||||
|
@ -148,11 +148,15 @@ class Gramps:
|
|||||||
|
|
||||||
self.report_button = self.gtop.get_widget("reports")
|
self.report_button = self.gtop.get_widget("reports")
|
||||||
self.tool_button = self.gtop.get_widget("tools")
|
self.tool_button = self.gtop.get_widget("tools")
|
||||||
|
self.remove_button = self.gtop.get_widget("removebtn")
|
||||||
|
self.edit_button = self.gtop.get_widget("editbtn")
|
||||||
self.sidebar = self.gtop.get_widget('side_event')
|
self.sidebar = self.gtop.get_widget('side_event')
|
||||||
self.filterbar = self.gtop.get_widget('filterbar')
|
self.filterbar = self.gtop.get_widget('filterbar')
|
||||||
|
|
||||||
self.tool_button.set_sensitive(0)
|
self.tool_button.set_sensitive(0)
|
||||||
self.report_button.set_sensitive(0)
|
self.report_button.set_sensitive(0)
|
||||||
|
self.remove_button.set_sensitive(0)
|
||||||
|
self.edit_button.set_sensitive(0)
|
||||||
|
|
||||||
set_panel(self.sidebar)
|
set_panel(self.sidebar)
|
||||||
set_panel(self.gtop.get_widget('side_people'))
|
set_panel(self.gtop.get_widget('side_people'))
|
||||||
@ -632,10 +636,7 @@ class Gramps:
|
|||||||
|
|
||||||
def full_update(self):
|
def full_update(self):
|
||||||
"""Brute force display update, updating all the pages"""
|
"""Brute force display update, updating all the pages"""
|
||||||
self.id2col = {}
|
self.complete_rebuild()
|
||||||
for model in self.pl_page:
|
|
||||||
model.clear()
|
|
||||||
self.apply_filter()
|
|
||||||
self.family_view.load_family()
|
self.family_view.load_family()
|
||||||
self.source_view.load_sources()
|
self.source_view.load_sources()
|
||||||
self.place_view.load_places()
|
self.place_view.load_places()
|
||||||
@ -927,11 +928,15 @@ class Gramps:
|
|||||||
self.tools_menu.set_sensitive(1)
|
self.tools_menu.set_sensitive(1)
|
||||||
self.report_button.set_sensitive(1)
|
self.report_button.set_sensitive(1)
|
||||||
self.tool_button.set_sensitive(1)
|
self.tool_button.set_sensitive(1)
|
||||||
|
self.remove_button.set_sensitive(1)
|
||||||
|
self.edit_button.set_sensitive(1)
|
||||||
else:
|
else:
|
||||||
self.report_menu.set_sensitive(0)
|
self.report_menu.set_sensitive(0)
|
||||||
self.tools_menu.set_sensitive(0)
|
self.tools_menu.set_sensitive(0)
|
||||||
self.report_button.set_sensitive(0)
|
self.report_button.set_sensitive(0)
|
||||||
self.tool_button.set_sensitive(0)
|
self.tool_button.set_sensitive(0)
|
||||||
|
self.remove_button.set_sensitive(0)
|
||||||
|
self.edit_button.set_sensitive(0)
|
||||||
|
|
||||||
def modify_statusbar(self):
|
def modify_statusbar(self):
|
||||||
if self.active_person == None:
|
if self.active_person == None:
|
||||||
@ -1343,8 +1348,17 @@ class Gramps:
|
|||||||
ErrorDialog(msg)
|
ErrorDialog(msg)
|
||||||
self.status_text("")
|
self.status_text("")
|
||||||
|
|
||||||
|
def complete_rebuild(self):
|
||||||
|
self.status_text(_("Updating display..."))
|
||||||
|
keys = self.alpha_page.keys()
|
||||||
|
for key in keys:
|
||||||
|
self.alpha_page[key].new_model()
|
||||||
|
self.apply_filter()
|
||||||
|
for key in keys:
|
||||||
|
self.alpha_page[key].connect_model()
|
||||||
|
self.modify_statusbar()
|
||||||
|
|
||||||
def apply_filter(self):
|
def apply_filter(self):
|
||||||
self.status_text(_("Updating display"))
|
|
||||||
datacomp = self.DataFilter.compare
|
datacomp = self.DataFilter.compare
|
||||||
|
|
||||||
for key in self.db.getPersonKeys():
|
for key in self.db.getPersonKeys():
|
||||||
@ -1372,7 +1386,6 @@ class Gramps:
|
|||||||
if self.id2col.has_key(key):
|
if self.id2col.has_key(key):
|
||||||
(model,iter,page) = self.id2col[key]
|
(model,iter,page) = self.id2col[key]
|
||||||
model.remove(iter)
|
model.remove(iter)
|
||||||
self.modify_statusbar()
|
|
||||||
|
|
||||||
def on_home_clicked(self,obj):
|
def on_home_clicked(self,obj):
|
||||||
temp = self.db.getDefaultPerson()
|
temp = self.db.getDefaultPerson()
|
||||||
|
Loading…
Reference in New Issue
Block a user