private void on_combo_continents_changed(object o, EventArgs args)
{
if(UtilGtk.ComboGetActive(combo_continents) == Catalog.GetString(Constants.ContinentUndefined)) {
countries [0] = Constants.CountryUndefinedID + ":" + Constants.CountryUndefined + ":" + Catalog.GetString(Constants.CountryUndefined);
countriesTranslated = new String[1];
countriesTranslated [0] = Catalog.GetString(Constants.CountryUndefined);
combo_countries.Sensitive = false;
}
else {
//get the active continent
string continentEnglish = Util.FindOnArray(':', 1, 0, UtilGtk.ComboGetActive(combo_continents), continents);
countries = SqliteCountry.SelectCountriesOfAContinent(continentEnglish, true); //put undefined first
//create countries translated, only with translated stuff
countriesTranslated = new String[countries.Length];
int i = 0;
foreach(string row in countries) {
string [] myStrFull = row.Split(new char[] {':'});
countriesTranslated[i++] = myStrFull[2];
}
}
//sort array (except first row)
System.Array.Sort(countriesTranslated, 1, countriesTranslated.Length-1);
UtilGtk.ComboUpdate(combo_countries, countriesTranslated, "");
combo_countries.Active = UtilGtk.ComboMakeActive(countriesTranslated,
Catalog.GetString(Constants.CountryUndefined));
combo_countries.Sensitive = true;
on_entries_required_changed(new object(), new EventArgs());
}