[chronojump] After encoder GUI gets english.Fixed related crash
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] After encoder GUI gets english.Fixed related crash
- Date: Sat, 2 Nov 2013 18:15:58 +0000 (UTC)
commit 3b28ba80eeb45e1e0e38d218cdc8cff27d87d05a
Author: Xavier de Blas <xaviblas gmail com>
Date: Sat Nov 2 13:49:41 2013 +0100
After encoder GUI gets english.Fixed related crash
src/gui/person.cs | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/src/gui/person.cs b/src/gui/person.cs
index 933135a..13aa9a6 100644
--- a/src/gui/person.cs
+++ b/src/gui/person.cs
@@ -1160,7 +1160,7 @@ public class PersonAddModifyWindow
//PersonAddModifyWindowBox.button_cancel.Hide();
PersonAddModifyWindowBox.person_win.Show ();
-
+
PersonAddModifyWindowBox.fillDialog ();
return PersonAddModifyWindowBox;
@@ -1272,6 +1272,9 @@ public class PersonAddModifyWindow
UtilGtk.ComboUpdate(combo_countries, myCountries, "");
combo_countries.Active = UtilGtk.ComboMakeActive(myCountries,
Catalog.GetString(Constants.CountryUndefined));
+
+ //create countriesTranslated, only with translated stuff
+ countriesTranslated = new String[1];
combo_countries.Changed += new EventHandler (on_combo_countries_changed);
@@ -1309,11 +1312,14 @@ public class PersonAddModifyWindow
label_date.Text = Catalog.GetString("Undefined");
else
label_date.Text = dateTime.ToLongDateString();
+
//country stuff
if(currentPerson.CountryID != Constants.CountryUndefinedID) {
string [] countryString = SqliteCountry.Select(currentPerson.CountryID);
+
combo_continents.Active = UtilGtk.ComboMakeActive(continentsTranslated,
Catalog.GetString(countryString[3]));
+
combo_countries.Active = UtilGtk.ComboMakeActive(countriesTranslated,
Catalog.GetString(countryString[1]));
}
@@ -1346,7 +1352,6 @@ public class PersonAddModifyWindow
TextBuffer tb2 = new TextBuffer (new TextTagTable());
tb2.Text = myPS.Comments;
textview_ps_comments.Buffer = tb2;
-
}
sport = SqliteSport.Select(mySportID);
@@ -1494,9 +1499,10 @@ public class PersonAddModifyWindow
private void on_combo_continents_changed(object o, EventArgs args) {
//Console.WriteLine("Changed");
-
+
if(UtilGtk.ComboGetActive(combo_continents) ==
Catalog.GetString(Constants.ContinentUndefined)) {
- countries [0] = Constants.CountryUndefinedID + ":" + Constants.CountryUndefined + ":"
+ Catalog.GetString(Constants.CountryUndefined);
+ countries [0] = Constants.CountryUndefinedID + ":" +
+ Constants.CountryUndefined + ":" +
Catalog.GetString(Constants.CountryUndefined);
countriesTranslated = new String[1];
countriesTranslated [0] = Catalog.GetString(Constants.CountryUndefined);
combo_countries.Sensitive = false;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]