* src/const.py.in: Remove report and tool categories.

* src/Plugins.py: Switch report and tool category constants.
* src/PluginMgr.py: Switch report and tool category constants.
* src/Report.py, src/Tool.py: Move constants.
* src/plugins/ChangeNames.py, src/plugins/ChangeTypes.py,
src/plugins/Checkpoint.py: switch category constants.


svn: r5245
This commit is contained in:
Alex Roitman 2005-09-27 05:10:54 +00:00
parent 3ba7eed3e9
commit 1e67047f6c
7 changed files with 33 additions and 22 deletions

View File

@ -1,5 +1,11 @@
2005-09-26 Alex Roitman <shura@gramps-project.org>
* all reports: switch categories from const to Report module.
* src/const.py.in: Remove report and tool categories.
* src/Plugins.py: Switch report and tool category constants.
* src/PluginMgr.py: Switch report and tool category constants.
* src/Report.py, src/Tool.py: Move constants.
* src/plugins/ChangeNames.py, src/plugins/ChangeTypes.py,
src/plugins/Checkpoint.py: switch category constants.
2005-09-26 Don Allingham <don@gramps-project.org>
* src/docgen/PSDrawDoc.py: locale independent floating point

View File

@ -428,7 +428,7 @@ def build_tools_menu(top_menu,callback):
hash_data = {}
for tool in PluginMgr.tool_list:
tool_category = const.tool_categories[tool[3]]
tool_category = Tool.tool_categories[tool[3]]
if hash_data.has_key(tool_category):
hash_data[tool_category].append(
(tool[0],tool[1],tool[2],tool[4],tool[3]))

View File

@ -25,7 +25,13 @@
__author__ = "Alex Roitman"
__version__ = "$Revision$"
#-------------------------------------------------------------------------
#
# Python modules
#
#-------------------------------------------------------------------------
from types import ClassType, InstanceType
from gettext import gettext as _
#-------------------------------------------------------------------------
#
@ -47,6 +53,23 @@ import Options
MODE_GUI = 1 # Standrt tool using GUI
MODE_CLI = 2 # Command line interface (CLI)
# Tool categories
TOOL_DEBUG = -1
TOOL_ANAL = 0
TOOL_DBPROC = 1
TOOL_DBFIX = 2
TOOL_REVCTL = 3
TOOL_UTILS = 4
tool_categories = {
TOOL_DEBUG : _("Debug"),
TOOL_ANAL : _("Analysis and Exploration"),
TOOL_DBPROC : _("Database Processing"),
TOOL_DBFIX : _("Database Repair"),
TOOL_REVCTL : _("Revision Control"),
TOOL_UTILS : _("Utilities"),
}
#-------------------------------------------------------------------------
#
# Report

View File

@ -929,19 +929,3 @@ notes_formats = [
_("Flowed"),
_("Preformatted"),
]
TOOL_DEBUG = -1
TOOL_ANAL = 0
TOOL_DBPROC = 1
TOOL_DBFIX = 2
TOOL_REVCTL = 3
TOOL_UTILS = 4
tool_categories = {
TOOL_DEBUG : _("Debug"),
TOOL_ANAL : _("Analysis and Exploration"),
TOOL_DBPROC : _("Database Processing"),
TOOL_DBFIX : _("Database Repair"),
TOOL_REVCTL : _("Revision Control"),
TOOL_UTILS : _("Utilities"),
}

View File

@ -46,7 +46,6 @@ from gnome import help_display
# gramps modules
#
#-------------------------------------------------------------------------
import const
import Utils
from QuestionDialog import OkDialog
import Tool
@ -210,7 +209,7 @@ from PluginMgr import register_tool
register_tool(
name = 'chname',
category = const.TOOL_DBPROC,
category = Tool.TOOL_DBPROC,
tool_class = ChangeNames,
options_class = ChangeNamesOptions,
modes = Tool.MODE_GUI,

View File

@ -209,7 +209,7 @@ class ChangeTypesOptions(Tool.ToolOptions):
from PluginMgr import register_tool
register_tool(
name = 'chtype',
category = const.TOOL_DBPROC,
category = Tool.TOOL_DBPROC,
tool_class = ChangeTypes,
options_class = ChangeTypesOptions,
modes = Tool.MODE_GUI | Tool.MODE_CLI,

View File

@ -47,7 +47,6 @@ from gnome import help_display
# gramps modules
#
#-------------------------------------------------------------------------
import const
from QuestionDialog import OkDialog, ErrorDialog
import WriteXML
import Tool
@ -439,7 +438,7 @@ from PluginMgr import register_tool
register_tool(
name = 'chkpoint',
category = const.TOOL_REVCTL,
category = Tool.TOOL_REVCTL,
tool_class = Checkpoint,
options_class = CheckpointOptions,
modes = Tool.MODE_GUI | Tool.MODE_CLI,