[chronojump] Jump, JumpRj, run, runI execute status icons only called on their respective modes
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Jump, JumpRj, run, runI execute status icons only called on their respective modes
- Date: Thu, 25 Aug 2022 12:18:45 +0000 (UTC)
commit 65610a0aeb94517c342a60ebaf7cecab467cecb5
Author: Xavier de Blas <xaviblas gmail com>
Date: Thu Aug 25 14:17:39 2022 +0200
Jump, JumpRj, run, runI execute status icons only called on their respective modes
src/execute/event.cs | 79 +++++++++++++++++++++++++++++-----------------------
1 file changed, 44 insertions(+), 35 deletions(-)
---
diff --git a/src/execute/event.cs b/src/execute/event.cs
index 654861944..c35131cc7 100644
--- a/src/execute/event.cs
+++ b/src/execute/event.cs
@@ -233,13 +233,13 @@ public class EventExecute
if ( ! thread.IsAlive || cancel) {
LogB.ThreadEnding();
- //TODO: only for mode jump
- //don't show any of the jumpChangeImage icons
- jumpChangeImageForceHide();
-
- //TODO: only for mode run
- //don't show any of the runChangeImage icons
- runChangeImageForceHide();
+ //don't show any of the change image icons
+ if (this.GetType ().Equals (typeof (JumpExecute)) ||
+ this.GetType ().Equals (typeof (JumpRjExecute)))
+ jumpChangeImageForceHide();
+ else if (this.GetType ().Equals (typeof (RunExecute)) ||
+ this.GetType ().Equals (typeof (RunIntervalExecute)))
+ runChangeImageForceHide();
fakeButtonThreadDyed.Click();
@@ -339,42 +339,53 @@ public class EventExecute
needSensitiveButtonFinish = false;
}
+ // jump specific --------------------------------->
+ if (this.GetType ().Equals (typeof (JumpExecute)) ||
+ this.GetType ().Equals (typeof (JumpRjExecute)))
+ jumpChangeImageIfNeeded ();
+
// races specific --------------------------------->
//TODO: pass mode and only do what related to mode
- jumpChangeImageIfNeeded ();
- runChangeImageIfNeeded ();
+ if (this.GetType ().Equals (typeof (RunExecute)) ||
+ this.GetType ().Equals (typeof (RunIntervalExecute)))
+ {
+ runChangeImageIfNeeded ();
- updateRunPhaseInfoManage();
+ updateRunPhaseInfoManage();
- //Race track with DoubleContacts mode NONE
- if(needCallTrackDone)
- {
- trackDone();
- needCallTrackDone = false;
- }
- //Race track with DoubleContacts mode != NONE
- //LogB.Information("needCheckIfTrackEnded: " + needCheckIfTrackEnded.ToString());
- if(needCheckIfTrackEnded && lastTfCheckTimeEnded())
- {
- if(trackDone())
+ //Race track with DoubleContacts mode NONE
+ if(needCallTrackDone)
{
- //LogB.Information("needCheckIfTrackEnded changing to false");
- needCheckIfTrackEnded = false;
- } else {
- //LogB.Information("needCheckIfTrackEnded continue true, trackDone() will be
called again");
- //this helps to fix when contact time display when it is bigger than double
contact time * 1.5
+ trackDone();
+ needCallTrackDone = false;
+ }
+ //Race track with DoubleContacts mode != NONE
+ //LogB.Information("needCheckIfTrackEnded: " + needCheckIfTrackEnded.ToString());
+ if(needCheckIfTrackEnded && lastTfCheckTimeEnded())
+ {
+ if(trackDone())
+ {
+ //LogB.Information("needCheckIfTrackEnded changing to false");
+ needCheckIfTrackEnded = false;
+ } else {
+ //LogB.Information("needCheckIfTrackEnded continue true, trackDone()
will be called again");
+ //this helps to fix when contact time display when it is bigger than
double contact time * 1.5
+ }
+ }
+
+ //RSA
+ if(needShowCountDown)
+ {
+ feedbackMessage = countDownMessage();
+ UtilGtk.PrintLabelWithTooltip(egd.Label_message, feedbackMessage);
}
}
- //RSA
- if(needShowCountDown)
- {
- feedbackMessage = countDownMessage();
- UtilGtk.PrintLabelWithTooltip(egd.Label_message, feedbackMessage);
- }
- else if(needShowFeedbackMessage)
+ // <-------------------------- end of races specific
+
+ if(! needShowCountDown && needShowFeedbackMessage)
{
if (feedbackMessageOnDialog)
{
@@ -385,8 +396,6 @@ public class EventExecute
needShowFeedbackMessage = false;
}
- // <-------------------------- end of races specific
-
//check if it should finish by time
if(shouldFinishByTime()) {
finish = true;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]