[chronojump] jump simulated warning. TODO on other tests



commit e3138e146b282a920d6ae8c3e4af60f4c6bb1b25
Author: Xavier de Blas <xaviblas gmail com>
Date:   Wed Jan 2 17:56:15 2013 +0100

    jump simulated warning. TODO on other tests

 glade/chronojump.glade |   37 +++++++++++++++++++++++++++++++------
 src/execute/event.cs   |    3 +++
 src/execute/jump.cs    |    9 ++++++---
 src/gui/chronojump.cs  |    3 ++-
 4 files changed, 42 insertions(+), 10 deletions(-)
---
diff --git a/glade/chronojump.glade b/glade/chronojump.glade
index a2c074f..61b9255 100644
--- a/glade/chronojump.glade
+++ b/glade/chronojump.glade
@@ -663,7 +663,8 @@
                                                 <property name="can_focus">True</property>
                                                 <property name="receives_default">True</property>
                                                 <property name="has_tooltip">True</property>
-                                                <property name="tooltip" translatable="yes">Edit selected person (p)</property>
+                                                <property name="tooltip" translatable="yes">Edit selected person
+&lt;Control&gt;p</property>
                                                 <property name="use_action_appearance">False</property>
                                                 <signal name="clicked" handler="on_edit_current_person_clicked" swapped="no"/>
                                                 <accelerator key="p" signal="clicked" modifiers="GDK_CONTROL_MASK"/>
@@ -5825,13 +5826,37 @@ Second Chronopic to platforms.</property>
                                                       </packing>
                                                     </child>
                                                     <child>
-                                                      <widget class="GtkTextView" id="event_execute_textview_message">
+                                                      <widget class="GtkHBox" id="hbox105">
                                                         <property name="visible">True</property>
-                                                        <property name="sensitive">False</property>
                                                         <property name="can_focus">False</property>
-                                                        <property name="editable">False</property>
-                                                        <property name="wrap_mode">word</property>
-                                                        <property name="cursor_visible">False</property>
+                                                        <property name="spacing">4</property>
+                                                        <child>
+                                                          <widget class="GtkTextView" id="event_execute_textview_message">
+                                                            <property name="visible">True</property>
+                                                            <property name="sensitive">False</property>
+                                                            <property name="can_focus">True</property>
+                                                            <property name="editable">False</property>
+                                                            <property name="wrap_mode">word</property>
+                                                            <property name="cursor_visible">False</property>
+                                                          </widget>
+                                                          <packing>
+                                                            <property name="expand">True</property>
+                                                            <property name="fill">True</property>
+                                                            <property name="position">0</property>
+                                                          </packing>
+                                                        </child>
+                                                        <child>
+                                                          <widget class="GtkImage" id="image_simulated_warning">
+                                                            <property name="can_focus">False</property>
+                                                            <property name="stock">gtk-dialog-warning</property>
+                                                            <property name="icon-size">2</property>
+                                                          </widget>
+                                                          <packing>
+                                                            <property name="expand">False</property>
+                                                            <property name="fill">True</property>
+                                                            <property name="position">1</property>
+                                                          </packing>
+                                                        </child>
                                                       </widget>
                                                       <packing>
                                                         <property name="expand">True</property>
diff --git a/src/execute/event.cs b/src/execute/event.cs
index f7a0729..1dd9095 100644
--- a/src/execute/event.cs
+++ b/src/execute/event.cs
@@ -44,6 +44,8 @@ public class EventExecute
 		OFF
 	}
 
+	protected Gtk.Image image_simulated_warning;
+
 	//don't make the waitEvent update the progressBars, just flag this variable
 	//and make the PulseGTK do it
 	protected bool needUpdateEventProgressBar;
@@ -323,6 +325,7 @@ public class EventExecute
 		{
 			egd.Textview_message.Buffer = UtilGtk.TextViewPrint(feedbackMessage);
 			needShowFeedbackMessage = false;
+			image_simulated_warning.Visible = (feedbackMessage == Constants.SimulatedMessage);
 		}
 		
 		
diff --git a/src/execute/jump.cs b/src/execute/jump.cs
index 89885e4..80e0152 100644
--- a/src/execute/jump.cs
+++ b/src/execute/jump.cs
@@ -50,7 +50,8 @@ public class JumpExecute : EventExecute
 	//jump execution
 	public JumpExecute(int personID, string personName, int sessionID, string type, double fall, double weight,  
 			Chronopic cp, Gtk.TextView event_execute_textview_message, Gtk.Window app, int pDN, bool volumeOn,
-			double progressbarLimit, ExecutingGraphData egd, string description
+			double progressbarLimit, ExecutingGraphData egd, string description,
+			Gtk.Image image_simulated_warning
 			)
 	{
 		this.personID = personID;
@@ -69,6 +70,9 @@ public class JumpExecute : EventExecute
 		this.progressbarLimit = progressbarLimit;
 		this.egd = egd;
 		this.description = description;
+		
+		this.image_simulated_warning = image_simulated_warning;	
+
 	
 		if(TypeHasFall) {
 			hasFall = true;
@@ -84,8 +88,7 @@ public class JumpExecute : EventExecute
 			
 		needUpdateEventProgressBar = false;
 		needUpdateGraph = false;
-		
-
+	
 		//initialize eventDone as a Jump		
 		eventDone = new Jump();
 	}
diff --git a/src/gui/chronojump.cs b/src/gui/chronojump.cs
index 8b5d69b..16fad15 100644
--- a/src/gui/chronojump.cs
+++ b/src/gui/chronojump.cs
@@ -148,6 +148,7 @@ public partial class ChronoJumpWindow
 	[Widget] Gtk.Box hbox_execute_test;
 	[Widget] Gtk.Button button_execute_test;
 	[Widget] Gtk.Label label_connected_chronopics;
+	[Widget] Gtk.Image image_simulated_warning;
 	//[Widget] Gtk.TextView textview_message_connected_chronopics;
 	//[Widget] Gtk.Image image_connected_chronopics;
 
@@ -3109,7 +3110,7 @@ Console.WriteLine("X");
 		currentEventExecute = new JumpExecute(currentPerson.UniqueID, currentPerson.Name, 
 				currentSession.UniqueID, currentJumpType.Name, myFall, jumpWeight,
 				chronopicWin.CP, event_execute_textview_message, app1, prefsDigitsNumber, volumeOn,
-				progressbarLimit, egd, description);
+				progressbarLimit, egd, description, image_simulated_warning);
 
 		if (!chronopicWin.Connected) 
 			currentEventExecute.SimulateInitValues(rand);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]