* src/docgen/KwordDoc.py: Remove unused latin_utf8 import.
* src/plugins/FilterEditor.py: Convert to new API. * src/plugins/DesBrowse.py: Convert to new API. svn: r5258
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2005-09-30 Alex Roitman <shura@gramps-project.org>
|
||||||
|
* src/docgen/KwordDoc.py: Remove unused latin_utf8 import.
|
||||||
|
* src/plugins/FilterEditor.py: Convert to new API.
|
||||||
|
* src/plugins/DesBrowse.py: Convert to new API.
|
||||||
|
|
||||||
2005-09-29 Don Allingham <don@gramps-project.org>
|
2005-09-29 Don Allingham <don@gramps-project.org>
|
||||||
* src/docgen/AbiWord2Doc.py: fix latin encoding issues
|
* src/docgen/AbiWord2Doc.py: fix latin encoding issues
|
||||||
* src/docgen/KwordDoc.py: fix latin encoding issues
|
* src/docgen/KwordDoc.py: fix latin encoding issues
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
# $Id$
|
# $Id$
|
||||||
|
|
||||||
import BaseDoc
|
import BaseDoc
|
||||||
from latin_utf8 import latin_to_utf8
|
|
||||||
|
|
||||||
import time
|
import time
|
||||||
import cStringIO
|
import cStringIO
|
||||||
|
@ -37,6 +37,7 @@ from gettext import gettext as _
|
|||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
import Utils
|
import Utils
|
||||||
import NameDisplay
|
import NameDisplay
|
||||||
|
import Tool
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -53,17 +54,12 @@ from gnome import help_display
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
def runTool(database,person,callback,parent=None):
|
class DesBrowse(Tool.Tool):
|
||||||
try:
|
|
||||||
DesBrowse(database,person,callback,parent)
|
def __init__(self,db,person,options_class,name,callback=None,parent=None):
|
||||||
except:
|
Tool.Tool.__init__(self,db,person,options_class,name)
|
||||||
import DisplayTrace
|
|
||||||
DisplayTrace.DisplayTrace()
|
|
||||||
|
|
||||||
class DesBrowse:
|
|
||||||
def __init__(self,database,person,callback,parent):
|
|
||||||
self.active = person
|
self.active = person
|
||||||
self.db = database
|
|
||||||
self.callback = callback
|
self.callback = callback
|
||||||
self.parent = parent
|
self.parent = parent
|
||||||
self.win_key = self
|
self.win_key = self
|
||||||
@ -153,6 +149,19 @@ class DesBrowse:
|
|||||||
self.callback(epo,val)
|
self.callback(epo,val)
|
||||||
self.make_new_model()
|
self.make_new_model()
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
class DesBrowseOptions(Tool.ToolOptions):
|
||||||
|
"""
|
||||||
|
Defines options and provides handling interface.
|
||||||
|
"""
|
||||||
|
|
||||||
|
def __init__(self,name,person_id=None):
|
||||||
|
Tool.ToolOptions.__init__(self,name,person_id)
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
@ -161,10 +170,13 @@ class DesBrowse:
|
|||||||
from PluginMgr import register_tool
|
from PluginMgr import register_tool
|
||||||
|
|
||||||
register_tool(
|
register_tool(
|
||||||
runTool,
|
name = 'dbrowse',
|
||||||
_("Interactive descendant browser"),
|
category = Tool.TOOL_ANAL,
|
||||||
category=_("Analysis and Exploration"),
|
tool_class = DesBrowse,
|
||||||
|
options_class = DesBrowseOptions,
|
||||||
|
modes = Tool.MODE_GUI,
|
||||||
|
translated_name = _("Interactive descendant browser"),
|
||||||
|
author_name = "Donald N. Allingham",
|
||||||
|
author_email = "dallingham@users.sourceforge.net",
|
||||||
description=_("Provides a browsable hierarchy based on the active person"),
|
description=_("Provides a browsable hierarchy based on the active person"),
|
||||||
author_name="Donald N. Allingham",
|
|
||||||
author_email="dallingham@users.sourceforge.net"
|
|
||||||
)
|
)
|
||||||
|
@ -53,7 +53,13 @@ import AutoComp
|
|||||||
import ListModel
|
import ListModel
|
||||||
import Utils
|
import Utils
|
||||||
import SelectPerson
|
import SelectPerson
|
||||||
|
import Tool
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Constants
|
||||||
|
#
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
_name2list = {
|
_name2list = {
|
||||||
_('Personal event:') : const.personal_events,
|
_('Personal event:') : const.personal_events,
|
||||||
_('Family event:') : const.family_events,
|
_('Family event:') : const.family_events,
|
||||||
@ -916,16 +922,35 @@ class ShowResults:
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
def CustomFilterEditor(database,person,callback,parent=None):
|
class CustomFilterEditor(Tool.Tool):
|
||||||
FilterEditor(const.custom_filters,database,parent)
|
def __init__(self,db,person,options_class,name,callback=None,parent=None):
|
||||||
|
Tool.Tool.__init__(self,db,person,options_class,name)
|
||||||
|
|
||||||
|
FilterEditor(const.custom_filters,db,parent)
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
def SystemFilterEditor(database,person,callback,parent=None):
|
class SystemFilterEditor(Tool.Tool):
|
||||||
FilterEditor(const.system_filters,database,parent)
|
def __init__(self,db,person,options_class,name,callback=None,parent=None):
|
||||||
|
Tool.Tool.__init__(self,db,person,options_class,name)
|
||||||
|
|
||||||
|
FilterEditor(const.system_filters,database,parent)
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
class FilterEditorOptions(Tool.ToolOptions):
|
||||||
|
"""
|
||||||
|
Defines options and provides handling interface.
|
||||||
|
"""
|
||||||
|
|
||||||
|
def __init__(self,name,person_id=None):
|
||||||
|
Tool.ToolOptions.__init__(self,name,person_id)
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -935,9 +960,15 @@ def SystemFilterEditor(database,person,callback,parent=None):
|
|||||||
from PluginMgr import register_tool
|
from PluginMgr import register_tool
|
||||||
|
|
||||||
register_tool(
|
register_tool(
|
||||||
CustomFilterEditor,
|
name = 'sfilted',
|
||||||
_("Custom Filter Editor"),
|
category = Tool.TOOL_UTILS,
|
||||||
category=_("Utilities"),
|
tool_class = CustomFilterEditor,
|
||||||
|
options_class = FilterEditorOptions,
|
||||||
|
modes = Tool.MODE_GUI,
|
||||||
|
translated_name = _("Custom Filter Editor"),
|
||||||
|
status = _("Beta"),
|
||||||
|
author_name = "Donald N. Allingham",
|
||||||
|
author_email = "dallingham@users.sourceforge.net",
|
||||||
description=_("The Custom Filter Editor builds custom "
|
description=_("The Custom Filter Editor builds custom "
|
||||||
"filters that can be used to select people "
|
"filters that can be used to select people "
|
||||||
"included in reports, exports, and other utilities.")
|
"included in reports, exports, and other utilities.")
|
||||||
@ -948,9 +979,15 @@ if ((os.path.exists(const.system_filters) and
|
|||||||
(os.path.exists(os.path.dirname(const.system_filters)) and
|
(os.path.exists(os.path.dirname(const.system_filters)) and
|
||||||
os.access(os.path.dirname(const.system_filters), os.W_OK))):
|
os.access(os.path.dirname(const.system_filters), os.W_OK))):
|
||||||
register_tool(
|
register_tool(
|
||||||
SystemFilterEditor,
|
name = 'sfilted',
|
||||||
_("System Filter Editor"),
|
category = Tool.TOOL_UTILS,
|
||||||
category=_("Utilities"),
|
tool_class = SystemFilterEditor,
|
||||||
|
options_class = FilterEditorOptions,
|
||||||
|
modes = Tool.MODE_GUI,
|
||||||
|
translated_name = _("System Filter Editor"),
|
||||||
|
status = _("Beta"),
|
||||||
|
author_name = "Donald N. Allingham",
|
||||||
|
author_email = "dallingham@users.sourceforge.net",
|
||||||
description=_("The System Filter Editor builds custom "
|
description=_("The System Filter Editor builds custom "
|
||||||
"filters that can be used by anyone on the system "
|
"filters that can be used by anyone on the system "
|
||||||
"to select people included in reports, exports, "
|
"to select people included in reports, exports, "
|
||||||
|
Reference in New Issue
Block a user