svn: r6098
This commit is contained in:
Alex Roitman 2006-03-08 01:09:17 +00:00
parent c75449ef78
commit 7d45c26f71
16 changed files with 31 additions and 30 deletions

View File

@ -242,7 +242,7 @@ src/Models/Makefile
src/Editors/Makefile src/Editors/Makefile
src/DataViews/Makefile src/DataViews/Makefile
src/plugins/Makefile src/plugins/Makefile
src/dates/Makefile src/DateHandler/Makefile
src/data/Makefile src/data/Makefile
src/glade/Makefile src/glade/Makefile
src/images/Makefile src/images/Makefile

View File

@ -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, # We could use GNU make's ':=' syntax for nice wildcard use,
# but that is not necessarily portable. # but that is not necessarily portable.
# If not using GNU make, then list all .py files individually # If not using GNU make, then list all .py files individually
pkgdatadir = $(datadir)/@PACKAGE@/dates pkgdatadir = $(datadir)/@PACKAGE@/DateHandler
pkgdata_PYTHON = \ pkgdata_PYTHON = \
Date_de.py\ _Date_de.py\
Date_ru.py\ _Date_ru.py\
Date_lt.py\ _Date_lt.py\
Date_fr.py\ _Date_fr.py\
Date_es.py\ _Date_es.py\
Date_fi.py\ _Date_fi.py\
Date_sv.py\ _Date_sv.py\
Date_nl.py _Date_nl.py\
__init__.py
pkgpyexecdir = @pkgpyexecdir@/dates pkgpyexecdir = @pkgpyexecdir@/DateHandler
pkgpythondir = @pkgpythondir@/dates pkgpythondir = @pkgpythondir@/DateHandler
GRAMPS_PY_MODPATH = ".." GRAMPS_PY_MODPATH = ".."

View File

@ -45,8 +45,8 @@ log = logging.getLogger(".DateHandler")
# GRAMPS modules # GRAMPS modules
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
import DateParser from _DateParser import DateParser
import DateDisplay from _DateDisplay import DateDisplay, DateDisplayEn
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #
@ -60,19 +60,19 @@ else:
_lang_short = "C" _lang_short = "C"
_lang_to_parser = { _lang_to_parser = {
'C' : DateParser.DateParser, 'C' : DateParser,
'en' : DateParser.DateParser, 'en' : DateParser,
} }
_lang_to_display = { _lang_to_display = {
'C' : DateDisplay.DateDisplayEn, 'C' : DateDisplayEn,
'en' : DateDisplay.DateDisplayEn, 'en' : DateDisplayEn,
'zh_CN' : DateDisplay.DateDisplay, 'zh_CN' : DateDisplay,
'zh_TW' : DateDisplay.DateDisplay, 'zh_TW' : DateDisplay,
'zh_SG' : DateDisplay.DateDisplay, 'zh_SG' : DateDisplay,
'zh_HK' : DateDisplay.DateDisplay, 'zh_HK' : DateDisplay,
'ja_JP' : DateDisplay.DateDisplay, 'ja_JP' : DateDisplay,
'ko_KR' : DateDisplay.DateDisplay, 'ko_KR' : DateDisplay,
} }
def get_date_formats(): def get_date_formats():

View File

@ -64,7 +64,7 @@ import gtk.glade
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
import Errors import Errors
import RelLib import RelLib
import DateParser from DateHandler import DateParser
import NameDisplay import NameDisplay
import Utils import Utils
import Mime import Mime
@ -249,7 +249,7 @@ class DateStruct:
self.date = "" self.date = ""
self.time = "" self.time = ""
class GedcomDateParser(DateParser.DateParser): class GedcomDateParser(DateParser):
month_to_int = { month_to_int = {
'jan' : 1, 'feb' : 2, 'mar' : 3, 'apr' : 4, 'jan' : 1, 'feb' : 2, 'mar' : 3, 'apr' : 4,

View File

@ -13,7 +13,7 @@ SUBDIRS = \
RelLib \ RelLib \
TreeViews \ TreeViews \
data \ data \
dates \ DateHandler \
glade \ glade \
docgen \ docgen \
images \ images \

View File

@ -41,7 +41,7 @@ import BaseDoc
import Report import Report
import GenericFilter import GenericFilter
from ReportUtils import pt2cm from ReportUtils import pt2cm
import DateDisplay from DateHandler import DateDisplay
import ReportOptions import ReportOptions
import RelLib import RelLib
@ -204,7 +204,7 @@ class Calendar(Report.Report):
self.doc.draw_bar("title", 0, 0, width, header) self.doc.draw_bar("title", 0, 0, width, header)
self.doc.draw_line("border", 0, header, width, header) self.doc.draw_line("border", 0, header, width, header)
year = self["year"] 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()) font_height = pt2cm(1.25 * self["title"].get_size())
self.doc.center_text("title", title, width/2, font_height + self["offset"]) # 1.0 self.doc.center_text("title", title, width/2, font_height + self["offset"]) # 1.0
cell_width = width / 7 cell_width = width / 7