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()
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 ] )
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()