0003796: Make export available when no GUI available. Patch from jmodule (Jakim Friant).
svn: r15294
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#
|
||||
# Copyright (C) 2003-2007 Donald N. Allingham
|
||||
# Copyright (C) 2007-2008 Brian G. Matherly
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
#
|
||||
# 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
|
||||
@@ -77,11 +78,11 @@ import ManagedWindow
|
||||
from glade import Glade
|
||||
|
||||
# Import from specific modules in ReportBase
|
||||
from ReportBase import CATEGORY_BOOK, book_categories
|
||||
from ReportBase._ReportDialog import ReportDialog
|
||||
from ReportBase._DocReportDialog import DocReportDialog
|
||||
from ReportBase._CommandLineReport import CommandLineReport
|
||||
from ReportBase._ReportOptions import ReportOptions
|
||||
from gen.plug.report import CATEGORY_BOOK, book_categories
|
||||
from gui.plug.report._reportdialog import ReportDialog
|
||||
from gui.plug.report._docreportdialog import DocReportDialog
|
||||
from gen.plug.report._options import ReportOptions
|
||||
from cli.plug import CommandLineReport
|
||||
|
||||
from gen.display.name import displayer as _nd
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
# Gramps - a GTK+/GNOME based genealogy program - Records plugin
|
||||
#
|
||||
# Copyright (C) 2008 Reinhard Müller
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
#
|
||||
# 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
|
||||
@@ -40,7 +41,9 @@ from gen.display.name import displayer as name_displayer
|
||||
from gen.plug import Gramplet
|
||||
from gen.plug.menu import (BooleanOption, EnumeratedListOption,
|
||||
FilterOption, PersonOption)
|
||||
from ReportBase import Report, ReportUtils, MenuReportOptions
|
||||
from gen.plug.report import Report
|
||||
from gen.plug.report import utils as ReportUtils
|
||||
from gui.plug.report import MenuReportOptions
|
||||
from Utils import probably_alive
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
# Copyright (C) 2005-2009 Serge Noiraud
|
||||
# Copyright (C) 2007-2009 Brian G. Matherly
|
||||
# Copyright (C) 2010 Peter Landgren
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
#
|
||||
# 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
|
||||
@@ -85,7 +86,7 @@ from gen.plug.docgen import (BaseDoc, TextDoc, DrawDoc,
|
||||
from gen.plug.docgen.fontscale import string_width
|
||||
from libodfbackend import OdfBackend
|
||||
import const
|
||||
from ReportBase import ReportUtils
|
||||
from gen.plug.report import utils as ReportUtils
|
||||
import ImgManip
|
||||
import Errors
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#
|
||||
# Copyright (C) 2000-2006 Donald N. Allingham
|
||||
# Copyright (C) 2007-2009 Brian G. Matherly
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
#
|
||||
# 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
|
||||
@@ -36,7 +37,7 @@ from gen.ggettext import gettext as _
|
||||
#Gramps modules
|
||||
#-------------------------------------------------------------------------
|
||||
from gui.utils import open_file_with_default_application
|
||||
from ReportBase import ReportUtils
|
||||
from gen.plug.report import utils as ReportUtils
|
||||
from gen.plug.docgen import BaseDoc, DrawDoc, FONT_SERIF, PAPER_PORTRAIT, SOLID
|
||||
from gen.plug.utils import gformat
|
||||
import Errors
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#
|
||||
# Copyright (C) 2000-2007 Donald N. Allingham
|
||||
# Copyright (C) 2007-2008 Brian G. Matherly
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
#
|
||||
# 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
|
||||
@@ -40,7 +41,9 @@ from Errors import ReportError
|
||||
from gen.plug.docgen import (FontStyle, ParagraphStyle, GraphicsStyle,
|
||||
FONT_SANS_SERIF, PARA_ALIGN_CENTER)
|
||||
from gen.plug.menu import BooleanOption, NumberOption, TextOption, PersonOption
|
||||
from ReportBase import Report, ReportUtils, MenuReportOptions
|
||||
from gen.plug.report import Report
|
||||
from gen.plug.report import utils as ReportUtils
|
||||
from gui.plug.report import MenuReportOptions
|
||||
from SubstKeywords import SubstKeywords
|
||||
|
||||
pt2cm = ReportUtils.pt2cm
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#
|
||||
# Copyright (C) 2000-2007 Donald N. Allingham
|
||||
# Copyright (C) 2008-2009 Brian G. Matherly
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
#
|
||||
# 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
|
||||
@@ -44,7 +45,9 @@ from gen.plug.docgen.fontscale import string_trim
|
||||
from gen.plug.menu import (BooleanOption, StringOption, NumberOption,
|
||||
EnumeratedListOption, FilterOption, PersonOption)
|
||||
from gui.utils import ProgressMeter
|
||||
from ReportBase import Report, ReportUtils, MenuReportOptions
|
||||
from gen.plug.report import Report
|
||||
from gen.plug.report import utils as ReportUtils
|
||||
from gui.plug.report import MenuReportOptions
|
||||
from Utils import probably_alive
|
||||
from DateHandler import displayer as _dd
|
||||
import GrampsLocale
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
# Copyright (C) 2000-2007 Donald N. Allingham
|
||||
# Copyright (C) 2007-2008 Brian G. Matherly
|
||||
# Copyright (C) 2009 Craig J. Anderson
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
#
|
||||
# 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
|
||||
@@ -34,7 +35,9 @@ from Errors import ReportError
|
||||
from gen.plug.docgen import (GraphicsStyle, FontStyle, ParagraphStyle,
|
||||
FONT_SANS_SERIF, PARA_ALIGN_CENTER)
|
||||
from gen.plug.menu import TextOption, NumberOption, BooleanOption, PersonOption
|
||||
from ReportBase import Report, MenuReportOptions, ReportUtils
|
||||
from gen.plug.report import Report
|
||||
from gen.plug.report import utils as ReportUtils
|
||||
from gui.plug.report import MenuReportOptions
|
||||
from SubstKeywords import SubstKeywords
|
||||
from gen.ggettext import sgettext as _
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#
|
||||
# Copyright (C) 2003-2006 Donald N. Allingham
|
||||
# Copyright (C) 2007-2008 Brian G. Matherly
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
#
|
||||
# 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
|
||||
@@ -44,7 +45,9 @@ from Errors import ReportError
|
||||
from gen.plug.docgen import (FontStyle, ParagraphStyle, GraphicsStyle,
|
||||
FONT_SANS_SERIF, PARA_ALIGN_CENTER)
|
||||
from gen.plug.menu import EnumeratedListOption, NumberOption, PersonOption
|
||||
from ReportBase import Report, ReportUtils, MenuReportOptions
|
||||
from gen.plug.report import Report
|
||||
from gen.plug.report import utils as ReportUtils
|
||||
from gui.plug.report import MenuReportOptions
|
||||
import config
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
# Copyright (C) 2004-2005 Eero Tamminen
|
||||
# Copyright (C) 2007-2008 Brian G. Matherly
|
||||
# Copyright (C) 2008 Peter Landgren
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
#
|
||||
# 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
|
||||
@@ -48,7 +49,9 @@ from gen.plug.docgen import (FontStyle, ParagraphStyle, GraphicsStyle,
|
||||
PARA_ALIGN_CENTER, PARA_ALIGN_LEFT)
|
||||
from gen.plug.menu import BooleanOption, NumberOption, EnumeratedListOption, \
|
||||
FilterOption, PersonOption
|
||||
from ReportBase import Report, ReportUtils, MenuReportOptions
|
||||
from gen.plug.report import Report
|
||||
from gen.plug.report import utils as ReportUtils
|
||||
from gui.plug.report import MenuReportOptions
|
||||
import DateHandler
|
||||
from gui.utils import ProgressMeter
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#
|
||||
# Copyright (C) 2003-2007 Donald N. Allingham
|
||||
# Copyright (C) 2007-2008 Brian G. Matherly
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
#
|
||||
# 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
|
||||
@@ -38,7 +39,9 @@ from gen.ggettext import sgettext as _
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
from gen.plug.menu import PersonOption, FilterOption, EnumeratedListOption
|
||||
from ReportBase import Report, ReportUtils, MenuReportOptions
|
||||
from gen.plug.report import Report
|
||||
from gen.plug.report import utils as ReportUtils
|
||||
from gui.plug.report import MenuReportOptions
|
||||
pt2cm = ReportUtils.pt2cm
|
||||
from gen.plug.docgen import (FontStyle, ParagraphStyle, GraphicsStyle,
|
||||
FONT_SANS_SERIF, DASHED, PARA_ALIGN_CENTER)
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
# Copyright (C) 2007-2008 Douglas S. Blank
|
||||
# Copyright (C) 2004-2007 Donald N. Allingham
|
||||
# Copyright (C) 2008 Brian G. Matherly
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
#
|
||||
# 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
|
||||
@@ -50,7 +51,6 @@ LOG = logging.getLogger(".ExportCSV")
|
||||
import gen.lib
|
||||
from Filters import GenericFilter, Rules, build_filter_model
|
||||
import Utils
|
||||
from QuestionDialog import ErrorDialog
|
||||
import gen.proxy
|
||||
import DateHandler
|
||||
from glade import Glade
|
||||
@@ -60,8 +60,8 @@ from glade import Glade
|
||||
# The function that does the exporting
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
def exportData(database, filename, option_box=None, callback=None):
|
||||
gw = CSVWriter(database, filename, option_box, callback)
|
||||
def exportData(database, filename, msg_callback, option_box=None, callback=None):
|
||||
gw = CSVWriter(database, filename, msg_callback, option_box, callback)
|
||||
return gw.export_data()
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
@@ -219,11 +219,12 @@ class CSVWriterOptionBox(object):
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class CSVWriter(object):
|
||||
def __init__(self, database, filename, option_box=None, callback=None):
|
||||
def __init__(self, database, filename, msg_callback, option_box=None, callback=None):
|
||||
self.db = database
|
||||
self.option_box = option_box
|
||||
self.filename = filename
|
||||
self.callback = callback
|
||||
self.msg_callback = msg_callback
|
||||
if callable(self.callback): # callback is really callable
|
||||
self.update = self.update_real
|
||||
else:
|
||||
@@ -293,10 +294,10 @@ class CSVWriter(object):
|
||||
self.g = UnicodeWriter(self.fp)
|
||||
except IOError,msg:
|
||||
msg2 = _("Could not create %s") % self.filename
|
||||
ErrorDialog(msg2,str(msg))
|
||||
self.msg_callback(msg2,str(msg))
|
||||
return False
|
||||
except:
|
||||
ErrorDialog(_("Could not create %s") % self.filename)
|
||||
self.msg_callback(_("Could not create %s") % self.filename)
|
||||
return False
|
||||
######################### initialize progress bar
|
||||
self.count = 0
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#
|
||||
# Copyright (C) 2003-2006, 2008 Donald N. Allingham
|
||||
# Copyright (C) 2008 Brian G. Matherly
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
#
|
||||
# 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
|
||||
@@ -47,7 +48,6 @@ log = logging.getLogger(".WriteFtree")
|
||||
import Utils
|
||||
from Filters import GenericFilter, Rules, build_filter_model
|
||||
import Errors
|
||||
from QuestionDialog import ErrorDialog
|
||||
from glade import Glade
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
@@ -55,8 +55,8 @@ from glade import Glade
|
||||
# writeData
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
def writeData(database, filename, option_box=None, callback=None):
|
||||
writer = FtreeWriter(database, filename, option_box, callback)
|
||||
def writeData(database, filename, msg_callback, option_box=None, callback=None):
|
||||
writer = FtreeWriter(database, msg_callback, filename, option_box, callback)
|
||||
return writer.export_data()
|
||||
|
||||
class FtreeWriterOptionBox(object):
|
||||
@@ -123,12 +123,13 @@ class FtreeWriterOptionBox(object):
|
||||
#-------------------------------------------------------------------------
|
||||
class FtreeWriter(object):
|
||||
|
||||
def __init__(self, database, filename="", option_box=None,
|
||||
def __init__(self, database, msg_callback, filename="", option_box=None,
|
||||
callback = None):
|
||||
self.db = database
|
||||
self.option_box = option_box
|
||||
self.filename = filename
|
||||
self.callback = callback
|
||||
self.msg_callback = msg_callback
|
||||
if callable(self.callback): # callback is really callable
|
||||
self.update = self.update_real
|
||||
else:
|
||||
@@ -154,7 +155,7 @@ class FtreeWriter(object):
|
||||
|
||||
except Errors.FilterError, msg:
|
||||
(m1, m2) = msg.messages()
|
||||
ErrorDialog(m1, m2)
|
||||
self.msg_callback(m1, m2)
|
||||
return
|
||||
|
||||
def update_empty(self):
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
# Copyright (C) 2008 Brian G. Matherly
|
||||
# Copyright (C) 2008-2009 Gary Burton
|
||||
# Copyright (C) 2008 Robert Cheramy <robert@cheramy.net>
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
#
|
||||
# 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
|
||||
@@ -46,7 +47,6 @@ from ExportOptions import WriterOptionBox
|
||||
from gen.updatecallback import UpdateCallback
|
||||
from Utils import media_path_full, get_unicode_path
|
||||
import gen.proxy
|
||||
from QuestionDialog import ErrorDialog
|
||||
from PlaceUtils import conv_lat_lon
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
@@ -1398,7 +1398,7 @@ class GedcomWriter(UpdateCallback):
|
||||
#
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
def export_data(database, filename, option_box=None, callback=None):
|
||||
def export_data(database, filename, msg_callback, option_box=None, callback=None):
|
||||
"""
|
||||
External interface used to register with the plugin system.
|
||||
"""
|
||||
@@ -1408,7 +1408,7 @@ def export_data(database, filename, option_box=None, callback=None):
|
||||
ret = ged_write.write_gedcom_file(filename)
|
||||
except IOError, msg:
|
||||
msg2 = _("Could not create %s") % filename
|
||||
ErrorDialog(msg2, str(msg))
|
||||
msg_callback(msg2, str(msg))
|
||||
except Errors.DatabaseError, msg:
|
||||
ErrorDialog(_("Export failed"), str(msg))
|
||||
msg_callback(_("Export failed"), str(msg))
|
||||
return ret
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
# Copyright (C) 2004-2006, 2008 Donald N. Allingham
|
||||
# Copyright (C) 2008 Brian G. Matherly
|
||||
# Copyright (C) 2009 Gary Burton
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
#
|
||||
# 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
|
||||
@@ -49,7 +50,6 @@ import gen.lib
|
||||
from Filters import GenericFilter, Rules, build_filter_model
|
||||
#import const
|
||||
import Utils
|
||||
from QuestionDialog import ErrorDialog
|
||||
from glade import Glade
|
||||
import config
|
||||
|
||||
@@ -139,12 +139,13 @@ class GeneWebWriterOptionBox(object):
|
||||
self.images_path = ""
|
||||
|
||||
class GeneWebWriter(object):
|
||||
def __init__(self, database, filename="", option_box=None,
|
||||
def __init__(self, database, msg_callback, filename="", option_box=None,
|
||||
callback=None):
|
||||
self.db = database
|
||||
self.option_box = option_box
|
||||
self.filename = filename
|
||||
self.callback = callback
|
||||
self.msg_callback = msg_callback
|
||||
if callable(self.callback): # callback is really callable
|
||||
self.update = self.update_real
|
||||
else:
|
||||
@@ -215,14 +216,14 @@ class GeneWebWriter(object):
|
||||
self.g = open(self.filename, "w")
|
||||
except IOError,msg:
|
||||
msg2 = _("Could not create %s") % self.filename
|
||||
ErrorDialog(msg2, str(msg))
|
||||
self.msg_callback(msg2, str(msg))
|
||||
return False
|
||||
except:
|
||||
ErrorDialog(_("Could not create %s") % self.filename)
|
||||
self.msg_callback(_("Could not create %s") % self.filename)
|
||||
return False
|
||||
|
||||
if len(self.flist) < 1:
|
||||
ErrorDialog(_("No families matched by selected filter"))
|
||||
self.msg_callback(_("No families matched by selected filter"))
|
||||
return False
|
||||
|
||||
self.count = 0
|
||||
@@ -609,6 +610,6 @@ class GeneWebWriter(object):
|
||||
#
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
def exportData(database, filename, option_box=None, callback=None):
|
||||
gw = GeneWebWriter(database, filename, option_box, callback)
|
||||
def exportData(database, filename, msg_callback, option_box=None, callback=None):
|
||||
gw = GeneWebWriter(database, msg_callback, filename, option_box, callback)
|
||||
return gw.export_data()
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
# Copyright (C) 2008 Brian G. Matherly
|
||||
# Copyright (C) 2008 Gary Burton
|
||||
# Copyright (C) 2008 Robert Cheramy <robert@cheramy.net>
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
#
|
||||
# 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
|
||||
@@ -69,7 +70,7 @@ import constfunc
|
||||
# writeData
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
def writeData(database, filename, option_box=None, callback=None):
|
||||
def writeData(database, filename, msg_callback, option_box=None, callback=None):
|
||||
|
||||
# Rename file, if it exists already, with <filename>.bak
|
||||
# as it it for normal XML export.
|
||||
@@ -105,7 +106,7 @@ def writeData(database, filename, option_box=None, callback=None):
|
||||
if option_box.unlinked:
|
||||
database = gen.proxy.ReferencedProxyDb(database)
|
||||
|
||||
writer = PackageWriter(database, filename, callback)
|
||||
writer = PackageWriter(database, filename, msg_callback, callback)
|
||||
return writer.export()
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
@@ -115,9 +116,10 @@ def writeData(database, filename, option_box=None, callback=None):
|
||||
#-------------------------------------------------------------------------
|
||||
class PackageWriter(object):
|
||||
|
||||
def __init__(self, database, filename, callback=None):
|
||||
def __init__(self, database, filename, msg_callback, callback=None):
|
||||
self.db = database
|
||||
self.callback = callback
|
||||
self.msg_callback = msg_callback
|
||||
self.filename = filename
|
||||
|
||||
def export(self):
|
||||
@@ -228,7 +230,7 @@ class PackageWriter(object):
|
||||
|
||||
# Write XML now
|
||||
g = StringIO()
|
||||
gfile = XmlWriter(self.db, self.callback, 2)
|
||||
gfile = XmlWriter(self.db, msg_callback, self.callback, 2)
|
||||
gfile.write_handle(g)
|
||||
tarinfo = tarfile.TarInfo('data.gramps')
|
||||
tarinfo.size = len(g.getvalue())
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
# Copyright (C) 2004 Martin Hawlisch
|
||||
# Copyright (C) 2005-2006, 2008 Donald N. Allingham
|
||||
# Copyright (C) 2008 Brian G. Matherly
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
#
|
||||
# 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
|
||||
@@ -50,7 +51,6 @@ from Filters import GenericFilter, Rules, build_filter_model
|
||||
import Utils
|
||||
from gen.lib import Date, EventType
|
||||
import Errors
|
||||
from QuestionDialog import ErrorDialog
|
||||
from glade import Glade
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
@@ -116,13 +116,14 @@ class CalendarWriterOptionBox(object):
|
||||
self.cfilter = self.filter_menu[self.filters.get_active()][1]
|
||||
|
||||
class CalendarWriter(object):
|
||||
def __init__(self, database, cl=0, filename="", option_box=None,
|
||||
def __init__(self, database, msg_callback, cl=0, filename="", option_box=None,
|
||||
callback=None):
|
||||
self.db = database
|
||||
self.option_box = option_box
|
||||
self.cl = cl
|
||||
self.filename = filename
|
||||
self.callback = callback
|
||||
self.msg_callback = msg_callback
|
||||
if callable(self.callback): # callback is really callable
|
||||
self.update = self.update_real
|
||||
else:
|
||||
@@ -153,7 +154,7 @@ class CalendarWriter(object):
|
||||
self.db, self.db.iter_person_handles()))
|
||||
except Errors.FilterError, msg:
|
||||
(m1, m2) = msg.messages()
|
||||
ErrorDialog(m1, m2)
|
||||
self.msg_callback(m1, m2)
|
||||
return
|
||||
|
||||
self.flist = {}
|
||||
@@ -194,10 +195,10 @@ class CalendarWriter(object):
|
||||
self.g = open(filename,"w")
|
||||
except IOError,msg:
|
||||
msg2 = _("Could not create %s") % filename
|
||||
ErrorDialog(msg2, str(msg))
|
||||
self.msg_callback(msg2, str(msg))
|
||||
return False
|
||||
except:
|
||||
ErrorDialog(_("Could not create %s") % filename)
|
||||
self.msg_callback(_("Could not create %s") % filename)
|
||||
return False
|
||||
|
||||
self.writeln("BEGIN:VCALENDAR")
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
# Copyright (C) 2004 Martin Hawlisch
|
||||
# Copyright (C) 2005-2008 Donald N. Allingham
|
||||
# Copyright (C) 2008 Brian G. Matherly
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
#
|
||||
# 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
|
||||
@@ -48,7 +49,6 @@ log = logging.getLogger(".ExportVCard")
|
||||
from Filters import GenericFilter, Rules, build_filter_model
|
||||
from gen.lib import Date
|
||||
import Errors
|
||||
from QuestionDialog import ErrorDialog
|
||||
from glade import Glade
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
@@ -115,13 +115,14 @@ class CardWriterOptionBox(object):
|
||||
self.cfilter = self.filter_menu[self.filters.get_active()][1]
|
||||
|
||||
class CardWriter(object):
|
||||
def __init__(self, database, cl=0, filename="", option_box=None,
|
||||
def __init__(self, database, msg_callback, cl=0, filename="", option_box=None,
|
||||
callback=None):
|
||||
self.db = database
|
||||
self.option_box = option_box
|
||||
self.cl = cl
|
||||
self.filename = filename
|
||||
self.callback = callback
|
||||
self.msg_callback = msg_callback
|
||||
if callable(self.callback): # callback is really callable
|
||||
self.update = self.update_real
|
||||
else:
|
||||
@@ -144,7 +145,7 @@ class CardWriter(object):
|
||||
self.plist[p] = 1
|
||||
except Errors.FilterError, msg:
|
||||
(m1, m2) = msg.messages()
|
||||
ErrorDialog(m1, m2)
|
||||
self.msg_callback(m1, m2)
|
||||
return
|
||||
|
||||
def update_empty(self):
|
||||
@@ -171,10 +172,10 @@ class CardWriter(object):
|
||||
self.g = open(filename,"w")
|
||||
except IOError,msg:
|
||||
msg2 = _("Could not create %s") % filename
|
||||
ErrorDialog(msg2, str(msg))
|
||||
self.msg_callback(msg2, str(msg))
|
||||
return False
|
||||
except:
|
||||
ErrorDialog(_("Could not create %s") % filename)
|
||||
self.msg_callback(_("Could not create %s") % filename)
|
||||
return False
|
||||
|
||||
self.count = 0
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
# Copyright (C) 2008 Gary Burton
|
||||
# Copyright (C) 2008 Robert Cheramy <robert@cheramy.net>
|
||||
# Copyright (C) 2009 Douglas S. Blank
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
#
|
||||
# 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
|
||||
@@ -60,7 +61,7 @@ from gen.updatecallback import UpdateCallback
|
||||
from gen.db.exceptions import DbWriteFailure
|
||||
import const
|
||||
import constfunc
|
||||
from QuestionDialog import ErrorDialog
|
||||
#from QuestionDialog import ErrorDialog
|
||||
from ExportOptions import WriterOptionBox
|
||||
import gen.proxy
|
||||
import libgrampsxml
|
||||
@@ -93,7 +94,7 @@ class GrampsXmlWriter(UpdateCallback):
|
||||
Writes a database to the XML file.
|
||||
"""
|
||||
|
||||
def __init__(self, db, strip_photos=0, compress=1, version="unknown",
|
||||
def __init__(self, db, strip_photos=0, compress=1, version="unknown",
|
||||
callback=None):
|
||||
"""
|
||||
Initialize, but does not write, an XML file.
|
||||
@@ -1147,7 +1148,7 @@ def conf_priv(obj):
|
||||
# export_data
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
def export_data(database, filename, option_box=None, callback=None):
|
||||
def export_data(database, filename, msg_callback, option_box=None, callback=None):
|
||||
"""
|
||||
Call the XML writer with the syntax expected by the export plugin.
|
||||
"""
|
||||
@@ -1184,7 +1185,7 @@ def export_data(database, filename, option_box=None, callback=None):
|
||||
if option_box.unlinked:
|
||||
database = gen.proxy.ReferencedProxyDb(database)
|
||||
|
||||
g = XmlWriter(database, callback, 0, compress)
|
||||
g = XmlWriter(database, msg_callback, callback, 0, compress)
|
||||
return g.write(filename)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
@@ -1197,9 +1198,10 @@ class XmlWriter(GrampsXmlWriter):
|
||||
Writes a database to the XML file.
|
||||
"""
|
||||
|
||||
def __init__(self, dbase, callback, strip_photos, compress=1):
|
||||
def __init__(self, dbase, msg_callback, callback, strip_photos, compress=1):
|
||||
GrampsXmlWriter.__init__(
|
||||
self, dbase, strip_photos, compress, const.VERSION, callback)
|
||||
self.msg_callback = msg_callback
|
||||
|
||||
def write(self, filename):
|
||||
"""
|
||||
@@ -1210,5 +1212,5 @@ class XmlWriter(GrampsXmlWriter):
|
||||
ret = GrampsXmlWriter.write(self, filename)
|
||||
except DbWriteFailure, msg:
|
||||
(m1,m2) = msg.messages()
|
||||
ErrorDialog(m1, m2)
|
||||
self.msg_callback(m1, m2)
|
||||
return ret
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
# Copyright (C) 2000-2007 Donald N. Allingham
|
||||
# Copyright (C) 2007-2008 Brian G. Matherly
|
||||
# Copyright (C) 2008 Douglas S. Blank
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
#
|
||||
# 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
|
||||
@@ -37,7 +38,7 @@ from gen.ggettext import gettext as _
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
from gen.plug import Gramplet
|
||||
from ReportBase import ReportUtils
|
||||
from gen.plug.report import utils as ReportUtils
|
||||
from gen.display.name import displayer as name_displayer
|
||||
import DateHandler
|
||||
from gen.utils import get_birth_or_fallback, get_death_or_fallback
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
# Gramps - a GTK+/GNOME based genealogy program - What Next Gramplet plugin
|
||||
#
|
||||
# Copyright (C) 2008 Reinhard Mueller
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
#
|
||||
# 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
|
||||
@@ -29,7 +30,7 @@
|
||||
from gen.lib import EventType, FamilyRelType, MarkerType
|
||||
from gen.plug import Gramplet
|
||||
from gen.display.name import displayer as name_displayer
|
||||
from ReportBase import ReportUtils
|
||||
from gen.plug.report import utils as ReportUtils
|
||||
from gen.ggettext import sgettext as _
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
# Copyright (C) 2007-2008 Brian G. Matherly
|
||||
# Copyright (C) 2009-2010 Gary Burton
|
||||
# Contribution 2009 by Bob Ham <rah@bash.sh>
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
#
|
||||
# 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
|
||||
@@ -52,7 +53,9 @@ import Utils
|
||||
from gui.utils import ProgressMeter
|
||||
import ThumbNails
|
||||
from DateHandler import displayer as _dd
|
||||
from ReportBase import Report, ReportUtils, MenuReportOptions
|
||||
from gen.plug.report import Report
|
||||
from gen.plug.report import utils as ReportUtils
|
||||
from gui.plug.report import MenuReportOptions
|
||||
from gen.plug.menu import NumberOption, ColorOption, BooleanOption, \
|
||||
EnumeratedListOption, PersonListOption, \
|
||||
SurnameColorOption
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
# Copyright (C) 2007-2008 Brian G. Matherly
|
||||
# Copyright (C) 2008 Stephane Charette <stephanecharette@gmail.com>
|
||||
# Contribution 2009 by Bob Ham <rah@bash.sh>
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
#
|
||||
# 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
|
||||
@@ -41,7 +42,9 @@ from gen.display.name import displayer as name_displayer
|
||||
from Errors import ReportError
|
||||
from gen.plug.menu import (PersonOption, BooleanOption, NumberOption,
|
||||
EnumeratedListOption)
|
||||
from ReportBase import Report, ReportUtils, MenuReportOptions
|
||||
from gen.plug.report import Report
|
||||
from gen.plug.report import utils as ReportUtils
|
||||
from gui.plug.report import MenuReportOptions
|
||||
import DateHandler
|
||||
from gen.utils import get_birth_or_fallback, get_death_or_fallback
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
# Copyright (C) 2008 Stephane Charette <stephanecharette@gmail.com>
|
||||
# Copyright (C) 2009 Gary Burton
|
||||
# Contribution 2009 by Bob Ham <rah@bash.sh>
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
#
|
||||
# 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
|
||||
@@ -47,7 +48,9 @@ from gen.ggettext import sgettext as _
|
||||
#------------------------------------------------------------------------
|
||||
from gen.plug.menu import BooleanOption, EnumeratedListOption, FilterOption, \
|
||||
PersonOption, ColorOption
|
||||
from ReportBase import Report, ReportUtils, MenuReportOptions
|
||||
from gen.plug.report import Report
|
||||
from gen.plug.report import utils as ReportUtils
|
||||
from gui.plug.report import MenuReportOptions
|
||||
from gen.display.name import displayer as name_displayer
|
||||
import DateHandler
|
||||
import gen.lib
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
# Copyright (C) 2009 Benny Malengier
|
||||
# Copyright (C) 2009 Brian Matherly
|
||||
# Copyright (C) 2010 Peter Landgren
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
#
|
||||
# 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
|
||||
@@ -42,7 +43,7 @@ from math import radians
|
||||
from gen.plug.docgen import (BaseDoc, TextDoc, DrawDoc, ParagraphStyle,
|
||||
TableCellStyle, FONT_SANS_SERIF, FONT_SERIF,
|
||||
FONT_MONOSPACE, PARA_ALIGN_CENTER, PARA_ALIGN_LEFT)
|
||||
from ReportBase import ReportUtils
|
||||
from gen.plug.report import utils as ReportUtils
|
||||
from Errors import PluginError
|
||||
from gen.plug.docbackend import CairoBackend
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
# Gramps - a GTK+/GNOME based genealogy program
|
||||
#
|
||||
# Copyright (C) 2009 Brian G. Matherly
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
#
|
||||
# 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
|
||||
@@ -36,7 +37,7 @@ from gen.lib.eventtype import EventType
|
||||
from gen.lib.familyreltype import FamilyRelType
|
||||
from gen.display.name import displayer as _nd
|
||||
import Utils
|
||||
from ReportBase import ReportUtils
|
||||
from gen.plug.report import utils as ReportUtils
|
||||
from libtranslate import Translator
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#
|
||||
# Copyright (C) 2000-2007 Donald N. Allingham
|
||||
# Copyright (C) 2007-2009 Brian G. Matherly
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
#
|
||||
# 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
|
||||
@@ -44,7 +45,9 @@ from gen.plug.menu import BooleanOption, NumberOption, PersonOption, \
|
||||
from gen.plug.docgen import (IndexMark, FontStyle, ParagraphStyle,
|
||||
FONT_SANS_SERIF, INDEX_TYPE_TOC,
|
||||
PARA_ALIGN_CENTER)
|
||||
from ReportBase import Report, ReportUtils, MenuReportOptions
|
||||
from gen.plug.report import Report
|
||||
from gen.plug.report import utils as ReportUtils
|
||||
from gui.plug.report import MenuReportOptions
|
||||
import TransUtils
|
||||
from libnarrate import Narrator
|
||||
from libtranslate import Translator, get_language_string
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
# Copyright (C) 2000-2007 Donald N. Allingham
|
||||
# Copyright (C) 2008-2009 Brian G. Matherly
|
||||
# Copyright (C) 2009 Rob G. Healey <robhealey1@gmail.com>
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
#
|
||||
# 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
|
||||
@@ -45,7 +46,9 @@ from gen.plug.docgen import (FontStyle, ParagraphStyle, GraphicsStyle,
|
||||
from gen.plug.menu import (BooleanOption, StringOption, NumberOption,
|
||||
EnumeratedListOption, FilterOption, PersonOption)
|
||||
from gui.utils import ProgressMeter
|
||||
from ReportBase import Report, ReportUtils, MenuReportOptions
|
||||
from gen.plug.report import Report
|
||||
from gen.plug.report import utils as ReportUtils
|
||||
from gui.plug.report import MenuReportOptions
|
||||
from Utils import probably_alive
|
||||
import GrampsLocale
|
||||
from DateHandler import displayer as _dd
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#
|
||||
# Copyright (C) 2003-2006 Donald N. Allingham
|
||||
# Copyright (C) 2008 Brian G. Matherly
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
#
|
||||
# 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
|
||||
@@ -42,7 +43,8 @@ from gen.ggettext import gettext as _
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
from gen.plug.menu import TextOption
|
||||
from ReportBase import Report, MenuReportOptions
|
||||
from gen.plug.report import Report
|
||||
from gui.plug.report import MenuReportOptions
|
||||
from gen.plug.docgen import (FontStyle, ParagraphStyle, FONT_SANS_SERIF,
|
||||
PARA_ALIGN_CENTER)
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
# Copyright (C) 2007-2008 Brian G. Matherly
|
||||
# Copyright (C) 2009 Gary Burton
|
||||
# Copyright (C) 2010 Craig J. Anderson
|
||||
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
#
|
||||
# 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
|
||||
@@ -45,7 +45,9 @@ from gen.plug.docgen import (IndexMark, FontStyle, ParagraphStyle,
|
||||
from gen.plug.menu import NumberOption, PersonOption, BooleanOption, EnumeratedListOption
|
||||
from gen.display.name import displayer as _nd
|
||||
from Errors import ReportError
|
||||
from ReportBase import Report, ReportUtils, MenuReportOptions
|
||||
from gen.plug.report import Report
|
||||
from gen.plug.report import utils as ReportUtils
|
||||
from gui.plug.report import MenuReportOptions
|
||||
import DateHandler
|
||||
import Sort
|
||||
from gen.utils import get_birth_or_fallback, get_death_or_fallback
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
# Copyright (C) 2007-2009 Brian G. Matherly
|
||||
# Copyright (C) 2008 James Friedmann <jfriedmannj@gmail.com>
|
||||
# Copyright (C) 2009 Benny Malengier <benny.malengier@gramps-project.org>
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
#
|
||||
# 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
|
||||
@@ -45,8 +46,11 @@ from gen.plug.docgen import (IndexMark, FontStyle, ParagraphStyle,
|
||||
FONT_SANS_SERIF, FONT_SERIF,
|
||||
INDEX_TYPE_TOC, PARA_ALIGN_CENTER)
|
||||
from gen.plug.menu import BooleanOption, NumberOption, PersonOption
|
||||
from ReportBase import (Report, ReportUtils, MenuReportOptions,
|
||||
Bibliography, Endnotes)
|
||||
from gen.plug.report import ( Report, Bibliography )
|
||||
from gen.plug.report import endnotes
|
||||
from gen.plug.report import utils as ReportUtils
|
||||
from gui.plug.report import MenuReportOptions
|
||||
|
||||
import DateHandler
|
||||
|
||||
from libnarrate import Narrator
|
||||
@@ -200,7 +204,7 @@ class DetAncestorReport(Report):
|
||||
if self.inc_events:
|
||||
self.write_family_events(family)
|
||||
if self.inc_sources:
|
||||
Endnotes.write_endnotes(self.bibli, self.database, self.doc,
|
||||
endnotes.write_endnotes(self.bibli, self.database, self.doc,
|
||||
printnotes=self.inc_srcnotes)
|
||||
|
||||
def write_person(self, key):
|
||||
@@ -638,7 +642,7 @@ class DetAncestorReport(Report):
|
||||
if not obj or not self.inc_sources:
|
||||
return ""
|
||||
|
||||
txt = Endnotes.cite_source(self.bibli, obj)
|
||||
txt = endnotes.cite_source(self.bibli, obj)
|
||||
if txt:
|
||||
txt = '<super>' + txt + '</super>'
|
||||
return txt
|
||||
@@ -837,4 +841,4 @@ class DetAncestorOptions(MenuReportOptions):
|
||||
para.set_description(_('The style used for additional detail data.'))
|
||||
default_style.add_paragraph_style("DAR-MoreDetails",para)
|
||||
|
||||
Endnotes.add_endnote_styles(default_style)
|
||||
endnotes.add_endnote_styles(default_style)
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
# Copyright (C) 2007 Robert Cawley <rjc@cawley.id.au>
|
||||
# Copyright (C) 2008-2009 James Friedmann <jfriedmannj@gmail.com>
|
||||
# Copyright (C) 2009 Benny Malengier <benny.malengier@gramps-project.org>
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
#
|
||||
# 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
|
||||
@@ -47,8 +48,11 @@ from gen.plug.menu import (BooleanOption, NumberOption, PersonOption,
|
||||
from gen.plug.docgen import (IndexMark, FontStyle, ParagraphStyle,
|
||||
FONT_SANS_SERIF, FONT_SERIF,
|
||||
INDEX_TYPE_TOC, PARA_ALIGN_CENTER)
|
||||
from ReportBase import (Report, ReportUtils, MenuReportOptions,
|
||||
Bibliography, Endnotes)
|
||||
from gen.plug.report import (Report, Bibliography)
|
||||
from gen.plug.report import endnotes
|
||||
from gen.plug.report import utils as ReportUtils
|
||||
from gui.plug.report import MenuReportOptions
|
||||
|
||||
import DateHandler
|
||||
|
||||
from libnarrate import Narrator
|
||||
@@ -273,7 +277,7 @@ class DetDescendantReport(Report):
|
||||
self.write_person(key)
|
||||
|
||||
if self.inc_sources:
|
||||
Endnotes.write_endnotes(self.bibli, self.database, self.doc,
|
||||
endnotes.write_endnotes(self.bibli, self.database, self.doc,
|
||||
printnotes=self.inc_srcnotes)
|
||||
|
||||
def write_path(self, person):
|
||||
@@ -718,7 +722,7 @@ class DetDescendantReport(Report):
|
||||
if not obj or not self.inc_sources:
|
||||
return ""
|
||||
|
||||
txt = Endnotes.cite_source(self.bibli, obj)
|
||||
txt = endnotes.cite_source(self.bibli, obj)
|
||||
if txt:
|
||||
txt = '<super>' + txt + '</super>'
|
||||
return txt
|
||||
@@ -947,4 +951,4 @@ class DetDescendantOptions(MenuReportOptions):
|
||||
para.set_description(_('The style used for additional detail data.'))
|
||||
default_style.add_paragraph_style("DDR-MoreDetails", para)
|
||||
|
||||
Endnotes.add_endnote_styles(default_style)
|
||||
endnotes.add_endnote_styles(default_style)
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
# Gramps - a GTK+/GNOME based genealogy program
|
||||
#
|
||||
# Copyright (C) 2007-2008 Brian G. Matherly
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
#
|
||||
# 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
|
||||
@@ -40,7 +41,9 @@ from gen.plug.docgen import (IndexMark, FontStyle, ParagraphStyle, TableStyle,
|
||||
TableCellStyle, FONT_SANS_SERIF, INDEX_TYPE_TOC,
|
||||
PARA_ALIGN_CENTER)
|
||||
from gen.plug.menu import PersonOption
|
||||
from ReportBase import Report, ReportUtils, MenuReportOptions
|
||||
from gen.plug.report import Report
|
||||
from gen.plug.report import utils as ReportUtils
|
||||
from gui.plug.report import MenuReportOptions
|
||||
import DateHandler
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#
|
||||
# Copyright (C) 2000-2007 Donald N. Allingham
|
||||
# Copyright (C) 2007-2008 Brian G. Matherly
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
#
|
||||
# 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
|
||||
@@ -30,7 +31,9 @@
|
||||
#------------------------------------------------------------------------
|
||||
import gen.lib
|
||||
from gen.plug.menu import BooleanOption, FamilyOption
|
||||
from ReportBase import Report, ReportUtils, MenuReportOptions
|
||||
from gen.plug.report import Report
|
||||
from gen.plug.report import utils as ReportUtils
|
||||
from gui.plug.report import MenuReportOptions
|
||||
from gen.plug.docgen import (IndexMark, FontStyle, ParagraphStyle, TableStyle,
|
||||
TableCellStyle, FONT_SANS_SERIF, FONT_SERIF,
|
||||
INDEX_TYPE_TOC, PARA_ALIGN_CENTER)
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
# Copyright (C) 2007-2008 Brian G. Matherly
|
||||
# Copyright (C) 2009 Nick Hall
|
||||
# Copyright (C) 2009 Benny Malengier
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
#
|
||||
# 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
|
||||
@@ -44,8 +45,11 @@ from gen.plug.docgen import (IndexMark, FontStyle, ParagraphStyle, TableStyle,
|
||||
import DateHandler
|
||||
from gen.plug.menu import BooleanOption, FilterOption, PersonOption, \
|
||||
BooleanListOption
|
||||
from ReportBase import Report, ReportUtils, MenuReportOptions
|
||||
from ReportBase import Bibliography, Endnotes
|
||||
from gen.plug.report import Report
|
||||
from gen.plug.report import utils as ReportUtils
|
||||
from gui.plug.report import MenuReportOptions
|
||||
from gen.plug.report import Bibliography
|
||||
from gen.plug.report import endnotes as Endnotes
|
||||
from gen.display.name import displayer as _nd
|
||||
from Utils import media_path_full
|
||||
from QuestionDialog import WarningDialog
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
# Copyright (C) 2007-2008 Brian G. Matherly
|
||||
# Copyright (C) 2009 Gary Burton
|
||||
# Contribution 2009 by Reinhard Mueller <reinhard.mueller@bytewise.at>
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
#
|
||||
# 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
|
||||
@@ -42,7 +43,9 @@ import Relationship
|
||||
from gen.plug.docgen import (IndexMark, FontStyle, ParagraphStyle,
|
||||
FONT_SANS_SERIF, INDEX_TYPE_TOC, PARA_ALIGN_CENTER)
|
||||
from gen.plug.menu import NumberOption, BooleanOption, PersonOption
|
||||
from ReportBase import Report, ReportUtils, MenuReportOptions
|
||||
from gen.plug.report import Report
|
||||
from gen.plug.report import utils as ReportUtils
|
||||
from gui.plug.report import MenuReportOptions
|
||||
import DateHandler
|
||||
from gen.utils import get_birth_or_fallback, get_death_or_fallback
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#
|
||||
# Copyright (C) 2007-2008 Brian G. Matherly
|
||||
# Copyright (C) 2009 Gary Burton
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
#
|
||||
# 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
|
||||
@@ -36,7 +37,9 @@ from gen.ggettext import gettext as _
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
from gen.plug.menu import EnumeratedListOption
|
||||
from ReportBase import Report, ReportUtils, MenuReportOptions
|
||||
from gen.plug.report import Report
|
||||
from gen.plug.report import utils as ReportUtils
|
||||
from gui.plug.report import MenuReportOptions
|
||||
from gen.plug.docgen import (IndexMark, FontStyle, ParagraphStyle,
|
||||
TableStyle, TableCellStyle, FONT_SANS_SERIF,
|
||||
INDEX_TYPE_TOC, PARA_ALIGN_CENTER)
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
# Copyright (C) 2004-2006 Donald Allingham
|
||||
# Copyright (C) 2007 Johan Gonqvist <johan.gronqvist@gmail.com>
|
||||
# Copyright (C) 2008 Brian G. Matherly
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
#
|
||||
# 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
|
||||
@@ -46,7 +47,9 @@ from gen.plug.menu import PersonOption
|
||||
from gen.plug.docgen import (IndexMark, FontStyle, ParagraphStyle,
|
||||
FONT_SANS_SERIF, PARA_ALIGN_CENTER,
|
||||
INDEX_TYPE_TOC)
|
||||
from ReportBase import Report, MenuReportOptions, ReportUtils
|
||||
from gen.plug.report import Report
|
||||
from gen.plug.report import utils as ReportUtils
|
||||
from gui.plug.report import MenuReportOptions
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
#
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
# Gramps - a GTK+/GNOME based genealogy program
|
||||
#
|
||||
# Copyright (C) 2008 Gary Burton
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
#
|
||||
# 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
|
||||
@@ -35,7 +36,8 @@ from gen.ggettext import gettext as _
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
from gen.plug.menu import FilterOption, PlaceListOption
|
||||
from ReportBase import Report, MenuReportOptions
|
||||
from gen.plug.report import Report
|
||||
from gui.plug.report import MenuReportOptions
|
||||
from gen.plug.docgen import (IndexMark, FontStyle, ParagraphStyle, TableStyle,
|
||||
TableCellStyle, FONT_SANS_SERIF, FONT_SERIF,
|
||||
INDEX_TYPE_TOC, PARA_ALIGN_CENTER)
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#
|
||||
# Copyright (C) 2003-2006 Donald N. Allingham
|
||||
# Copyright (C) 2008 Brian G. Matherly
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
#
|
||||
# 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
|
||||
@@ -35,7 +36,8 @@ from gen.ggettext import sgettext as _
|
||||
#------------------------------------------------------------------------
|
||||
from gen.plug.menu import StringOption, MediaOption, NumberOption
|
||||
from Utils import media_path_full
|
||||
from ReportBase import Report, MenuReportOptions
|
||||
from gen.plug.report import Report
|
||||
from gui.plug.report import MenuReportOptions
|
||||
from gen.plug.docgen import (FontStyle, ParagraphStyle,
|
||||
FONT_SANS_SERIF, PARA_ALIGN_CENTER)
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#
|
||||
# Copyright (C) 2000-2006 Donald N. Allingham
|
||||
# Copyright (C) 2008 Brian G. Matherly
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
#
|
||||
# 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
|
||||
@@ -39,7 +40,9 @@ from gen.ggettext import gettext as _
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
import gen.lib
|
||||
from ReportBase import Report, ReportUtils, MenuReportOptions
|
||||
from gen.plug.report import Report
|
||||
from gen.plug.report import utils as ReportUtils
|
||||
from gui.plug.report import MenuReportOptions
|
||||
from gen.plug.docgen import (IndexMark, FontStyle, ParagraphStyle,
|
||||
FONT_SANS_SERIF, INDEX_TYPE_TOC, PARA_ALIGN_CENTER)
|
||||
from Utils import media_path_full
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#
|
||||
# Copyright (C) 2000-2007 Donald N. Allingham
|
||||
# Copyright (C) 2008 Brian G. Matherly
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
#
|
||||
# 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
|
||||
@@ -30,8 +31,6 @@
|
||||
#-------------------------------------------------------------------------
|
||||
import gobject
|
||||
import gtk
|
||||
import cPickle
|
||||
from bsddb.db import DB_CURRENT
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@@ -42,10 +41,9 @@ import const
|
||||
from gui.utils import ProgressMeter
|
||||
import GrampsDisplay
|
||||
import ManagedWindow
|
||||
from gen.lib import Person
|
||||
|
||||
from QuestionDialog import OkDialog
|
||||
from PluginUtils import Tool
|
||||
from gui.plug import tool
|
||||
from gen.ggettext import sgettext as _
|
||||
from glade import Glade
|
||||
|
||||
@@ -70,7 +68,7 @@ WIKI_HELP_SEC = _('manual|Fix_Capitalization_of_Family_Names...')
|
||||
# ChangeNames
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class ChangeNames(Tool.BatchTool, ManagedWindow.ManagedWindow):
|
||||
class ChangeNames(tool.BatchTool, ManagedWindow.ManagedWindow):
|
||||
|
||||
def __init__(self, dbstate, uistate, options_class, name, callback=None):
|
||||
self.label = _('Capitalization changes')
|
||||
@@ -79,7 +77,7 @@ class ChangeNames(Tool.BatchTool, ManagedWindow.ManagedWindow):
|
||||
ManagedWindow.ManagedWindow.__init__(self,uistate,[],self.__class__)
|
||||
self.set_window(gtk.Window(),gtk.Label(),'')
|
||||
|
||||
Tool.BatchTool.__init__(self, dbstate, options_class, name)
|
||||
tool.BatchTool.__init__(self, dbstate, options_class, name)
|
||||
if self.fail:
|
||||
return
|
||||
|
||||
@@ -268,10 +266,10 @@ class ChangeNames(Tool.BatchTool, ManagedWindow.ManagedWindow):
|
||||
#
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
class ChangeNamesOptions(Tool.ToolOptions):
|
||||
class ChangeNamesOptions(tool.ToolOptions):
|
||||
"""
|
||||
Defines options and provides handling interface.
|
||||
"""
|
||||
|
||||
def __init__(self, name,person_id=None):
|
||||
Tool.ToolOptions.__init__(self, name,person_id)
|
||||
tool.ToolOptions.__init__(self, name,person_id)
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#
|
||||
# Copyright (C) 2000-2006 Donald N. Allingham
|
||||
# Copyright (C) 2008 Brian G. Matherly
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
#
|
||||
# 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
|
||||
@@ -42,7 +43,7 @@ import ManagedWindow
|
||||
import AutoComp
|
||||
from gen.lib import EventType
|
||||
from QuestionDialog import OkDialog
|
||||
from PluginUtils import Tool
|
||||
from gui.plug import tool
|
||||
from glade import Glade
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
@@ -50,11 +51,11 @@ from glade import Glade
|
||||
# ChangeTypes class
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class ChangeTypes(Tool.BatchTool, ManagedWindow.ManagedWindow):
|
||||
class ChangeTypes(tool.BatchTool, ManagedWindow.ManagedWindow):
|
||||
|
||||
def __init__(self, dbstate, uistate, options_class, name, callback=None):
|
||||
|
||||
Tool.BatchTool.__init__(self, dbstate, options_class, name)
|
||||
tool.BatchTool.__init__(self, dbstate, options_class, name)
|
||||
if self.fail:
|
||||
return
|
||||
|
||||
@@ -162,13 +163,13 @@ class ChangeTypes(Tool.BatchTool, ManagedWindow.ManagedWindow):
|
||||
#
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
class ChangeTypesOptions(Tool.ToolOptions):
|
||||
class ChangeTypesOptions(tool.ToolOptions):
|
||||
"""
|
||||
Defines options and provides handling interface.
|
||||
"""
|
||||
|
||||
def __init__(self, name,person_id=None):
|
||||
Tool.ToolOptions.__init__(self, name,person_id)
|
||||
tool.ToolOptions.__init__(self, name,person_id)
|
||||
|
||||
# Options specific for this report
|
||||
self.options_dict = {
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#
|
||||
# Copyright (C) 2000-2007 Donald N. Allingham
|
||||
# Copyright (C) 2008 Brian G. Matherly
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
#
|
||||
# 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
|
||||
@@ -60,7 +61,7 @@ import Utils
|
||||
from gui.utils import ProgressMeter
|
||||
import ManagedWindow
|
||||
|
||||
from PluginUtils import Tool
|
||||
from gui.plug import tool
|
||||
from QuestionDialog import OkDialog, MissingMediaDialog
|
||||
from gen.display.name import displayer as _nd
|
||||
from glade import Glade
|
||||
@@ -145,10 +146,10 @@ def _table_low_level(db,table):
|
||||
# runTool
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class Check(Tool.BatchTool):
|
||||
class Check(tool.BatchTool):
|
||||
def __init__(self, dbstate, uistate, options_class, name, callback=None):
|
||||
|
||||
Tool.BatchTool.__init__(self, dbstate, options_class, name)
|
||||
tool.BatchTool.__init__(self, dbstate, options_class, name)
|
||||
if self.fail:
|
||||
return
|
||||
|
||||
@@ -1653,10 +1654,10 @@ class Report(ManagedWindow.ManagedWindow):
|
||||
#
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
class CheckOptions(Tool.ToolOptions):
|
||||
class CheckOptions(tool.ToolOptions):
|
||||
"""
|
||||
Defines options and provides handling interface.
|
||||
"""
|
||||
|
||||
def __init__(self, name, person_id=None):
|
||||
Tool.ToolOptions.__init__(self, name, person_id)
|
||||
tool.ToolOptions.__init__(self, name, person_id)
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#
|
||||
# Copyright (C) 2000-2006 Martin Hawlisch, Donald N. Allingham
|
||||
# Copyright (C) 2008 Brian G. Matherly
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
#
|
||||
# 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
|
||||
@@ -43,7 +44,7 @@ from gen.ggettext import gettext as _
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
import gen.lib
|
||||
from PluginUtils import Tool
|
||||
from gui.plug import tool
|
||||
from gui.utils import ProgressMeter
|
||||
from QuestionDialog import QuestionDialog
|
||||
from DateHandler import parser as _dp
|
||||
@@ -54,11 +55,11 @@ from DateHandler import displayer as _dd
|
||||
#
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class DateParserDisplayTest(Tool.Tool):
|
||||
class DateParserDisplayTest(tool.Tool):
|
||||
|
||||
def __init__(self, dbstate, uistate, options_class, name, callback=None):
|
||||
|
||||
Tool.Tool.__init__(self, dbstate, options_class, name)
|
||||
tool.Tool.__init__(self, dbstate, options_class, name)
|
||||
if uistate:
|
||||
# Running with gui -> Show message
|
||||
QuestionDialog(_("Start date test?"),_("This test will create many persons and events in the current database. Do you really want to run this test?"),_("Run test"),self.run_tool)
|
||||
@@ -227,10 +228,10 @@ class DateParserDisplayTest(Tool.Tool):
|
||||
# DateParserDisplayTestOptions
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
class DateParserDisplayTestOptions(Tool.ToolOptions):
|
||||
class DateParserDisplayTestOptions(tool.ToolOptions):
|
||||
"""
|
||||
Defines options and provides handling interface.
|
||||
"""
|
||||
def __init__(self, name, person_id=None):
|
||||
""" Initialize the options class """
|
||||
Tool.ToolOptions.__init__(self, name, person_id)
|
||||
tool.ToolOptions.__init__(self, name, person_id)
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#
|
||||
# Copyright (C) 2000-2007 Donald N. Allingham
|
||||
# Copyright (C) 2008 Brian G. Matherly
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
#
|
||||
# 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
|
||||
@@ -37,7 +38,7 @@ import gtk
|
||||
#------------------------------------------------------------------------
|
||||
import const
|
||||
from gen.display.name import displayer as name_displayer
|
||||
from PluginUtils import Tool
|
||||
from gui.plug import tool
|
||||
import GrampsDisplay
|
||||
import ManagedWindow
|
||||
from gen.ggettext import sgettext as _
|
||||
@@ -52,11 +53,11 @@ from gui.editors import EditPerson
|
||||
WIKI_HELP_PAGE = '%s_-_Tools' % const.URL_MANUAL_PAGE
|
||||
WIKI_HELP_SEC = _('manual|Interactive_Descendant_Browser...')
|
||||
|
||||
class DesBrowse(Tool.ActivePersonTool, ManagedWindow.ManagedWindow):
|
||||
class DesBrowse(tool.ActivePersonTool, ManagedWindow.ManagedWindow):
|
||||
|
||||
def __init__(self, dbstate, uistate, options_class, name, callback=None):
|
||||
|
||||
Tool.ActivePersonTool.__init__(self, dbstate, uistate, options_class,
|
||||
tool.ActivePersonTool.__init__(self, dbstate, uistate, options_class,
|
||||
name)
|
||||
if self.fail:
|
||||
return
|
||||
@@ -135,10 +136,10 @@ class DesBrowse(Tool.ActivePersonTool, ManagedWindow.ManagedWindow):
|
||||
#
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
class DesBrowseOptions(Tool.ToolOptions):
|
||||
class DesBrowseOptions(tool.ToolOptions):
|
||||
"""
|
||||
Defines options and provides handling interface.
|
||||
"""
|
||||
|
||||
def __init__(self, name,person_id=None):
|
||||
Tool.ToolOptions.__init__(self, name,person_id)
|
||||
tool.ToolOptions.__init__(self, name,person_id)
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#
|
||||
# Copyright (C) 2000-2006 Martin Hawlisch, Donald N. Allingham
|
||||
# Copyright (C) 2008 Brian G. Matherly
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
#
|
||||
# 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
|
||||
@@ -30,7 +31,8 @@ import gtk
|
||||
import ListModel
|
||||
import ManagedWindow
|
||||
|
||||
from PluginUtils import Tool
|
||||
from gui.plug import tool
|
||||
|
||||
_GENDER = [ _(u'female'), _(u'male'), _(u'unknown') ]
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
@@ -38,11 +40,11 @@ _GENDER = [ _(u'female'), _(u'male'), _(u'unknown') ]
|
||||
#
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class DumpGenderStats(Tool.Tool, ManagedWindow.ManagedWindow):
|
||||
class DumpGenderStats(tool.Tool, ManagedWindow.ManagedWindow):
|
||||
|
||||
def __init__(self, dbstate, uistate, options_class, name, callback=None):
|
||||
self.label = _("Gender Statistics tool")
|
||||
Tool.Tool.__init__(self, dbstate, options_class, name)
|
||||
tool.Tool.__init__(self, dbstate, options_class, name)
|
||||
if uistate:
|
||||
ManagedWindow.ManagedWindow.__init__(self,uistate,[],
|
||||
self.__class__)
|
||||
@@ -92,10 +94,10 @@ class DumpGenderStats(Tool.Tool, ManagedWindow.ManagedWindow):
|
||||
#
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
class DumpGenderStatsOptions(Tool.ToolOptions):
|
||||
class DumpGenderStatsOptions(tool.ToolOptions):
|
||||
"""
|
||||
Defines options and provides handling interface.
|
||||
"""
|
||||
|
||||
def __init__(self, name,person_id=None):
|
||||
Tool.ToolOptions.__init__(self, name,person_id)
|
||||
tool.ToolOptions.__init__(self, name,person_id)
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#
|
||||
# Copyright (C) 2003-2006 Donald N. Allingham
|
||||
# Copyright (C) 2008 Brian G. Matherly
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
#
|
||||
# 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
|
||||
@@ -39,7 +40,7 @@ import traceback
|
||||
# GRAMPS modules
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
from PluginUtils import Tool
|
||||
from gen.plug import tool
|
||||
import ManagedWindow
|
||||
from glade import Glade
|
||||
|
||||
@@ -48,11 +49,11 @@ from glade import Glade
|
||||
# Actual tool
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class Eval(Tool.Tool,ManagedWindow.ManagedWindow):
|
||||
class Eval(tool.Tool,ManagedWindow.ManagedWindow):
|
||||
def __init__(self,dbstate, uistate, options_class, name, callback=None):
|
||||
self.title = _("Python evaluation window")
|
||||
|
||||
Tool.Tool.__init__(self,dbstate, options_class, name)
|
||||
tool.Tool.__init__(self,dbstate, options_class, name)
|
||||
ManagedWindow.ManagedWindow.__init__(self,uistate,[],self.__class__)
|
||||
|
||||
self.glade = Glade()
|
||||
@@ -103,10 +104,10 @@ class Eval(Tool.Tool,ManagedWindow.ManagedWindow):
|
||||
#
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
class EvalOptions(Tool.ToolOptions):
|
||||
class EvalOptions(tool.ToolOptions):
|
||||
"""
|
||||
Defines options and provides handling interface.
|
||||
"""
|
||||
|
||||
def __init__(self, name,person_id=None):
|
||||
Tool.ToolOptions.__init__(self, name,person_id)
|
||||
tool.ToolOptions.__init__(self, name,person_id)
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#
|
||||
# Copyright (C) 2000-2006 Donald N. Allingham
|
||||
# Copyright (C) 2008 Brian G. Matherly
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
#
|
||||
# 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
|
||||
@@ -52,8 +53,8 @@ import const
|
||||
import Errors
|
||||
import DateHandler
|
||||
from QuestionDialog import WarningDialog
|
||||
from PluginUtils import Tool
|
||||
from ReportBase import ReportUtils
|
||||
from gui.plug import tool
|
||||
from gen.plug.report import utils as ReportUtils
|
||||
import GrampsDisplay
|
||||
import ManagedWindow
|
||||
from gen.ggettext import sgettext as _
|
||||
@@ -113,12 +114,12 @@ class TableReport(object):
|
||||
#
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
class EventComparison(Tool.Tool,ManagedWindow.ManagedWindow):
|
||||
class EventComparison(tool.Tool,ManagedWindow.ManagedWindow):
|
||||
def __init__(self, dbstate, uistate, options_class, name, callback=None):
|
||||
self.dbstate = dbstate
|
||||
self.uistate = uistate
|
||||
|
||||
Tool.Tool.__init__(self,dbstate, options_class, name)
|
||||
tool.Tool.__init__(self,dbstate, options_class, name)
|
||||
ManagedWindow.ManagedWindow.__init__(self, uistate, [], self)
|
||||
self.qual = 0
|
||||
|
||||
@@ -426,13 +427,13 @@ class DisplayChart(ManagedWindow.ManagedWindow):
|
||||
#
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
class EventComparisonOptions(Tool.ToolOptions):
|
||||
class EventComparisonOptions(tool.ToolOptions):
|
||||
"""
|
||||
Defines options and provides handling interface.
|
||||
"""
|
||||
|
||||
def __init__(self, name,person_id=None):
|
||||
Tool.ToolOptions.__init__(self, name,person_id)
|
||||
tool.ToolOptions.__init__(self, name,person_id)
|
||||
|
||||
# Options specific for this report
|
||||
self.options_dict = {
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#
|
||||
# Copyright (C) 2000-2007 Donald N. Allingham
|
||||
# Copyright (C) 2008 Brian G. Matherly
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
#
|
||||
# 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
|
||||
@@ -46,7 +47,7 @@ import ManagedWindow
|
||||
import gen.lib
|
||||
import Utils
|
||||
|
||||
from PluginUtils import Tool
|
||||
from gui.plug import tool
|
||||
from gen.display.name import displayer as name_displayer
|
||||
from QuestionDialog import OkDialog
|
||||
|
||||
@@ -55,7 +56,7 @@ from QuestionDialog import OkDialog
|
||||
# EventNames
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class EventNames(Tool.BatchTool, ManagedWindow.ManagedWindow):
|
||||
class EventNames(tool.BatchTool, ManagedWindow.ManagedWindow):
|
||||
"""
|
||||
Look for events that do not have a description, and build the description
|
||||
from the item that contains it.
|
||||
@@ -66,7 +67,7 @@ class EventNames(Tool.BatchTool, ManagedWindow.ManagedWindow):
|
||||
"""
|
||||
|
||||
def __init__(self, dbstate, uistate, options_class, name, callback=None):
|
||||
Tool.BatchTool.__init__(self, dbstate, options_class, name)
|
||||
tool.BatchTool.__init__(self, dbstate, options_class, name)
|
||||
|
||||
if not self.fail:
|
||||
uistate.set_busy_cursor(True)
|
||||
@@ -152,10 +153,10 @@ def family_event_name(event, family, dbase):
|
||||
#
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
class EventNamesOptions(Tool.ToolOptions):
|
||||
class EventNamesOptions(tool.ToolOptions):
|
||||
"""
|
||||
Define options and provides handling interface.
|
||||
"""
|
||||
|
||||
def __init__(self, name, person_id=None):
|
||||
Tool.ToolOptions.__init__(self, name, person_id)
|
||||
tool.ToolOptions.__init__(self, name, person_id)
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#
|
||||
# Copyright (C) 2000-2007 Donald N. Allingham
|
||||
# Copyright (C) 2008 Brian G. Matherly
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
#
|
||||
# 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
|
||||
@@ -48,7 +49,7 @@ import gobject
|
||||
import ManagedWindow
|
||||
import GrampsDisplay
|
||||
|
||||
from PluginUtils import Tool
|
||||
from gui.plug import tool
|
||||
from gui.utils import ProgressMeter
|
||||
from glade import Glade
|
||||
|
||||
@@ -392,7 +393,7 @@ COLS = [
|
||||
# ExtractCity
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class ExtractCity(Tool.BatchTool, ManagedWindow.ManagedWindow):
|
||||
class ExtractCity(tool.BatchTool, ManagedWindow.ManagedWindow):
|
||||
"""
|
||||
Extracts city, state, and zip code information from an place description
|
||||
if the title is empty and the description falls into the category of:
|
||||
@@ -415,7 +416,7 @@ class ExtractCity(Tool.BatchTool, ManagedWindow.ManagedWindow):
|
||||
ManagedWindow.ManagedWindow.__init__(self, uistate, [], self.__class__)
|
||||
self.set_window(gtk.Window(), gtk.Label(), '')
|
||||
|
||||
Tool.BatchTool.__init__(self, dbstate, options_class, name)
|
||||
tool.BatchTool.__init__(self, dbstate, options_class, name)
|
||||
|
||||
if not self.fail:
|
||||
uistate.set_busy_cursor(True)
|
||||
@@ -620,9 +621,9 @@ class ExtractCity(Tool.BatchTool, ManagedWindow.ManagedWindow):
|
||||
#
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
class ExtractCityOptions(Tool.ToolOptions):
|
||||
class ExtractCityOptions(tool.ToolOptions):
|
||||
"""
|
||||
Defines options and provides handling interface.
|
||||
"""
|
||||
def __init__(self, name, person_id=None):
|
||||
Tool.ToolOptions.__init__(self, name, person_id)
|
||||
tool.ToolOptions.__init__(self, name, person_id)
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#
|
||||
# Copyright (C) 2000-2007 Donald N. Allingham
|
||||
# Copyright (C) 2008 Brian G. Matherly
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
#
|
||||
# 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
|
||||
@@ -38,6 +39,7 @@ import gtk
|
||||
import const
|
||||
import gen.lib
|
||||
from gui.utils import ProgressMeter
|
||||
from gui.plug import tool
|
||||
import soundex
|
||||
from gen.display.name import displayer as name_displayer
|
||||
from QuestionDialog import OkDialog
|
||||
@@ -46,7 +48,6 @@ import Errors
|
||||
from Merge import PersonCompare
|
||||
import GrampsDisplay
|
||||
import ManagedWindow
|
||||
from PluginUtils import Tool
|
||||
from QuestionDialog import RunDatabaseRepair
|
||||
from gen.ggettext import sgettext as _
|
||||
from glade import Glade
|
||||
@@ -84,11 +85,11 @@ def is_initial(name):
|
||||
# The Actual tool.
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class Merge(Tool.Tool,ManagedWindow.ManagedWindow):
|
||||
class Merge(tool.Tool,ManagedWindow.ManagedWindow):
|
||||
|
||||
def __init__(self, dbstate, uistate, options_class, name, callback=None):
|
||||
|
||||
Tool.Tool.__init__(self, dbstate, options_class, name)
|
||||
tool.Tool.__init__(self, dbstate, options_class, name)
|
||||
ManagedWindow.ManagedWindow.__init__(self, uistate, [],
|
||||
self.__class__)
|
||||
self.dbstate = dbstate
|
||||
@@ -646,13 +647,13 @@ def by_id(p1,p2):
|
||||
#
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
class MergeOptions(Tool.ToolOptions):
|
||||
class MergeOptions(tool.ToolOptions):
|
||||
"""
|
||||
Defines options and provides handling interface.
|
||||
"""
|
||||
|
||||
def __init__(self, name,person_id=None):
|
||||
Tool.ToolOptions.__init__(self, name,person_id)
|
||||
tool.ToolOptions.__init__(self, name,person_id)
|
||||
|
||||
# Options specific for this report
|
||||
self.options_dict = {
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#
|
||||
# Copyright (C) 2003-2006 Donald N. Allingham
|
||||
# Copyright (C) 2008 Brian G. Matherly
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
#
|
||||
# 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
|
||||
@@ -47,7 +48,7 @@ import gc
|
||||
# GRAMPS modules
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
from PluginUtils import Tool
|
||||
from gen.plug import Tool
|
||||
import ManagedWindow
|
||||
from QuestionDialog import InfoDialog
|
||||
from glade import Glade
|
||||
@@ -57,11 +58,11 @@ from glade import Glade
|
||||
# Actual tool
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class Leak(Tool.Tool,ManagedWindow.ManagedWindow):
|
||||
class Leak(tool.Tool,ManagedWindow.ManagedWindow):
|
||||
def __init__(self,dbstate, uistate, options_class, name, callback=None):
|
||||
self.title = _('Uncollected Objects Tool')
|
||||
|
||||
Tool.Tool.__init__(self,dbstate, options_class, name)
|
||||
tool.Tool.__init__(self,dbstate, options_class, name)
|
||||
ManagedWindow.ManagedWindow.__init__(self,uistate,[],self.__class__)
|
||||
|
||||
self.glade = Glade()
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
# Copyright (C) 2000-2006 Donald N. Allingham
|
||||
# Copyright (C) 2008 B. Malengier
|
||||
# Copyright (C) 2008 Brian G. Matherly
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
#
|
||||
# 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
|
||||
@@ -53,7 +54,7 @@ import Assistant
|
||||
import Errors
|
||||
from gen.lib import MediaObject
|
||||
from gen.updatecallback import UpdateCallback
|
||||
from PluginUtils import Tool
|
||||
from gui.plug import tool
|
||||
from Utils import media_path_full, relative_path, media_path
|
||||
from gen.ggettext import sgettext as _
|
||||
|
||||
@@ -70,11 +71,11 @@ WIKI_HELP_SEC = _('manual|Media_Manager...')
|
||||
# This is an Assistant implementation to guide the user
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class MediaMan(Tool.Tool):
|
||||
class MediaMan(tool.Tool):
|
||||
|
||||
def __init__(self, dbstate, uistate, options_class, name, callback=None):
|
||||
|
||||
Tool.Tool.__init__(self, dbstate, options_class, name)
|
||||
tool.Tool.__init__(self, dbstate, options_class, name)
|
||||
self.uistate = uistate
|
||||
self.callback = uistate.pulse_progressbar
|
||||
|
||||
@@ -560,10 +561,10 @@ class Convert2Rel(BatchOp):
|
||||
#
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
class MediaManOptions(Tool.ToolOptions):
|
||||
class MediaManOptions(tool.ToolOptions):
|
||||
"""
|
||||
Defines options and provides handling interface.
|
||||
"""
|
||||
|
||||
def __init__(self, name,person_id=None):
|
||||
Tool.ToolOptions.__init__(self, name,person_id)
|
||||
tool.ToolOptions.__init__(self, name,person_id)
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#
|
||||
# Copyright (C) 2007-2009 Stephane Charette
|
||||
# Copyright (C) 2008 Brian Matherly
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
#
|
||||
# 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
|
||||
@@ -38,8 +39,8 @@ import gobject
|
||||
#------------------------------------------------------------------------
|
||||
import const
|
||||
from gen.ggettext import ngettext
|
||||
from PluginUtils import Tool
|
||||
from ReportBase import ReportUtils
|
||||
from gui.plug import tool
|
||||
from gen.plug.report import utils as ReportUtils
|
||||
from gui.editors import EditPerson, EditFamily
|
||||
import ManagedWindow
|
||||
from gui.utils import ProgressMeter
|
||||
@@ -60,10 +61,10 @@ WIKI_HELP_SEC = _('manual|Not_Related...')
|
||||
# NotRelated class
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
class NotRelated(Tool.ActivePersonTool, ManagedWindow.ManagedWindow) :
|
||||
class NotRelated(tool.ActivePersonTool, ManagedWindow.ManagedWindow) :
|
||||
|
||||
def __init__(self, dbstate, uistate, options_class, name, callback=None):
|
||||
Tool.ActivePersonTool.__init__(self, dbstate, uistate, options_class,
|
||||
tool.ActivePersonTool.__init__(self, dbstate, uistate, options_class,
|
||||
name)
|
||||
|
||||
if self.fail: # bug #2709 -- fail if we have no active person
|
||||
@@ -424,10 +425,10 @@ class NotRelated(Tool.ActivePersonTool, ManagedWindow.ManagedWindow) :
|
||||
# NotRelatedOptions
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
class NotRelatedOptions(Tool.ToolOptions):
|
||||
class NotRelatedOptions(tool.ToolOptions):
|
||||
"""
|
||||
Defines options and provides handling interface.
|
||||
"""
|
||||
def __init__(self, name, person_id=None):
|
||||
""" Initialize the options class """
|
||||
Tool.ToolOptions.__init__(self, name, person_id)
|
||||
tool.ToolOptions.__init__(self, name, person_id)
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#
|
||||
# Copyright (C) 2000-2007 Donald N. Allingham
|
||||
# Copyright (C) 2008 Brian G. Matherly
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
#
|
||||
# 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
|
||||
@@ -41,7 +42,7 @@ from Utils import get_researcher
|
||||
import GrampsDisplay
|
||||
from gui.widgets import MonitoredEntry
|
||||
import ManagedWindow
|
||||
from PluginUtils import Tool
|
||||
from gui.plug import tool
|
||||
from gen.ggettext import sgettext as _
|
||||
from glade import Glade
|
||||
|
||||
@@ -74,7 +75,7 @@ config_keys = (
|
||||
# OwnerEditor
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class OwnerEditor(Tool.Tool, ManagedWindow.ManagedWindow):
|
||||
class OwnerEditor(tool.Tool, ManagedWindow.ManagedWindow):
|
||||
"""
|
||||
Allow editing database owner information.
|
||||
|
||||
@@ -83,7 +84,7 @@ class OwnerEditor(Tool.Tool, ManagedWindow.ManagedWindow):
|
||||
"""
|
||||
def __init__(self, dbstate, uistate, options_class, name, callback=None):
|
||||
ManagedWindow.ManagedWindow.__init__(self, uistate, [], self.__class__)
|
||||
Tool.Tool.__init__(self, dbstate, options_class, name)
|
||||
tool.Tool.__init__(self, dbstate, options_class, name)
|
||||
|
||||
self.display()
|
||||
|
||||
@@ -172,7 +173,7 @@ class OwnerEditor(Tool.Tool, ManagedWindow.ManagedWindow):
|
||||
# OwnerEditorOptions (None at the moment)
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class OwnerEditorOptions(Tool.ToolOptions):
|
||||
class OwnerEditorOptions(tool.ToolOptions):
|
||||
"""Defines options and provides handling interface."""
|
||||
def __init__(self, name,person_id=None):
|
||||
Tool.ToolOptions.__init__(self, name,person_id)
|
||||
tool.ToolOptions.__init__(self, name,person_id)
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#
|
||||
# Copyright (C) 2000-2006 Donald N. Allingham
|
||||
# Copyright (C) 2008 Brian G. Matherly
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
#
|
||||
# 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
|
||||
@@ -45,7 +46,7 @@ import gobject
|
||||
#-------------------------------------------------------------------------
|
||||
import const
|
||||
from gui.utils import ProgressMeter
|
||||
from PluginUtils import Tool
|
||||
from gui.plug import tool
|
||||
from QuestionDialog import OkDialog
|
||||
import ManagedWindow
|
||||
import GrampsDisplay
|
||||
@@ -99,14 +100,14 @@ _sn_prefix_re = re.compile("^\s*(%s)\s+(.+)" % '|'.join(prefix_list),
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
|
||||
class PatchNames(Tool.BatchTool, ManagedWindow.ManagedWindow):
|
||||
class PatchNames(tool.BatchTool, ManagedWindow.ManagedWindow):
|
||||
|
||||
def __init__(self, dbstate, uistate, options_class, name, callback=None):
|
||||
self.label = _('Name and title extraction tool')
|
||||
ManagedWindow.ManagedWindow.__init__(self, uistate, [], self.__class__)
|
||||
self.set_window(gtk.Window(), gtk.Label(), '')
|
||||
|
||||
Tool.BatchTool.__init__(self, dbstate, options_class, name)
|
||||
tool.BatchTool.__init__(self, dbstate, options_class, name)
|
||||
if self.fail:
|
||||
return
|
||||
|
||||
@@ -351,10 +352,10 @@ class PatchNames(Tool.BatchTool, ManagedWindow.ManagedWindow):
|
||||
self.cb()
|
||||
|
||||
|
||||
class PatchNamesOptions(Tool.ToolOptions):
|
||||
class PatchNamesOptions(tool.ToolOptions):
|
||||
"""
|
||||
Defines options and provides handling interface.
|
||||
"""
|
||||
|
||||
def __init__(self, name, person_id=None):
|
||||
Tool.ToolOptions.__init__(self, name, person_id)
|
||||
tool.ToolOptions.__init__(self, name, person_id)
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#
|
||||
# Copyright (C) 2000-2006 Donald N. Allingham
|
||||
# Copyright (C) 2008 Brian G. Matherly
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
#
|
||||
# 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
|
||||
@@ -49,7 +50,7 @@ log = logging.getLogger(".Rebuild")
|
||||
# GRAMPS modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
from PluginUtils import Tool
|
||||
from gui.plug import tool
|
||||
from QuestionDialog import OkDialog
|
||||
from gen.updatecallback import UpdateCallback
|
||||
|
||||
@@ -58,11 +59,11 @@ from gen.updatecallback import UpdateCallback
|
||||
# runTool
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class Rebuild(Tool.Tool, UpdateCallback):
|
||||
class Rebuild(tool.Tool, UpdateCallback):
|
||||
|
||||
def __init__(self, dbstate, uistate, options_class, name, callback=None):
|
||||
|
||||
Tool.Tool.__init__(self, dbstate, options_class, name)
|
||||
tool.Tool.__init__(self, dbstate, options_class, name)
|
||||
|
||||
if self.db.readonly:
|
||||
return
|
||||
@@ -97,10 +98,10 @@ class Rebuild(Tool.Tool, UpdateCallback):
|
||||
#
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
class RebuildOptions(Tool.ToolOptions):
|
||||
class RebuildOptions(tool.ToolOptions):
|
||||
"""
|
||||
Defines options and provides handling interface.
|
||||
"""
|
||||
|
||||
def __init__(self, name,person_id=None):
|
||||
Tool.ToolOptions.__init__(self, name,person_id)
|
||||
tool.ToolOptions.__init__(self, name,person_id)
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#
|
||||
# Copyright (C) 2000-2006 Donald N. Allingham
|
||||
# Copyright (C) 2008 Brian G. Matherly
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
#
|
||||
# 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
|
||||
@@ -51,7 +52,7 @@ log = logging.getLogger(".RebuildRefMap")
|
||||
# GRAMPS modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
from PluginUtils import Tool
|
||||
from gui.plug import tool
|
||||
from QuestionDialog import OkDialog
|
||||
from gen.updatecallback import UpdateCallback
|
||||
|
||||
@@ -60,11 +61,11 @@ from gen.updatecallback import UpdateCallback
|
||||
# runTool
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class RebuildRefMap(Tool.Tool, UpdateCallback):
|
||||
class RebuildRefMap(tool.Tool, UpdateCallback):
|
||||
|
||||
def __init__(self, dbstate, uistate, options_class, name, callback=None):
|
||||
|
||||
Tool.Tool.__init__(self, dbstate, options_class, name)
|
||||
tool.Tool.__init__(self, dbstate, options_class, name)
|
||||
|
||||
if self.db.readonly:
|
||||
return
|
||||
@@ -99,10 +100,10 @@ class RebuildRefMap(Tool.Tool, UpdateCallback):
|
||||
#
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
class RebuildRefMapOptions(Tool.ToolOptions):
|
||||
class RebuildRefMapOptions(tool.ToolOptions):
|
||||
"""
|
||||
Defines options and provides handling interface.
|
||||
"""
|
||||
|
||||
def __init__(self, name,person_id=None):
|
||||
Tool.ToolOptions.__init__(self, name,person_id)
|
||||
tool.ToolOptions.__init__(self, name,person_id)
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
# Copyright (C) 2000-2007 Donald N. Allingham
|
||||
# Copyright (C) 2008 Brian G. Matherly
|
||||
# Copyright (C) 2010 Gary Burton
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
#
|
||||
# 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
|
||||
@@ -50,7 +51,7 @@ from libpersonview import BasePersonView
|
||||
import Relationship
|
||||
|
||||
from QuestionDialog import ErrorDialog
|
||||
from PluginUtils import Tool
|
||||
from gui.plug import tool
|
||||
from glade import Glade
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
@@ -66,14 +67,14 @@ column_names = BasePersonView.COLUMN_NAMES
|
||||
#
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class RelCalc(Tool.Tool, ManagedWindow.ManagedWindow):
|
||||
class RelCalc(tool.Tool, ManagedWindow.ManagedWindow):
|
||||
|
||||
def __init__(self, dbstate, uistate, options_class, name, callback=None):
|
||||
"""
|
||||
Relationship calculator class.
|
||||
"""
|
||||
|
||||
Tool.Tool.__init__(self, dbstate, options_class, name)
|
||||
tool.Tool.__init__(self, dbstate, options_class, name)
|
||||
ManagedWindow.ManagedWindow.__init__(self,uistate,[],self.__class__)
|
||||
|
||||
#set the columns to see
|
||||
@@ -248,10 +249,10 @@ class RelCalc(Tool.Tool, ManagedWindow.ManagedWindow):
|
||||
#
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
class RelCalcOptions(Tool.ToolOptions):
|
||||
class RelCalcOptions(tool.ToolOptions):
|
||||
"""
|
||||
Defines options and provides handling interface.
|
||||
"""
|
||||
|
||||
def __init__(self, name,person_id=None):
|
||||
Tool.ToolOptions.__init__(self, name,person_id)
|
||||
tool.ToolOptions.__init__(self, name,person_id)
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
# Copyright (C) 2000-2007 Donald N. Allingham
|
||||
# Copyright (C) 2008 Brian G. Matherly
|
||||
# Copyright (C) 2008 Stephane Charette
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
#
|
||||
# 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
|
||||
@@ -57,7 +58,7 @@ import Errors
|
||||
import ManagedWindow
|
||||
from DateHandler import displayer as _dd
|
||||
from gen.updatecallback import UpdateCallback
|
||||
from PluginUtils import Tool
|
||||
from gui.plug import tool
|
||||
from glade import Glade
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
@@ -65,7 +66,7 @@ from glade import Glade
|
||||
# runTool
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class RemoveUnused(Tool.Tool, ManagedWindow.ManagedWindow, UpdateCallback):
|
||||
class RemoveUnused(tool.Tool, ManagedWindow.ManagedWindow, UpdateCallback):
|
||||
MARK_COL = 0
|
||||
OBJ_ID_COL = 1
|
||||
OBJ_NAME_COL = 2
|
||||
@@ -75,7 +76,7 @@ class RemoveUnused(Tool.Tool, ManagedWindow.ManagedWindow, UpdateCallback):
|
||||
def __init__(self, dbstate, uistate, options_class, name, callback=None):
|
||||
self.title = _('Unused Objects')
|
||||
|
||||
Tool.Tool.__init__(self, dbstate, options_class, name)
|
||||
tool.Tool.__init__(self, dbstate, options_class, name)
|
||||
|
||||
if self.db.readonly:
|
||||
return
|
||||
@@ -436,13 +437,13 @@ class RemoveUnused(Tool.Tool, ManagedWindow.ManagedWindow, UpdateCallback):
|
||||
#
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
class CheckOptions(Tool.ToolOptions):
|
||||
class CheckOptions(tool.ToolOptions):
|
||||
"""
|
||||
Defines options and provides handling interface.
|
||||
"""
|
||||
|
||||
def __init__(self, name, person_id=None):
|
||||
Tool.ToolOptions.__init__(self, name, person_id)
|
||||
tool.ToolOptions.__init__(self, name, person_id)
|
||||
|
||||
# Options specific for this report
|
||||
self.options_dict = {
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#
|
||||
# Copyright (C) 2000-2006 Donald N. Allingham
|
||||
# Copyright (C) 2008 Brian G. Matherly
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
#
|
||||
# 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
|
||||
@@ -41,7 +42,7 @@ from gen.ggettext import gettext as _
|
||||
#------------------------------------------------------------------------
|
||||
from gui.utils import ProgressMeter
|
||||
import gen.lib
|
||||
from PluginUtils import Tool
|
||||
from gui.plug import tool
|
||||
|
||||
_findint = re.compile('^[^\d]*(\d+)[^\d]*')
|
||||
|
||||
@@ -53,9 +54,9 @@ _parseformat = re.compile('.*%(\d+)[^\d]+')
|
||||
# Actual tool
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class ReorderIds(Tool.BatchTool):
|
||||
class ReorderIds(tool.BatchTool):
|
||||
def __init__(self, dbstate, uistate, options_class, name, callback=None):
|
||||
Tool.BatchTool.__init__(self, dbstate, options_class, name)
|
||||
tool.BatchTool.__init__(self, dbstate, options_class, name)
|
||||
if self.fail:
|
||||
return
|
||||
|
||||
@@ -228,10 +229,10 @@ class ReorderIds(Tool.BatchTool):
|
||||
#
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
class ReorderIdsOptions(Tool.ToolOptions):
|
||||
class ReorderIdsOptions(tool.ToolOptions):
|
||||
"""
|
||||
Defines options and provides handling interface.
|
||||
"""
|
||||
|
||||
def __init__(self, name, person_id=None):
|
||||
Tool.ToolOptions.__init__(self, name, person_id)
|
||||
tool.ToolOptions.__init__(self, name, person_id)
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
# Gramps - a GTK+/GNOME based genealogy program
|
||||
#
|
||||
# Copyright (C) 2009 Gary Burton
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
#
|
||||
# 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
|
||||
@@ -36,8 +37,8 @@ from gen.ggettext import gettext as _
|
||||
#-------------------------------------------------------------------------
|
||||
import Sort
|
||||
|
||||
from PluginUtils import Tool, MenuToolOptions, PluginWindows
|
||||
from ReportBase import ReportUtils
|
||||
from gui.plug import MenuToolOptions, PluginWindows
|
||||
from gen.plug.report import utils as ReportUtils
|
||||
from gen.plug.menu import FilterOption, PersonOption, \
|
||||
EnumeratedListOption, BooleanOption
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#
|
||||
# Copyright (C) 2000-2006 Donald N. Allingham
|
||||
# Copyright (C) 2008 Brian G. Matherly
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
#
|
||||
# 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
|
||||
@@ -34,7 +35,7 @@ import GrampsDisplay
|
||||
import ManagedWindow
|
||||
import AutoComp
|
||||
from gen.ggettext import sgettext as _
|
||||
from PluginUtils import Tool
|
||||
from gui.plug import tool
|
||||
from glade import Glade
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
@@ -51,11 +52,11 @@ WIKI_HELP_SEC = _('manual|Generate_SoundEx_codes')
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
class SoundGen(Tool.Tool, ManagedWindow.ManagedWindow):
|
||||
class SoundGen(tool.Tool, ManagedWindow.ManagedWindow):
|
||||
|
||||
def __init__(self, dbstate, uistate, options_class, name, callback=None):
|
||||
self.label = _('SoundEx code generator')
|
||||
Tool.Tool.__init__(self, dbstate, options_class, name)
|
||||
tool.Tool.__init__(self, dbstate, options_class, name)
|
||||
ManagedWindow.ManagedWindow.__init__(self,uistate,[],self.__class__)
|
||||
|
||||
self.glade = Glade()
|
||||
@@ -117,10 +118,10 @@ class SoundGen(Tool.Tool, ManagedWindow.ManagedWindow):
|
||||
#
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
class SoundGenOptions(Tool.ToolOptions):
|
||||
class SoundGenOptions(tool.ToolOptions):
|
||||
"""
|
||||
Defines options and provides handling interface.
|
||||
"""
|
||||
|
||||
def __init__(self, name,person_id=None):
|
||||
Tool.ToolOptions.__init__(self, name,person_id)
|
||||
tool.ToolOptions.__init__(self, name,person_id)
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#
|
||||
# Copyright (C) 2000-2006 Martin Hawlisch, Donald N. Allingham
|
||||
# Copyright (C) 2008 Brian G. Matherly
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
#
|
||||
# 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
|
||||
@@ -45,7 +46,7 @@ import gtk
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
import gen.lib
|
||||
from PluginUtils import Tool
|
||||
from gui.plug import tool
|
||||
import Utils
|
||||
import LdsUtils
|
||||
|
||||
@@ -54,7 +55,7 @@ import LdsUtils
|
||||
#
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class TestcaseGenerator(Tool.BatchTool):
|
||||
class TestcaseGenerator(tool.BatchTool):
|
||||
NUMERIC = 0
|
||||
FIRSTNAME = 1
|
||||
FIRSTNAME_FEMALE = 2
|
||||
@@ -68,7 +69,7 @@ class TestcaseGenerator(Tool.BatchTool):
|
||||
if dbstate.db.readonly:
|
||||
return
|
||||
|
||||
Tool.BatchTool.__init__(self, dbstate, options_class, name)
|
||||
tool.BatchTool.__init__(self, dbstate, options_class, name)
|
||||
|
||||
if self.fail:
|
||||
return
|
||||
@@ -1333,13 +1334,13 @@ class TestcaseGenerator(Tool.BatchTool):
|
||||
#
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
class TestcaseGeneratorOptions(Tool.ToolOptions):
|
||||
class TestcaseGeneratorOptions(tool.ToolOptions):
|
||||
"""
|
||||
Defines options and provides handling interface.
|
||||
"""
|
||||
|
||||
def __init__(self, name,person_id=None):
|
||||
Tool.ToolOptions.__init__(self, name,person_id)
|
||||
tool.ToolOptions.__init__(self, name,person_id)
|
||||
|
||||
# Options specific for this report
|
||||
self.options_dict = {
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#
|
||||
# Copyright (C) 2000-2007 Donald N. Allingham
|
||||
# Copyright (C) 2008 Brian G. Matherly
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
#
|
||||
# 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
|
||||
@@ -59,7 +60,7 @@ import Utils
|
||||
import GrampsDisplay
|
||||
from ManagedWindow import ManagedWindow
|
||||
from gen.updatecallback import UpdateCallback
|
||||
from PluginUtils import Tool
|
||||
from gui.plug import tool
|
||||
from gen.ggettext import sgettext as _
|
||||
from glade import Glade
|
||||
|
||||
@@ -222,11 +223,11 @@ def get_marriage_date(db,family):
|
||||
# Actual tool
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class Verify(Tool.Tool, ManagedWindow, UpdateCallback):
|
||||
class Verify(tool.Tool, ManagedWindow, UpdateCallback):
|
||||
|
||||
def __init__(self, dbstate, uistate, options_class, name, callback=None):
|
||||
self.label = _('Database Verify tool')
|
||||
Tool.Tool.__init__(self, dbstate, options_class, name)
|
||||
tool.Tool.__init__(self, dbstate, options_class, name)
|
||||
ManagedWindow.__init__(self, uistate,[], self.__class__)
|
||||
UpdateCallback.__init__(self, self.uistate.pulse_progressbar)
|
||||
|
||||
@@ -659,13 +660,13 @@ class VerifyResults(ManagedWindow):
|
||||
#
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
class VerifyOptions(Tool.ToolOptions):
|
||||
class VerifyOptions(tool.ToolOptions):
|
||||
"""
|
||||
Defines options and provides handling interface.
|
||||
"""
|
||||
|
||||
def __init__(self, name,person_id=None):
|
||||
Tool.ToolOptions.__init__(self, name,person_id)
|
||||
tool.ToolOptions.__init__(self, name,person_id)
|
||||
|
||||
# Options specific for this report
|
||||
self.options_dict = {
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
# Copyright (C) 2008 Jason M. Simanek <jason@bohemianalps.com>
|
||||
# Copyright (C) 2008-2010 Rob G. Healey <robhealey1@gmail.com>
|
||||
# Copyright (C) 2010 Doug Blank <doug.blank@gmail.com>
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
#
|
||||
# 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
|
||||
@@ -77,8 +78,10 @@ import Sort
|
||||
from gen.plug.menu import PersonOption, NumberOption, StringOption, \
|
||||
BooleanOption, EnumeratedListOption, FilterOption, \
|
||||
NoteOption, MediaOption, DestinationOption
|
||||
from ReportBase import (Report, ReportUtils, MenuReportOptions,
|
||||
Bibliography, CSS_FILES )
|
||||
from gen.plug.report import ( Report, Bibliography, CSS_FILES )
|
||||
from gen.plug.report import utils as ReportUtils
|
||||
from gui.plug.report import MenuReportOptions
|
||||
|
||||
import Utils
|
||||
import constfunc
|
||||
from gui.utils import ProgressMeter
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
# Copyright (C) 2007-2009 Brian G. Matherly
|
||||
# Copyright (C) 2008-2010 Rob G. Healey <robhealey1@gmail.com>
|
||||
# Copyright (C) 2008 Jason Simanek
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
#
|
||||
# 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
|
||||
@@ -51,7 +52,9 @@ log = logging.getLogger(".WebPage")
|
||||
import gen.lib
|
||||
import const
|
||||
import constfunc
|
||||
from ReportBase import Report, ReportUtils, MenuReportOptions, CSS_FILES
|
||||
from gen.plug.report import Report, CSS_FILES
|
||||
from gen.plug.report import utils as ReportUtils
|
||||
from gui.plug.report import MenuReportOptions
|
||||
from gen.plug.menu import BooleanOption, NumberOption, StringOption, \
|
||||
EnumeratedListOption, FilterOption, PersonOption, \
|
||||
DestinationOption, NoteOption
|
||||
|
||||
Reference in New Issue
Block a user