3410: holidays.xml is reported to not load from user's plugin directory

svn: r13704
This commit is contained in:
Doug Blank 2009-12-05 03:16:56 +00:00
parent f18c6c9189
commit 4cc6d3f904
2 changed files with 15 additions and 3 deletions

View File

@ -406,8 +406,13 @@ class CalendarOptions(MenuReportOptions):
country = EnumeratedListOption(_("Country for holidays"), 0)
holiday_table = libholiday.HolidayTable()
countries = holiday_table.get_countries()
countries.sort()
if (len(countries) == 0 or
(len(countries) > 0 and countries[0] != '')):
countries.insert(0, '')
count = 0
for c in holiday_table.get_countries():
for c in countries:
country.add_item(count, c)
count += 1
country.set_help(_("Select the country to see associated holidays"))

View File

@ -1202,8 +1202,15 @@ class WebCalOptions(MenuReportOptions):
country = EnumeratedListOption(_('Country for holidays'), 0 )
holiday_table = libholiday.HolidayTable()
for index, item in enumerate(holiday_table.get_countries()):
country.add_item(index, item)
countries = holiday_table.get_countries()
countries.sort()
if (len(countries) == 0 or
(len(countries) > 0 and countries[0] != '')):
countries.insert(0, '')
count = 0
for c in countries:
country.add_item(count, c)
count += 1
country.set_help(_("Holidays will be included for the selected "
"country"))
menu.add_option(category_name, "country", country)