fix select person again

svn: r3136
This commit is contained in:
Don Allingham 2004-05-07 03:58:26 +00:00
parent f2d1eccdfa
commit f06eb991a3
11 changed files with 26 additions and 37 deletions

3
configure vendored
View File

@ -2340,7 +2340,7 @@ SCROLLKEEPER_BUILD_REQUIRED=0.3.5
ac_config_files="$ac_config_files Makefile src/Makefile src/const.py src/docgen/Makefile src/filters/Makefile src/plugins/Makefile src/calendars/Makefile src/data/Makefile src/data/templates/Makefile src/po/Makefile doc/Makefile doc/gramps-manual/Makefile doc/gramps-manual/C/Makefile doc/gramps-manual/fr/Makefile doc/gramps-manual/ru/Makefile example/Makefile example/gramps/Makefile gramps.spec gramps-mdk.spec gramps.sh"
ac_config_files="$ac_config_files Makefile src/Makefile src/const.py src/docgen/Makefile src/plugins/Makefile src/calendars/Makefile src/data/Makefile src/data/templates/Makefile src/po/Makefile doc/Makefile doc/gramps-manual/Makefile doc/gramps-manual/C/Makefile doc/gramps-manual/fr/Makefile doc/gramps-manual/ru/Makefile example/Makefile example/gramps/Makefile gramps.spec gramps-mdk.spec gramps.sh"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@ -2897,7 +2897,6 @@ do
"src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
"src/const.py" ) CONFIG_FILES="$CONFIG_FILES src/const.py" ;;
"src/docgen/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/docgen/Makefile" ;;
"src/filters/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/filters/Makefile" ;;
"src/plugins/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/plugins/Makefile" ;;
"src/calendars/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/calendars/Makefile" ;;
"src/data/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/data/Makefile" ;;

View File

@ -209,7 +209,6 @@ Makefile
src/Makefile
src/const.py
src/docgen/Makefile
src/filters/Makefile
src/plugins/Makefile
src/calendars/Makefile
src/data/Makefile

View File

@ -1,5 +1,5 @@
%define ver 1.1.0
%define rel 0.CVS20040421
%define rel 0.CVS20040505
%define prefix /usr
%define localstatedir /var/lib
# Ensure that internal RPM macros for configure & makeinstall

View File

@ -1,5 +1,5 @@
%define ver 1.1.0
%define rel 0.CVS20040421
%define rel 0.CVS20040505
%define prefix /usr
%define localstatedir /var/lib
# Ensure that internal RPM macros for configure & makeinstall

View File

@ -113,7 +113,7 @@ class Rule:
for i in range(0,len(self.list)):
if self.list[i]:
v.append('%s="%s"' % (_(self.labels[i]),_(self.list[i])))
return join(v,'; ')
return string.join(v,'; ')
#-------------------------------------------------------------------------
#

View File

@ -1,5 +1,5 @@
# This is the src level Makefile for Gramps
SUBDIRS = docgen filters plugins data po calendars
SUBDIRS = docgen plugins data po calendars
# For intl. support, how do we compile?
MOSTLYCLEANFILES =
@ -32,7 +32,6 @@ pkgpython_PYTHON = \
Errors.py\
EventEdit.py\
FamilyView.py\
Filter.py\
Find.py\
FontScale.py\
FrenchRepublic.py\

View File

@ -35,9 +35,9 @@ NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
subdir = src
DIST_COMMON = $(dist_pkgdata_DATA) $(pkgpython_PYTHON) \
DIST_COMMON = README $(dist_pkgdata_DATA) $(pkgpython_PYTHON) \
$(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(srcdir)/const.py.in
$(srcdir)/const.py.in AUTHORS ChangeLog NEWS
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@ -140,7 +140,7 @@ sysconfdir = @sysconfdir@
target_alias = @target_alias@
# This is the src level Makefile for Gramps
SUBDIRS = docgen filters plugins data po calendars
SUBDIRS = docgen plugins data po calendars
# For intl. support, how do we compile?
MOSTLYCLEANFILES =
@ -172,7 +172,6 @@ pkgpython_PYTHON = \
Errors.py\
EventEdit.py\
FamilyView.py\
Filter.py\
Find.py\
FontScale.py\
FrenchRepublic.py\
@ -210,7 +209,7 @@ pkgpython_PYTHON = \
Report.py\
SelectChild.py\
SelectObject.py\
sort.py\
Sort.py\
soundex.py\
Sources.py\
SourceView.py\

View File

@ -25,7 +25,7 @@ plugins from specfied directories, build menus for the different categories,
and provide dialog to select and execute plugins.
Plugins are divided into several categories. This are: reports, tools,
filters, importer, exporters, and document generators.
importers, exporters, and document generators.
"""
#-------------------------------------------------------------------------

View File

@ -1,7 +1,7 @@
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2003-2004 Donald N. Allingham
# Copyright (C) 2003 Donald N. Allingham
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -18,8 +18,6 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# $Id$
#-------------------------------------------------------------------------
#
# internationalization
@ -57,12 +55,10 @@ class SelectPerson:
self.renderer = gtk.CellRendererText()
self.db = db
self.filter = filter
self.filter = filter
self.glade = gtk.glade.XML(const.gladeFile,"select_person","gramps")
self.top = self.glade.get_widget('select_person')
title_label = self.glade.get_widget('title')
print self.top
print title_label
self.filter_select = self.glade.get_widget('filter')
self.plist = self.glade.get_widget('plist')
self.notebook = self.glade.get_widget('notebook')
@ -78,7 +74,7 @@ class SelectPerson:
if filter:
self.filter_select.set_label(flabel)
self.filter_select.connect('toggled',self.redraw_cb)
self.filter_select.show()
self.filter_select.set_active(1)
else:
self.filter_select.hide()
@ -115,19 +111,21 @@ class SelectPerson:
def redraw(self):
for person_id in self.db.sort_person_keys():
if self.use_filter and not self.filter(person_id):
return
for key in self.db.sort_person_keys():
person = self.db.get_person(key)
if self.use_filter and not self.filter(person):
continue
data = self.db.get_person_display(person_id)
person = self.db.find_person_from_id(person_id)
data = self.db.get_person_display(key)
gender = person.get_gender()
if gender == RelLib.Person.male:
self.mmodel.add([data[0],data[1],data[3],data[5],data[6]],person_id)
elif gender == RelLib.Person.female:
self.fmodel.add([data[0],data[1],data[3],data[5],data[6]],person_id)
if gender == RelLib.Person.plist:
self.mmodel.add([data[0],data[1],data[3],data[5],data[6]],key)
elif gender == RelLib.Person.feplist:
self.fmodel.add([data[0],data[1],data[3],data[5],data[6]],key)
else:
self.umodel.add([data[0],data[1],data[3],data[5],data[6]],person_id)
self.umodel.add([data[0],data[1],data[3],data[5],data[6]],key)
def select_function(self,store,path,iter,id_list):
id_list.append(self.model.get_value(iter,1))
@ -143,7 +141,7 @@ class SelectPerson:
idlist = self.get_selected_ids()
if idlist and idlist[0]:
return_value = idlist[0]
return_value = self.db.get_person(idlist[0])
else:
return_value = None
self.top.destroy()

View File

@ -63,7 +63,6 @@ import GenericFilter
from QuestionDialog import *
import DisplayTrace
import Filter
import const
import Plugins
import Utils
@ -709,10 +708,6 @@ class Gramps:
def init_filters(self):
#Filter.load_filters(const.filtersDir)
#Filter.load_filters(os.path.expanduser("~/.gramps/filters"))
#menu = Filter.build_filter_menu(self.on_filter_name_changed,self.filter_text)
filter_list = []
all = GenericFilter.GenericFilter()

View File

@ -34,7 +34,7 @@ NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
subdir = src/po
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \