* src/Filters/SideBar: Add new module.

svn: r7131
This commit is contained in:
Alex Roitman 2006-08-05 04:41:56 +00:00
parent 48b97d4961
commit c47d910fb1
13 changed files with 125 additions and 24 deletions

View File

@ -1,4 +1,5 @@
2006-08-04 Alex Roitman <shura@gramps-project.org>
* src/Filters/SideBar: Add new module.
* src/Filters/Rules/Event/Makefile.am (pkgdata_PYTHON): Ship new files.
* src/Filters/Makefile.am (pkgdata_PYTHON): Ship new file.
* src/DataViews/_EventView.py: Add sidebar filter.

View File

@ -49,13 +49,19 @@ src/Utils.py
src/UndoHistory.py
src/ViewManager.py
src/ManagedWindow.py
# Config package
src/Config/_GrampsGconfKeys.py
src/Config/_GrampsIniKeys.py
src/Config/__init__.py
# Merge package
src/Merge/__init__.py
src/Merge/_MergePerson.py
src/Merge/_MergePlace.py
src/Merge/_MergeSource.py
# DataViews package
src/DataViews/_EventView.py
src/DataViews/_FamilyList.py
src/DataViews/_RelationView.py
@ -67,6 +73,8 @@ src/DataViews/_PersonView.py
src/DataViews/_PlaceView.py
src/DataViews/_RepositoryView.py
src/DataViews/_SourceView.py
# DateHandler package
src/DateHandler/_Date_de.py
src/DateHandler/_DateDisplay.py
src/DateHandler/_Date_es.py
@ -80,6 +88,8 @@ src/DateHandler/_Date_ru.py
src/DateHandler/_Date_sk.py
src/DateHandler/_Date_sv.py
src/DateHandler/__init__.py
# docgen directory
src/docgen/AbiWord2Doc.py
src/docgen/AsciiDoc.py
src/docgen/HtmlDoc.py
@ -95,6 +105,8 @@ src/docgen/PSDrawDoc.py
src/docgen/RTFDoc.py
src/docgen/SpreadSheetDoc.py
src/docgen/SvgDrawDoc.py
# DisplayModels package
src/DisplayModels/_BaseModel.py
src/DisplayModels/_EventModel.py
src/DisplayModels/_FamilyModel.py
@ -104,6 +116,8 @@ src/DisplayModels/_PlaceModel.py
src/DisplayModels/_RepositoryModel.py
src/DisplayModels/_SourceModel.py
src/DisplayModels/__init__.py
# DisplayTabs package
src/DisplayTabs/_AddrEmbedList.py
src/DisplayTabs/_AddressModel.py
src/DisplayTabs/_AttrEmbedList.py
@ -143,6 +157,8 @@ src/DisplayTabs/_SourceRefModel.py
src/DisplayTabs/_WebEmbedList.py
src/DisplayTabs/_WebModel.py
src/DisplayTabs/__init__.py
# Editors package
src/Editors/_EditAddress.py
src/Editors/_EditAttribute.py
src/Editors/_EditChildRef.py
@ -166,6 +182,8 @@ src/Editors/_EditSource.py
src/Editors/_EditSourceRef.py
src/Editors/_EditUrl.py
src/Editors/__init__.py
# GrampsDb package
src/GrampsDb/_DbUtils.py
src/GrampsDb/_GedcomInfo.py
src/GrampsDb/_GedTokens.py
@ -184,14 +202,20 @@ src/GrampsDb/_ReadXML.py
src/GrampsDb/_WriteGedcom.py
src/GrampsDb/_WriteGrdb.py
src/GrampsDb/_WriteXML.py
# GrampsLogger package
src/GrampsLogger/_ErrorReportAssistant.py
src/GrampsLogger/_ErrorView.py
src/GrampsLogger/_GtkHandler.py
src/GrampsLogger/__init__.py
src/GrampsLogger/_RotateHandler.py
# Mime package
src/Mime/_GnomeMime.py
src/Mime/__init__.py
src/Mime/_PythonMime.py
# Models package
src/Models/_FastFilterModel.py
src/Models/_FastModel.py
src/Models/__init__.py
@ -200,6 +224,8 @@ src/Models/_PathCursor.py
src/Models/_PersonFilterModel.py
src/Models/_PersonListModel.py
src/Models/_PersonTreeModel.py
# ObjectSelector package
src/ObjectSelector/_Constants.py
src/ObjectSelector/_Factories.py
src/ObjectSelector/_FamilyFilterFrame.py
@ -229,6 +255,8 @@ src/Selectors/_SelectSource.py
src/Selectors/_SelectorExceptions.py
src/Selectors/_SelectorFactory.py
src/Selectors/__init__.py
# plugins directory
src/plugins/AncestorChart2.py
src/plugins/AncestorReport.py
src/plugins/BookReport.py
@ -283,12 +311,16 @@ src/plugins/WriteCD.py
src/plugins/WriteFtree.py
src/plugins/WriteGeneWeb.py
src/plugins/WritePkg.py
# PluginUtils package
src/PluginUtils/__init__.py
src/PluginUtils/_Options.py
src/PluginUtils/_PluginMgr.py
src/PluginUtils/_Plugins.py
src/PluginUtils/_Tool.py
src/PluginUtils/_PluginStatus.py
# ReportBase package
src/ReportBase/_BareReportDialog.py
src/ReportBase/_BookFormatComboBox.py
src/ReportBase/_CommandLineReport.py
@ -308,6 +340,8 @@ src/ReportBase/_StyleEditor.py
src/ReportBase/_TemplateParser.py
src/ReportBase/_TextFormatComboBox.py
src/ReportBase/_TextReportDialog.py
# RelLib package
src/RelLib/_AddressBase.py
src/RelLib/_Address.py
src/RelLib/_AttributeBase.py
@ -348,8 +382,6 @@ src/RelLib/_SourceRef.py
src/RelLib/_UrlBase.py
src/RelLib/_Url.py
src/RelLib/_Witness.py
src/TreeViews/__init__.py
src/TreeViews/_PersonTreeView.py
src/RelLib/_FamilyRelType.py
src/RelLib/_UrlType.py
src/RelLib/_NameType.py
@ -358,8 +390,12 @@ src/RelLib/_SourceMediaType.py
src/RelLib/_MarkerType.py
src/RelLib/_EventRoleType.py
src/RelLib/_EventType.py
src/Filters/_EventSidebarFilter.py
src/Filters/_FamilySidebarFilter.py
# TreeViews package
src/TreeViews/__init__.py
src/TreeViews/_PersonTreeView.py
# Filters package
src/Filters/_FilterComboBox.py
src/Filters/_FilterList.py
src/Filters/_FilterMenu.py
@ -368,10 +404,10 @@ src/Filters/_FilterStore.py
src/Filters/_GenericFilter.py
src/Filters/__init__.py
src/Filters/_ParamFilter.py
src/Filters/_PersonSidebarFilter.py
src/Filters/_SearchBar.py
src/Filters/_SearchFilter.py
src/Filters/_SidebarFilter.py
# Filters.Rules package
src/Filters/Rules/_Everything.py
src/Filters/Rules/_HasAttributeBase.py
src/Filters/Rules/_HasEventBase.py
@ -386,6 +422,8 @@ src/Filters/Rules/_MatchesFilterBase.py
src/Filters/Rules/_RegExpIdBase.py
src/Filters/Rules/_Rule.py
src/Filters/Rules/_RuleUtils.py
# Filters.Rules.Person package
src/Filters/Rules/Person/_Disconnected.py
src/Filters/Rules/Person/_Everyone.py
src/Filters/Rules/Person/_FamilyWithIncompleteEvent.py
@ -446,6 +484,8 @@ src/Filters/Rules/Person/_RegExpName.py
src/Filters/Rules/Person/_RelationshipPathBetween.py
src/Filters/Rules/Person/_RelationshipPathBetweenBookmarks.py
src/Filters/Rules/Person/_SearchName.py
# Filters.Rules.Family package
src/Filters/Rules/Family/__init__.py
src/Filters/Rules/Family/_AllFamilies.py
src/Filters/Rules/Family/_FamilyPrivate.py
@ -463,6 +503,8 @@ src/Filters/Rules/Family/_MotherHasNameOf.py
src/Filters/Rules/Family/_ChildHasIdOf.py
src/Filters/Rules/Family/_FatherHasNameOf.py
src/Filters/Rules/Family/_ChildHasNameOf.py
# Filters.Rules.Event package
src/Filters/Rules/Event/_MatchesFilter.py
src/Filters/Rules/Event/_EventPrivate.py
src/Filters/Rules/Event/_HasNoteRegexp.py
@ -477,6 +519,18 @@ src/Filters/Rules/Source/__init__.py
src/Filters/Rules/Media/__init__.py
src/Filters/Rules/Repository/__init__.py
# Filters.SideBar package
src/Filters/SideBar/_EventSidebarFilter.py
src/Filters/SideBar/_FamilySidebarFilter.py
src/Filters/SideBar/_PersonSidebarFilter.py
src/Filters/SideBar/_SidebarFilter.py
# FilterEditor package
src/FilterEditor/_FilterEditor.py
src/FilterEditor/_EditFilter.py
src/FilterEditor/_EditRule.py
src/FilterEditor/_ShowResults.py
#
# Glade files
#
@ -505,10 +559,6 @@ src/plugins/vcalendarexport.glade
src/plugins/vcardexport.glade
src/plugins/verify.glade
src/plugins/writeftree.glade
src/FilterEditor/_FilterEditor.py
src/FilterEditor/_EditFilter.py
src/FilterEditor/_EditRule.py
src/FilterEditor/_ShowResults.py
#
# Files to extract from and then merge into
#

View File

@ -42,7 +42,8 @@ import const
from DdTargets import DdTargets
from QuestionDialog import QuestionDialog
from Editors import EditEvent, DelEventQuery
from Filters import EventSidebarFilter
from Filters.SideBar import EventSidebarFilter
#-------------------------------------------------------------------------
#
# internationalization

View File

@ -31,7 +31,7 @@ import Bookmarks
import Errors
import Config
import const
from Filters import FamilySidebarFilter
from Filters.SideBar import FamilySidebarFilter
#-------------------------------------------------------------------------
#

View File

@ -60,7 +60,8 @@ import Config
import const
from Editors import EditPerson
from Filters import SearchBar, PersonSidebarFilter
from Filters import SearchBar
from Filters.SideBar import PersonSidebarFilter
from DdTargets import DdTargets
column_names = [

View File

@ -5,8 +5,6 @@ SUBDIRS = Rules
pkgdatadir = $(datadir)/@PACKAGE@/Filters
pkgdata_PYTHON = \
_EventSidebarFilter.py \
_FamilySidebarFilter.py \
_FilterComboBox.py \
_FilterList.py \
_FilterMenu.py \
@ -16,9 +14,7 @@ pkgdata_PYTHON = \
_ParamFilter.py \
__init__.py \
_SearchBar.py \
_SearchFilter.py \
_SidebarFilter.py \
_PersonSidebarFilter.py
_SearchFilter.py
pkgpyexecdir = @pkgpyexecdir@/Filters
pkgpythondir = @pkgpythondir@/Filters

View File

@ -0,0 +1,24 @@
# This is the src/Filters/SideBar level Makefile for Gramps
SUBDIRS = Rules
pkgdatadir = $(datadir)/@PACKAGE@/Filters
pkgdata_PYTHON = \
_EventSidebarFilter.py \
_FamilySidebarFilter.py \
__init__.py \
_SidebarFilter.py \
_PersonSidebarFilter.py
pkgpyexecdir = @pkgpyexecdir@/Filters/SideBar
pkgpythondir = @pkgpythondir@/Filters/SideBar
# Clean up all the byte-compiled files
MOSTLYCLEANFILES = *pyc *pyo
GRAMPS_PY_MODPATH = "../"
pycheck:
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
pychecker $(pkgdata_PYTHON));

View File

@ -117,7 +117,7 @@ class FamilySidebarFilter(SidebarFilter):
gen = self.generic.get_active() > 0
if not gid and not self.filter_event.get_type().xml_str() and \
not str(self.family_stub.get_relationship()) and not note \
not self.family_stub.get_relationship().xml_str() and not note \
and not gen:
generic_filter = None
else:
@ -134,7 +134,7 @@ class FamilySidebarFilter(SidebarFilter):
rule = HasEvent([etype, '', '', ''])
generic_filter.add_rule(rule)
rtype = self.family_stub.get_relationship()
rtype = self.family_stub.get_relationship().xml_str()
if str(rtype):
rule = HasRelType([rtype])
generic_filter.add_rule(rule)

View File

@ -0,0 +1,32 @@
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2002-2006 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
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# $Id$
"""
Package providing sidebar filters for GRAMPS.
"""
__author__ = "Don Allingham"
from _SidebarFilter import SidebarFilter
from _PersonSidebarFilter import PersonSidebarFilter
from _FamilySidebarFilter import FamilySidebarFilter
from _EventSidebarFilter import EventSidebarFilter

View File

@ -55,7 +55,3 @@ from _FilterMenu import build_filter_menu, build_filter_model
from _FilterStore import FilterStore
from _SearchBar import SearchBar
from _SearchFilter import SearchFilter
from _SidebarFilter import SidebarFilter
from _PersonSidebarFilter import PersonSidebarFilter
from _FamilySidebarFilter import FamilySidebarFilter
from _EventSidebarFilter import EventSidebarFilter