fix install list

svn: r6285
This commit is contained in:
Don Allingham 2006-04-07 03:37:12 +00:00
parent ed9228aa8d
commit 5a2ddff216
2 changed files with 26 additions and 16 deletions

View File

@ -6,6 +6,7 @@
pkgdatadir = $(datadir)/@PACKAGE@/GrampsDb pkgdatadir = $(datadir)/@PACKAGE@/GrampsDb
pkgdata_PYTHON = \ pkgdata_PYTHON = \
_DbUtils.py \
_GedcomInfo.py\ _GedcomInfo.py\
_GedTokens.py\ _GedTokens.py\
_GrampsBSDDB.py\ _GrampsBSDDB.py\

View File

@ -53,10 +53,17 @@ import DateHandler
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class SelectEvent: class SelectEvent:
"""
Selects an event from the list of available events
"""
def __init__(self,db,title,parent_window=None): def __init__(self, database, title, parent_window=None):
"""
Create an Event Selector, allowing the user to select on of the
events in the event list.
"""
self.db = db self.db = database
self.glade = gtk.glade.XML(const.gladeFile, "select_person", "gramps") self.glade = gtk.glade.XML(const.gladeFile, "select_person", "gramps")
self.top = self.glade.get_widget('select_person') self.top = self.glade.get_widget('select_person')
title_label = self.glade.get_widget('title') title_label = self.glade.get_widget('title')
@ -77,6 +84,10 @@ class SelectEvent:
self.top.set_transient_for(parent_window) self.top.set_transient_for(parent_window)
def redraw(self): def redraw(self):
"""
Redraws the event list
"""
self.model.clear() self.model.clear()
self.model.new_model() self.model.new_model()
@ -90,18 +101,16 @@ class SelectEvent:
else: else:
name = Utils.personal_events[etype[0]] name = Utils.personal_events[etype[0]]
the_id = event.get_gramps_id() the_id = event.get_gramps_id()
place_handle = event.get_place_handle()
if place_handle:
pname = self.db.get_place_from_handle(place_handle).get_title()
else:
pname = u''
date = DateHandler.get_date(event) date = DateHandler.get_date(event)
cause = event.get_cause()
self.model.add([desc, the_id, name, date], handle) self.model.add([desc, the_id, name, date], handle)
self.model.connect_model() self.model.connect_model()
def run(self): def run(self):
"""
Runs te dialog, returning None if the event was not selected,
or the event that was selected.
"""
val = self.top.run() val = self.top.run()
if val == gtk.RESPONSE_OK: if val == gtk.RESPONSE_OK: