Remove dependency on load_plugins
svn: r6136
This commit is contained in:
parent
598e518474
commit
44040b095a
@ -4,6 +4,9 @@
|
|||||||
2006-03-10 Alex Roitman <shura@gramps-project.org>
|
2006-03-10 Alex Roitman <shura@gramps-project.org>
|
||||||
* src/Plugins.py, src/PluginMgr.py: Move to ReportUtils.
|
* src/Plugins.py, src/PluginMgr.py: Move to ReportUtils.
|
||||||
* various: use ReportUtils instead of PluginMgr.
|
* various: use ReportUtils instead of PluginMgr.
|
||||||
|
* DateHandler/_DateHandler.py: Rename __init__; remove dependency
|
||||||
|
on load_plugins.
|
||||||
|
* DateHandler/__init__.py: Add new file.
|
||||||
|
|
||||||
2006-03-10 Don Allingham <don@gramps-project.org>
|
2006-03-10 Don Allingham <don@gramps-project.org>
|
||||||
* src/Mime/PythonMime.py: import gtk
|
* src/Mime/PythonMime.py: import gtk
|
||||||
|
@ -16,6 +16,7 @@ pkgdata_PYTHON = \
|
|||||||
_Date_nl.py\
|
_Date_nl.py\
|
||||||
_DateDisplay.py\
|
_DateDisplay.py\
|
||||||
_DateParser.py\
|
_DateParser.py\
|
||||||
|
_DateHandler.py\
|
||||||
__init__.py
|
__init__.py
|
||||||
|
|
||||||
pkgpyexecdir = @pkgpyexecdir@/DateHandler
|
pkgpyexecdir = @pkgpyexecdir@/DateHandler
|
||||||
|
@ -108,16 +108,6 @@ def register_datehandler(locales,parse_class,display_class):
|
|||||||
_lang_to_parser[lang_str] = parse_class
|
_lang_to_parser[lang_str] = parse_class
|
||||||
_lang_to_display[lang_str] = display_class
|
_lang_to_display[lang_str] = display_class
|
||||||
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
|
||||||
#
|
|
||||||
# Import localized date classes
|
|
||||||
#
|
|
||||||
#-------------------------------------------------------------------------
|
|
||||||
from PluginUtils import load_plugins
|
|
||||||
from const import datesDir
|
|
||||||
load_plugins(datesDir)
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# Initialize global parser
|
# Initialize global parser
|
@ -38,8 +38,9 @@ import re
|
|||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
from RelLib import Date
|
from RelLib import Date
|
||||||
from DateParser import DateParser
|
from _DateParser import DateParser
|
||||||
from DateDisplay import DateDisplay
|
from _DateDisplay import DateDisplay
|
||||||
|
from _DateHandler import register_datehandler
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -223,6 +224,6 @@ class DateDisplayDE(DateDisplay):
|
|||||||
# Register classes
|
# Register classes
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
from DateHandler import register_datehandler
|
|
||||||
register_datehandler(('de_DE','german','de_AT','de_CH',
|
register_datehandler(('de_DE','german','de_AT','de_CH',
|
||||||
'de_LI','de_LU','de_BE','de'),DateParserDE, DateDisplayDE)
|
'de_LI','de_LU','de_BE','de'),
|
||||||
|
DateParserDE, DateDisplayDE)
|
||||||
|
@ -38,8 +38,9 @@ import re
|
|||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
from RelLib import Date
|
from RelLib import Date
|
||||||
from DateParser import DateParser
|
from _DateParser import DateParser
|
||||||
from DateDisplay import DateDisplay
|
from _DateDisplay import DateDisplay
|
||||||
|
from _DateHandler import register_datehandler
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -158,5 +159,4 @@ class DateDisplayES(DateDisplay):
|
|||||||
# Register classes
|
# Register classes
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
from DateHandler import register_datehandler
|
|
||||||
register_datehandler(('es_ES','es','spanish'),DateParserES, DateDisplayES)
|
register_datehandler(('es_ES','es','spanish'),DateParserES, DateDisplayES)
|
||||||
|
@ -38,8 +38,9 @@ import re
|
|||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
from RelLib import Date
|
from RelLib import Date
|
||||||
from DateParser import DateParser
|
from _DateParser import DateParser
|
||||||
from DateDisplay import DateDisplay
|
from _DateDisplay import DateDisplay
|
||||||
|
from _DateHandler import register_datehandler
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -180,6 +181,4 @@ class DateDisplayFI(DateDisplay):
|
|||||||
# Register classes
|
# Register classes
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
from DateHandler import register_datehandler
|
|
||||||
register_datehandler(('fi_FI','fi','finnish'), DateParserFI, DateDisplayFI)
|
register_datehandler(('fi_FI','fi','finnish'), DateParserFI, DateDisplayFI)
|
||||||
|
|
||||||
|
@ -38,8 +38,9 @@ import re
|
|||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
from RelLib import Date
|
from RelLib import Date
|
||||||
from DateParser import DateParser
|
from _DateParser import DateParser
|
||||||
from DateDisplay import DateDisplay
|
from _DateDisplay import DateDisplay
|
||||||
|
from _DateHandler import register_datehandler
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -242,5 +243,5 @@ class DateDisplayFR(DateDisplay):
|
|||||||
# Register classes
|
# Register classes
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
from DateHandler import register_datehandler
|
register_datehandler(('fr_FR','fr','french','fr_CA','fr_BE','fr_CH'),
|
||||||
register_datehandler(('fr_FR','fr','french','fr_CA','fr_BE','fr_CH'),DateParserFR,DateDisplayFR)
|
DateParserFR,DateDisplayFR)
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# Gramps - a GTK+/GNOME based genealogy program
|
# Gramps - a GTK+/GNOME based genealogy program
|
||||||
#
|
#
|
||||||
# Copyright (C) 2004-2005 Donald N. Allingham
|
# Copyright (C) 2004-2006 Donald N. Allingham
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@ -37,9 +37,10 @@ import re
|
|||||||
# GRAMPS modules
|
# GRAMPS modules
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
import Date
|
from RelLib import Date
|
||||||
from DateParser import DateParser
|
from _DateParser import DateParser
|
||||||
from DateDisplay import DateDisplay
|
from _DateDisplay import DateDisplay
|
||||||
|
from _DateHandler import register_datehandler
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -145,5 +146,4 @@ class DateDisplayLT(DateDisplay):
|
|||||||
# Register classes
|
# Register classes
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
from DateHandler import register_datehandler
|
|
||||||
register_datehandler(('lt_LT','lt','lithuanian'),DateParserLT, DateDisplayLT)
|
register_datehandler(('lt_LT','lt','lithuanian'),DateParserLT, DateDisplayLT)
|
||||||
|
@ -44,8 +44,9 @@ import re
|
|||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
from RelLib import Date
|
from RelLib import Date
|
||||||
from DateParser import DateParser
|
from _DateParser import DateParser
|
||||||
from DateDisplay import DateDisplay
|
from _DateDisplay import DateDisplay
|
||||||
|
from _DateHandler import register_datehandler
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -237,6 +238,5 @@ class DateDisplayNL(DateDisplay):
|
|||||||
# Register classes
|
# Register classes
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
from DateHandler import register_datehandler
|
|
||||||
register_datehandler(('nl_NL','dutch','nl_BE','nl'),
|
register_datehandler(('nl_NL','dutch','nl_BE','nl'),
|
||||||
DateParserNL, DateDisplayNL)
|
DateParserNL, DateDisplayNL)
|
||||||
|
@ -38,8 +38,9 @@ import re
|
|||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
from RelLib import Date
|
from RelLib import Date
|
||||||
from DateParser import DateParser
|
from _DateParser import DateParser
|
||||||
from DateDisplay import DateDisplay
|
from _DateDisplay import DateDisplay
|
||||||
|
from _DateHandler import register_datehandler
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -167,5 +168,4 @@ class DateDisplayRU(DateDisplay):
|
|||||||
# Register classes
|
# Register classes
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
from DateHandler import register_datehandler
|
|
||||||
register_datehandler(('ru_RU','ru','russian'),DateParserRU, DateDisplayRU)
|
register_datehandler(('ru_RU','ru','russian'),DateParserRU, DateDisplayRU)
|
||||||
|
@ -38,8 +38,9 @@ import re
|
|||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
from RelLib import Date
|
from RelLib import Date
|
||||||
from DateParser import DateParser
|
from _DateParser import DateParser
|
||||||
from DateDisplay import DateDisplay
|
from _DateDisplay import DateDisplay
|
||||||
|
from _DateHandler import register_datehandler
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -164,5 +165,4 @@ class DateDisplaySv(DateDisplay):
|
|||||||
# Register classes
|
# Register classes
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
from DateHandler import register_datehandler
|
|
||||||
register_datehandler(('sv_SE','sv','svensk'),DateParserSv, DateDisplaySv)
|
register_datehandler(('sv_SE','sv','svensk'),DateParserSv, DateDisplaySv)
|
||||||
|
35
src/DateHandler/___init__.py
Normal file
35
src/DateHandler/___init__.py
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
#
|
||||||
|
# Gramps - a GTK+/GNOME based genealogy program
|
||||||
|
#
|
||||||
|
# Copyright (C) 2004-2006 Donald N. Allingham
|
||||||
|
#
|
||||||
|
# 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
|
||||||
|
# the Free Software Foundation; either version 2 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
#
|
||||||
|
|
||||||
|
# $Id: __init__.py 6133 2006-03-11 01:12:06Z rshura $
|
||||||
|
|
||||||
|
"""
|
||||||
|
Class handling language-specific selection for date parser and displayer.
|
||||||
|
"""
|
||||||
|
import _Date_de
|
||||||
|
import _Date_es
|
||||||
|
import _Date_fi
|
||||||
|
import _Date_fr
|
||||||
|
import _Date_lt
|
||||||
|
import _Date_nl
|
||||||
|
import _Date_ru
|
||||||
|
import _Date_sv
|
||||||
|
|
||||||
|
from _DateHandler import *
|
@ -318,7 +318,7 @@ class PluginStatus(DisplayState.ManagedWindow):
|
|||||||
self.state = state
|
self.state = state
|
||||||
self.uistate = uistate
|
self.uistate = uistate
|
||||||
|
|
||||||
self.glade = gtk.glade.XML(const.pluginsFile,"plugstat","gramps")
|
self.glade = gtk.glade.XML(const.plugins_glade,"plugstat","gramps")
|
||||||
self.window = self.glade.get_widget("plugstat")
|
self.window = self.glade.get_widget("plugstat")
|
||||||
self.window.set_title("%s - GRAMPS" % _('Plugin status'))
|
self.window.set_title("%s - GRAMPS" % _('Plugin status'))
|
||||||
window = self.glade.get_widget("text")
|
window = self.glade.get_widget("text")
|
||||||
|
Loading…
Reference in New Issue
Block a user