add missing Makefile and suggestions by Gerald

svn: r12730
This commit is contained in:
Benny Malengier
2009-06-29 18:15:28 +00:00
parent 37707ba9c2
commit 4e974dc0e1
2 changed files with 27 additions and 4 deletions

View File

@@ -0,0 +1,25 @@
# This is the src/DataViews level Makefile for Gramps
# We could use GNU make's ':=' syntax for nice wildcard use,
# but that is not necessarily portable.
# If not using GNU make, then list all .py files individually
pkgdatadir = $(datadir)/@PACKAGE@/treemodels
pkgdata_PYTHON = \
__init__.py \
flatbasemodel.py
pkgpyexecdir = @pkgpyexecdir@/treemodels
pkgpythondir = @pkgpythondir@/treemodels
# Clean up all the byte-compiled files
MOSTLYCLEANFILES = *pyc *pyo
GRAMPS_PY_MODPATH = "../"
pycheck:
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
pychecker $(pkgdata_PYTHON));
pylint:
PYTHONPATH=$(GRAMPS_PY_MODPATH) pylint $(pkgdata_PYTHON) > pylint.out

View File

@@ -57,7 +57,6 @@ import locale
import logging import logging
import bisect import bisect
import time import time
import copy
_LOG = logging.getLogger(".gui.basetreemodel") _LOG = logging.getLogger(".gui.basetreemodel")
@@ -524,8 +523,7 @@ class FlatBaseModel(gtk.GenericTreeModel):
if self.search: if self.search:
ident = False ident = False
if ignore is None: if ignore is None:
tmp = copy.copy(allkeys) dlist = self.search.apply(self.db, allkeys, tupleind=1)
dlist = self.search.apply(self.db, tmp, tupleind=1)
else: else:
dlist = self.search.apply(self.db, dlist = self.search.apply(self.db,
[ k for k in allkeys if k[1] != ignore], [ k for k in allkeys if k[1] != ignore],
@@ -616,7 +614,7 @@ class FlatBaseModel(gtk.GenericTreeModel):
""" """
try: try:
return self.node_map.get_handle(path[0]) return self.node_map.get_handle(path[0])
except: except IndexError:
return None return None
def on_get_value(self, handle, col): def on_get_value(self, handle, col):