0003796: Make export available when no GUI available. Patch from jmodule (Jakim Friant).

svn: r15294
This commit is contained in:
Brian Matherly
2010-05-01 04:12:42 +00:00
parent 356f23ac98
commit df32be43de
137 changed files with 29439 additions and 9737 deletions

View File

@@ -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)

View File

@@ -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 = {

View File

@@ -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)

View File

@@ -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)

View File

@@ -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)

View File

@@ -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)

View File

@@ -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)

View File

@@ -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 = {

View File

@@ -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)

View File

@@ -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)

View File

@@ -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 = {

View File

@@ -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()

View File

@@ -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)

View File

@@ -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)

View File

@@ -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)

View File

@@ -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)

View File

@@ -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)

View File

@@ -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)

View File

@@ -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)

View File

@@ -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 = {

View File

@@ -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)

View File

@@ -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

View File

@@ -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)

View File

@@ -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 = {

View File

@@ -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 = {