From f06eb991a3c4120f5d4f8a1eee12d339c32b38eb Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Fri, 7 May 2004 03:58:26 +0000 Subject: [PATCH] fix select person again svn: r3136 --- configure | 3 +-- configure.in | 1 - gramps-mdk.spec | 2 +- gramps.spec | 2 +- src/GenericFilter.py | 2 +- src/Makefile.am | 3 +-- src/Makefile.in | 9 ++++----- src/Plugins.py | 2 +- src/SelectPerson.py | 32 +++++++++++++++----------------- src/gramps_main.py | 5 ----- src/po/Makefile.in | 2 +- 11 files changed, 26 insertions(+), 37 deletions(-) diff --git a/configure b/configure index c75d9927a..faa0362bb 100755 --- a/configure +++ b/configure @@ -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" ;; diff --git a/configure.in b/configure.in index 2d8361fa8..f64423552 100644 --- a/configure.in +++ b/configure.in @@ -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 diff --git a/gramps-mdk.spec b/gramps-mdk.spec index cba36143e..52e7702d3 100644 --- a/gramps-mdk.spec +++ b/gramps-mdk.spec @@ -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 diff --git a/gramps.spec b/gramps.spec index ea7baa76a..94522c51e 100644 --- a/gramps.spec +++ b/gramps.spec @@ -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 diff --git a/src/GenericFilter.py b/src/GenericFilter.py index f5efc88bf..ec265601b 100644 --- a/src/GenericFilter.py +++ b/src/GenericFilter.py @@ -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,'; ') #------------------------------------------------------------------------- # diff --git a/src/Makefile.am b/src/Makefile.am index 33e92cb43..43d0f6c8c 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -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\ diff --git a/src/Makefile.in b/src/Makefile.in index 6c01d0a62..191f45dd0 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -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\ diff --git a/src/Plugins.py b/src/Plugins.py index 7ee8aef12..c632d5367 100644 --- a/src/Plugins.py +++ b/src/Plugins.py @@ -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. """ #------------------------------------------------------------------------- diff --git a/src/SelectPerson.py b/src/SelectPerson.py index 0db465bbb..b25ec12c4 100644 --- a/src/SelectPerson.py +++ b/src/SelectPerson.py @@ -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() diff --git a/src/gramps_main.py b/src/gramps_main.py index db01abd33..9e3d7f7f5 100755 --- a/src/gramps_main.py +++ b/src/gramps_main.py @@ -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() diff --git a/src/po/Makefile.in b/src/po/Makefile.in index 7d7ce760e..35530c5aa 100644 --- a/src/po/Makefile.in +++ b/src/po/Makefile.in @@ -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) \