* src/Filters/SideBar: Add new module.
svn: r7131
This commit is contained in:
@@ -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
|
||||
|
@@ -31,7 +31,7 @@ import Bookmarks
|
||||
import Errors
|
||||
import Config
|
||||
import const
|
||||
from Filters import FamilySidebarFilter
|
||||
from Filters.SideBar import FamilySidebarFilter
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@@ -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 = [
|
||||
|
@@ -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
|
||||
|
24
src/Filters/SideBar/Makefile.am
Normal file
24
src/Filters/SideBar/Makefile.am
Normal 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));
|
@@ -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)
|
32
src/Filters/SideBar/__init__.py
Normal file
32
src/Filters/SideBar/__init__.py
Normal 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
|
@@ -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
|
||||
|
Reference in New Issue
Block a user