Example #1
0
 def refresh(lctrl):
     wx.BeginBusyCursor()
     provinces = gmDemographicRecord.get_regions()
     lctrl.set_string_items([(p['l10n_country'], p['l10n_region'])
                             for p in provinces])
     lctrl.set_data(provinces)
     wx.EndBusyCursor()
Example #2
0
def configure_default_region(parent=None):

	if parent is None:
		parent = wx.GetApp().GetTopWindow()

	regs = gmDemographicRecord.get_regions()

	gmCfgWidgets.configure_string_from_list_option (
		parent = parent,
		message = _('Select the default region (state/province/county/territory/arrondissement/prefecture/department/kanton/...) for new persons.\n'),
		option = 'person.create.default_region',
		bias = 'user',
		choices = [ (r['l10n_country'], r['l10n_region'], r['code_region']) for r in regs ],
		columns = [_('Country'), _('Region'), _('Code')],
		data = [ r['region'] for r in regs ]
	)
Example #3
0
def configure_default_region(parent=None):

	if parent is None:
		parent = wx.GetApp().GetTopWindow()

	regs = gmDemographicRecord.get_regions()

	gmCfgWidgets.configure_string_from_list_option (
		parent = parent,
		message = _('Select the default region (state/province/county/territory/arrondissement/prefecture/department/kanton/...) for new persons.\n'),
		option = 'person.create.default_region',
		bias = 'user',
		choices = [ (r['l10n_country'], r['l10n_region'], r['code_region']) for r in regs ],
		columns = [_('Country'), _('Region'), _('Code')],
		data = [ r['region'] for r in regs ]
	)
Example #4
0
	def refresh(lctrl):
		wx.BeginBusyCursor()
		provinces = gmDemographicRecord.get_regions()
		lctrl.set_string_items([ (p['l10n_country'], p['l10n_region']) for p in provinces ])
		lctrl.set_data(provinces)
		wx.EndBusyCursor()