6443: try to use remove unused objects tool

svn: r21772
This commit is contained in:
Benny Malengier 2013-03-27 19:57:45 +00:00
parent e670f27f3c
commit c45a2a0e88

View File

@ -33,6 +33,7 @@
from __future__ import with_statement from __future__ import with_statement
from gramps.gen.const import GRAMPS_LOCALE as glocale from gramps.gen.const import GRAMPS_LOCALE as glocale
_ = glocale.get_translation().gettext _ = glocale.get_translation().gettext
from gramps.gen.constfunc import handle2internal
#------------------------------------------------------------------------ #------------------------------------------------------------------------
# #
@ -277,7 +278,8 @@ class RemoveUnused(tool.Tool, ManagedWindow, UpdateCallback):
fbh = db.find_backlink_handles fbh = db.find_backlink_handles
for handle, data in cursor: for handle, data in cursor:
if not any(h for h in fbh(handle)): if not any(h for h in fbh(handle)):
self.add_results((the_type, handle, data)) self.add_results((the_type, handle2internal(handle),
data))
self.update() self.update()
self.reset() self.reset()