[chronojump] fixed GUI error on runType selection on new GUI since 1.4.2'
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] fixed GUI error on runType selection on new GUI since 1.4.2'
- Date: Tue, 3 Jun 2014 09:07:58 +0000 (UTC)
commit 4b0d03a244aefaacf1de408af2d234ed610ca9a9
Author: Xavier de Blas <xaviblas gmail com>
Date: Tue Jun 3 03:32:54 2014 +0200
fixed GUI error on runType selection on new GUI since 1.4.2'
src/gui/run.cs | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
---
diff --git a/src/gui/run.cs b/src/gui/run.cs
index 2f0f76a..3f0c0cb 100644
--- a/src/gui/run.cs
+++ b/src/gui/run.cs
@@ -929,11 +929,22 @@ partial class ChronoJumpWindow
private RunType previousRunType; //used on More to turnback if cancel or delete event is pressed
private RunType previousRunIntervalType; //used on More to turnback if cancel or delete event is
pressed
+
+ //creates and if is not predefined, checks database to gather all the data
+ private RunType createRunType(string name) {
+ RunType t = new RunType(name);
+
+ if(! t.IsPredefined) {
+ t = SqliteRunType.SelectAndReturnRunType(name, false);
+ t.ImageFileName = SqliteEvent.GraphLinkSelectFileName("run", name);
+ }
+ return t;
+ }
private void on_extra_window_runs_test_changed(object o, EventArgs args)
{
string runEnglishName = Util.FindOnArray(':',2,1, UtilGtk.ComboGetActive(combo_select_runs),
selectRunsString);
- currentRunType = new RunType(runEnglishName);
+ currentRunType = createRunType(runEnglishName);
extra_window_runs_initialize(currentRunType);
}
@@ -1055,7 +1066,7 @@ partial class ChronoJumpWindow
{
runsMoreWin.Button_accept.Clicked -= new EventHandler(on_more_runs_accepted);
- currentRunType = new RunType(runsMoreWin.SelectedEventName);
+ currentRunType = createRunType(runsMoreWin.SelectedEventName);
extra_window_runs_initialize(currentRunType);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]