From 4205f8ead60f9f30b6d2742fcfe734cb12704724 Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Wed, 8 Mar 2006 01:09:17 +0000 Subject: [PATCH] Update svn: r6098 --- gramps2/configure.in | 2 +- gramps2/src/DateHandler/Makefile.am | 25 ++++++++++--------- .../{DateDisplay.py => _DateDisplay.py} | 0 .../{DateParser.py => _DateParser.py} | 0 .../DateHandler/{Date_de.py => _Date_de.py} | 0 .../DateHandler/{Date_es.py => _Date_es.py} | 0 .../DateHandler/{Date_fi.py => _Date_fi.py} | 0 .../DateHandler/{Date_fr.py => _Date_fr.py} | 0 .../DateHandler/{Date_lt.py => _Date_lt.py} | 0 .../DateHandler/{Date_nl.py => _Date_nl.py} | 0 .../DateHandler/{Date_ru.py => _Date_ru.py} | 0 .../DateHandler/{Date_sv.py => _Date_sv.py} | 0 gramps2/src/DateHandler/__init__.py | 24 +++++++++--------- gramps2/src/GrampsDb/_ReadGedcom.py | 4 +-- gramps2/src/Makefile.am | 2 +- gramps2/src/plugins/Calendar.py | 4 +-- 16 files changed, 31 insertions(+), 30 deletions(-) rename gramps2/src/DateHandler/{DateDisplay.py => _DateDisplay.py} (100%) rename gramps2/src/DateHandler/{DateParser.py => _DateParser.py} (100%) rename gramps2/src/DateHandler/{Date_de.py => _Date_de.py} (100%) rename gramps2/src/DateHandler/{Date_es.py => _Date_es.py} (100%) rename gramps2/src/DateHandler/{Date_fi.py => _Date_fi.py} (100%) rename gramps2/src/DateHandler/{Date_fr.py => _Date_fr.py} (100%) rename gramps2/src/DateHandler/{Date_lt.py => _Date_lt.py} (100%) rename gramps2/src/DateHandler/{Date_nl.py => _Date_nl.py} (100%) rename gramps2/src/DateHandler/{Date_ru.py => _Date_ru.py} (100%) rename gramps2/src/DateHandler/{Date_sv.py => _Date_sv.py} (100%) diff --git a/gramps2/configure.in b/gramps2/configure.in index a17c05205..a946dee85 100644 --- a/gramps2/configure.in +++ b/gramps2/configure.in @@ -242,7 +242,7 @@ src/Models/Makefile src/Editors/Makefile src/DataViews/Makefile src/plugins/Makefile -src/dates/Makefile +src/DateHandler/Makefile src/data/Makefile src/glade/Makefile src/images/Makefile diff --git a/gramps2/src/DateHandler/Makefile.am b/gramps2/src/DateHandler/Makefile.am index 3c51d5720..0c5182282 100644 --- a/gramps2/src/DateHandler/Makefile.am +++ b/gramps2/src/DateHandler/Makefile.am @@ -1,22 +1,23 @@ -# This is the src/plugins level Makefile for Gramps +# This is the src/DateHandler level Makefile for Gramps # We could use GNU make's ':=' syntax for nice wildcard use, # but that is not necessarily portable. # If not using GNU make, then list all .py files individually -pkgdatadir = $(datadir)/@PACKAGE@/dates +pkgdatadir = $(datadir)/@PACKAGE@/DateHandler pkgdata_PYTHON = \ - Date_de.py\ - Date_ru.py\ - Date_lt.py\ - Date_fr.py\ - Date_es.py\ - Date_fi.py\ - Date_sv.py\ - Date_nl.py + _Date_de.py\ + _Date_ru.py\ + _Date_lt.py\ + _Date_fr.py\ + _Date_es.py\ + _Date_fi.py\ + _Date_sv.py\ + _Date_nl.py\ + __init__.py -pkgpyexecdir = @pkgpyexecdir@/dates -pkgpythondir = @pkgpythondir@/dates +pkgpyexecdir = @pkgpyexecdir@/DateHandler +pkgpythondir = @pkgpythondir@/DateHandler GRAMPS_PY_MODPATH = ".." diff --git a/gramps2/src/DateHandler/DateDisplay.py b/gramps2/src/DateHandler/_DateDisplay.py similarity index 100% rename from gramps2/src/DateHandler/DateDisplay.py rename to gramps2/src/DateHandler/_DateDisplay.py diff --git a/gramps2/src/DateHandler/DateParser.py b/gramps2/src/DateHandler/_DateParser.py similarity index 100% rename from gramps2/src/DateHandler/DateParser.py rename to gramps2/src/DateHandler/_DateParser.py diff --git a/gramps2/src/DateHandler/Date_de.py b/gramps2/src/DateHandler/_Date_de.py similarity index 100% rename from gramps2/src/DateHandler/Date_de.py rename to gramps2/src/DateHandler/_Date_de.py diff --git a/gramps2/src/DateHandler/Date_es.py b/gramps2/src/DateHandler/_Date_es.py similarity index 100% rename from gramps2/src/DateHandler/Date_es.py rename to gramps2/src/DateHandler/_Date_es.py diff --git a/gramps2/src/DateHandler/Date_fi.py b/gramps2/src/DateHandler/_Date_fi.py similarity index 100% rename from gramps2/src/DateHandler/Date_fi.py rename to gramps2/src/DateHandler/_Date_fi.py diff --git a/gramps2/src/DateHandler/Date_fr.py b/gramps2/src/DateHandler/_Date_fr.py similarity index 100% rename from gramps2/src/DateHandler/Date_fr.py rename to gramps2/src/DateHandler/_Date_fr.py diff --git a/gramps2/src/DateHandler/Date_lt.py b/gramps2/src/DateHandler/_Date_lt.py similarity index 100% rename from gramps2/src/DateHandler/Date_lt.py rename to gramps2/src/DateHandler/_Date_lt.py diff --git a/gramps2/src/DateHandler/Date_nl.py b/gramps2/src/DateHandler/_Date_nl.py similarity index 100% rename from gramps2/src/DateHandler/Date_nl.py rename to gramps2/src/DateHandler/_Date_nl.py diff --git a/gramps2/src/DateHandler/Date_ru.py b/gramps2/src/DateHandler/_Date_ru.py similarity index 100% rename from gramps2/src/DateHandler/Date_ru.py rename to gramps2/src/DateHandler/_Date_ru.py diff --git a/gramps2/src/DateHandler/Date_sv.py b/gramps2/src/DateHandler/_Date_sv.py similarity index 100% rename from gramps2/src/DateHandler/Date_sv.py rename to gramps2/src/DateHandler/_Date_sv.py diff --git a/gramps2/src/DateHandler/__init__.py b/gramps2/src/DateHandler/__init__.py index 0dfe1b798..5a82e6559 100644 --- a/gramps2/src/DateHandler/__init__.py +++ b/gramps2/src/DateHandler/__init__.py @@ -45,8 +45,8 @@ log = logging.getLogger(".DateHandler") # GRAMPS modules # #------------------------------------------------------------------------- -import DateParser -import DateDisplay +from _DateParser import DateParser +from _DateDisplay import DateDisplay, DateDisplayEn #------------------------------------------------------------------------- # @@ -60,19 +60,19 @@ else: _lang_short = "C" _lang_to_parser = { - 'C' : DateParser.DateParser, - 'en' : DateParser.DateParser, + 'C' : DateParser, + 'en' : DateParser, } _lang_to_display = { - 'C' : DateDisplay.DateDisplayEn, - 'en' : DateDisplay.DateDisplayEn, - 'zh_CN' : DateDisplay.DateDisplay, - 'zh_TW' : DateDisplay.DateDisplay, - 'zh_SG' : DateDisplay.DateDisplay, - 'zh_HK' : DateDisplay.DateDisplay, - 'ja_JP' : DateDisplay.DateDisplay, - 'ko_KR' : DateDisplay.DateDisplay, + 'C' : DateDisplayEn, + 'en' : DateDisplayEn, + 'zh_CN' : DateDisplay, + 'zh_TW' : DateDisplay, + 'zh_SG' : DateDisplay, + 'zh_HK' : DateDisplay, + 'ja_JP' : DateDisplay, + 'ko_KR' : DateDisplay, } def get_date_formats(): diff --git a/gramps2/src/GrampsDb/_ReadGedcom.py b/gramps2/src/GrampsDb/_ReadGedcom.py index c13c95f36..b5f0e8d3a 100644 --- a/gramps2/src/GrampsDb/_ReadGedcom.py +++ b/gramps2/src/GrampsDb/_ReadGedcom.py @@ -64,7 +64,7 @@ import gtk.glade #------------------------------------------------------------------------- import Errors import RelLib -import DateParser +from DateHandler import DateParser import NameDisplay import Utils import Mime @@ -249,7 +249,7 @@ class DateStruct: self.date = "" self.time = "" -class GedcomDateParser(DateParser.DateParser): +class GedcomDateParser(DateParser): month_to_int = { 'jan' : 1, 'feb' : 2, 'mar' : 3, 'apr' : 4, diff --git a/gramps2/src/Makefile.am b/gramps2/src/Makefile.am index 8016be9c2..4ba7c5ebc 100644 --- a/gramps2/src/Makefile.am +++ b/gramps2/src/Makefile.am @@ -13,7 +13,7 @@ SUBDIRS = \ RelLib \ TreeViews \ data \ - dates \ + DateHandler \ glade \ docgen \ images \ diff --git a/gramps2/src/plugins/Calendar.py b/gramps2/src/plugins/Calendar.py index a87f7b632..20c52e909 100644 --- a/gramps2/src/plugins/Calendar.py +++ b/gramps2/src/plugins/Calendar.py @@ -41,7 +41,7 @@ import BaseDoc import Report import GenericFilter from ReportUtils import pt2cm -import DateDisplay +from DateHandler import DateDisplay import ReportOptions import RelLib @@ -204,7 +204,7 @@ class Calendar(Report.Report): self.doc.draw_bar("title", 0, 0, width, header) self.doc.draw_line("border", 0, header, width, header) year = self["year"] - title = "%s %d" % (DateDisplay.DateDisplay._months[month], year) + title = "%s %d" % (DateDisplay._months[month], year) font_height = pt2cm(1.25 * self["title"].get_size()) self.doc.center_text("title", title, width/2, font_height + self["offset"]) # 1.0 cell_width = width / 7