From 7d45c26f71637455673c3240dbbd8318670d256d Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Wed, 8 Mar 2006 01:09:17 +0000 Subject: [PATCH] Update svn: r6098 --- configure.in | 2 +- src/DateHandler/Makefile.am | 25 ++++++++++--------- .../{DateDisplay.py => _DateDisplay.py} | 0 .../{DateParser.py => _DateParser.py} | 0 src/DateHandler/{Date_de.py => _Date_de.py} | 0 src/DateHandler/{Date_es.py => _Date_es.py} | 0 src/DateHandler/{Date_fi.py => _Date_fi.py} | 0 src/DateHandler/{Date_fr.py => _Date_fr.py} | 0 src/DateHandler/{Date_lt.py => _Date_lt.py} | 0 src/DateHandler/{Date_nl.py => _Date_nl.py} | 0 src/DateHandler/{Date_ru.py => _Date_ru.py} | 0 src/DateHandler/{Date_sv.py => _Date_sv.py} | 0 src/DateHandler/__init__.py | 24 +++++++++--------- src/GrampsDb/_ReadGedcom.py | 4 +-- src/Makefile.am | 2 +- src/plugins/Calendar.py | 4 +-- 16 files changed, 31 insertions(+), 30 deletions(-) rename src/DateHandler/{DateDisplay.py => _DateDisplay.py} (100%) rename src/DateHandler/{DateParser.py => _DateParser.py} (100%) rename src/DateHandler/{Date_de.py => _Date_de.py} (100%) rename src/DateHandler/{Date_es.py => _Date_es.py} (100%) rename src/DateHandler/{Date_fi.py => _Date_fi.py} (100%) rename src/DateHandler/{Date_fr.py => _Date_fr.py} (100%) rename src/DateHandler/{Date_lt.py => _Date_lt.py} (100%) rename src/DateHandler/{Date_nl.py => _Date_nl.py} (100%) rename src/DateHandler/{Date_ru.py => _Date_ru.py} (100%) rename src/DateHandler/{Date_sv.py => _Date_sv.py} (100%) diff --git a/configure.in b/configure.in index a17c05205..a946dee85 100644 --- a/configure.in +++ b/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/src/DateHandler/Makefile.am b/src/DateHandler/Makefile.am index 3c51d5720..0c5182282 100644 --- a/src/DateHandler/Makefile.am +++ b/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/src/DateHandler/DateDisplay.py b/src/DateHandler/_DateDisplay.py similarity index 100% rename from src/DateHandler/DateDisplay.py rename to src/DateHandler/_DateDisplay.py diff --git a/src/DateHandler/DateParser.py b/src/DateHandler/_DateParser.py similarity index 100% rename from src/DateHandler/DateParser.py rename to src/DateHandler/_DateParser.py diff --git a/src/DateHandler/Date_de.py b/src/DateHandler/_Date_de.py similarity index 100% rename from src/DateHandler/Date_de.py rename to src/DateHandler/_Date_de.py diff --git a/src/DateHandler/Date_es.py b/src/DateHandler/_Date_es.py similarity index 100% rename from src/DateHandler/Date_es.py rename to src/DateHandler/_Date_es.py diff --git a/src/DateHandler/Date_fi.py b/src/DateHandler/_Date_fi.py similarity index 100% rename from src/DateHandler/Date_fi.py rename to src/DateHandler/_Date_fi.py diff --git a/src/DateHandler/Date_fr.py b/src/DateHandler/_Date_fr.py similarity index 100% rename from src/DateHandler/Date_fr.py rename to src/DateHandler/_Date_fr.py diff --git a/src/DateHandler/Date_lt.py b/src/DateHandler/_Date_lt.py similarity index 100% rename from src/DateHandler/Date_lt.py rename to src/DateHandler/_Date_lt.py diff --git a/src/DateHandler/Date_nl.py b/src/DateHandler/_Date_nl.py similarity index 100% rename from src/DateHandler/Date_nl.py rename to src/DateHandler/_Date_nl.py diff --git a/src/DateHandler/Date_ru.py b/src/DateHandler/_Date_ru.py similarity index 100% rename from src/DateHandler/Date_ru.py rename to src/DateHandler/_Date_ru.py diff --git a/src/DateHandler/Date_sv.py b/src/DateHandler/_Date_sv.py similarity index 100% rename from src/DateHandler/Date_sv.py rename to src/DateHandler/_Date_sv.py diff --git a/src/DateHandler/__init__.py b/src/DateHandler/__init__.py index 0dfe1b798..5a82e6559 100644 --- a/src/DateHandler/__init__.py +++ b/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/src/GrampsDb/_ReadGedcom.py b/src/GrampsDb/_ReadGedcom.py index c13c95f36..b5f0e8d3a 100644 --- a/src/GrampsDb/_ReadGedcom.py +++ b/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/src/Makefile.am b/src/Makefile.am index 8016be9c2..4ba7c5ebc 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -13,7 +13,7 @@ SUBDIRS = \ RelLib \ TreeViews \ data \ - dates \ + DateHandler \ glade \ docgen \ images \ diff --git a/src/plugins/Calendar.py b/src/plugins/Calendar.py index a87f7b632..20c52e909 100644 --- a/src/plugins/Calendar.py +++ b/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