Faster initial display

svn: r1350
This commit is contained in:
Don Allingham 2003-03-15 18:51:30 +00:00
parent d200fcae5f
commit d822a0ebfa
6 changed files with 14 additions and 20 deletions

View File

@ -260,7 +260,7 @@ RECURSIVE_TARGETS = info-recursive dvi-recursive install-info-recursive \
install-exec-recursive installdirs-recursive install-recursive \
uninstall-recursive check-recursive installcheck-recursive
DIST_COMMON = README $(dist_pkgdata_DATA) $(pkgpython_PYTHON) AUTHORS \
ChangeLog Makefile.am Makefile.in NEWS const.py.in
ChangeLog Makefile.am Makefile.in NEWS TODO const.py.in
DIST_SUBDIRS = $(SUBDIRS)
all: all-recursive

View File

@ -895,9 +895,15 @@ class Name(DataObj):
"""returns a name string built from the components of the Name
instance, in the form of Firstname Surname"""
if (self.Suffix == ""):
return "%s %s" % (self.FirstName, self.Surname)
if self.Prefix:
return "%s %s %s" % (self.FirstName, self.Prefix, self.Surname)
else:
return "%s %s" % (self.FirstName, self.Surname)
else:
return "%s %s, %s" % (self.FirstName, self.Surname, self.Suffix)
if self.Prefix:
return "%s %s %s, %s" % (self.FirstName, self.Prefix, self.Surname, self.Suffix)
else:
return "%s %s, %s" % (self.FirstName, self.Surname, self.Suffix)
def are_equal(self,other):
"""compares to names to see if they are equal, return 0 if they

View File

@ -126,6 +126,7 @@ translators = u'Radek Malcic <malcic@atlas.cz> - Czech\n' \
u'Marcos Bedinelli - Brazilian-Portuguese (Portugu\xeas do Brasil)\n' \
u'Alex Roitman <shura@alex.neuro.umn.edu> - Russian\n' \
u'Jens Arvidsson <arvid-jens@algonet.se> - Swedish (Svenska)' \
u'Tino Meinen <a.t.meinen@chello.nl> - Dutch' \

View File

@ -125,7 +125,8 @@ translators = u'Radek Malcic <malcic@atlas.cz> - Czech\n' \
u'Marco Molteni <molter@gufi.org> - Italian (Italiano)\n' \
u'Marcos Bedinelli - Brazilian-Portuguese (Portugu\xeas do Brasil)\n' \
u'Alex Roitman <shura@alex.neuro.umn.edu> - Russian\n' \
u'Jens Arvidsson <arvid-jens@algonet.se> - Swedish (Svenska)' \
u'Jens Arvidsson <arvid-jens@algonet.se> - Swedish (Svenska)\n' \
u'Tino Meinen <a.t.meinen@chello.nl> - Dutch' \

View File

@ -7,7 +7,6 @@
<requires lib="bonobo"/>
<widget class="GnomeApp" id="gramps">
<property name="visible">True</property>
<property name="title" translatable="yes">GRAMPS</property>
<property name="type">GTK_WINDOW_TOPLEVEL</property>
<property name="window_position">GTK_WIN_POS_NONE</property>

View File

@ -159,7 +159,6 @@ class Gramps:
"""
self.gtop = gtk.glade.XML(const.gladeFile, "gramps")
self.topWindow = self.gtop.get_widget("gramps")
self.topWindow.hide()
self.report_button = self.gtop.get_widget("reports")
self.tool_button = self.gtop.get_widget("tools")
@ -1295,16 +1294,12 @@ class Gramps:
self.gtop.get_widget("filter").set_text("")
self.statusbar.set_progress_percentage(1.0)
self.full_update()
person = self.db.getDefaultPerson()
if person:
self.active_person = person
# elif self.person_list.rows > 0:
# id = self.person_list.get_row_data(0)
# self.active_person = self.db.getPerson(id)
self.goto_active_person()
self.full_update()
self.statusbar.set_progress_percentage(0.0)
return 1
@ -1337,10 +1332,6 @@ class Gramps:
self.status_text("")
def complete_rebuild(self):
keys = self.alpha_page.keys()
for key in keys:
self.alpha_page[key].new_model()
self.id2col = {}
self.model_used = {}
@ -1355,18 +1346,14 @@ class Gramps:
if pg != '@':
if not self.alpha_page.has_key(pg):
self.create_new_panel(pg)
model = self.alpha_page[pg]
else:
model = self.default_list
self.apply_filter()
for key in keys:
self.alpha_page[key].connect_model()
self.goto_active_person()
self.modify_statusbar()
def apply_filter(self,current_model=None):
self.status_text(_('Updating display...'))
datacomp = self.DataFilter.compare