From 1f4043b37acd34dcc9d3d285958c75579d67232d Mon Sep 17 00:00:00 2001 From: Brian Matherly Date: Mon, 25 Jan 2010 04:53:45 +0000 Subject: [PATCH] Remove redundant calendar function from DateHandler. svn: r14124 --- src/DateHandler/_DateUtils.py | 12 ------------ src/GrampsCfg.py | 4 ++-- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/src/DateHandler/_DateUtils.py b/src/DateHandler/_DateUtils.py index bfc796dad..7b86932bf 100644 --- a/src/DateHandler/_DateUtils.py +++ b/src/DateHandler/_DateUtils.py @@ -30,7 +30,6 @@ Class handling language-specific selection for date parser and displayer. # #------------------------------------------------------------------------- from DateHandler import LANG_TO_DISPLAY, LANG, parser, displayer -import gen.lib.date #-------------------------------------------------------------- # @@ -81,14 +80,3 @@ def get_date(date_base) : def get_date_valid(date_base): date_obj = date_base.get_date_object() return date_obj.get_valid() - -def get_calendar_formats(): - """ - Return the list of supported calendars. - """ - cal = [] - - for calendar in gen.lib.date.Date.ui_calendar_names: - cal.append(calendar) - - return cal diff --git a/src/GrampsCfg.py b/src/GrampsCfg.py index 308f9dcbe..c0fe345c3 100644 --- a/src/GrampsCfg.py +++ b/src/GrampsCfg.py @@ -51,6 +51,7 @@ from gen.display.name import displayer as _nd from gen.display.name import NameDisplayError import Utils from gen.lib import Name +import gen.lib import ManagedWindow from gui.widgets import MarkupLabel, BasicLabel from QuestionDialog import ErrorDialog, QuestionDialog2, OkDialog @@ -688,8 +689,7 @@ class GrampsPreferences(ManagedWindow.ManagedWindow): # Calendar format on report: obox = gtk.combo_box_new_text() - formats = DateHandler.get_calendar_formats() - for item in formats: + for item in gen.lib.Date.ui_calendar_names: obox.append_text(item) active = config.get('preferences.calendar-format-report') if active >= len(formats):