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

svn: r13703
This commit is contained in:
Doug Blank 2009-12-05 03:09:21 +00:00
parent fc48e51d1c
commit e07455b891
2 changed files with 15 additions and 3 deletions

View File

@ -413,8 +413,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

@ -1434,8 +1434,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)