[chronojump] Fixed arms only on DJ and correct graph



commit 773926fde49cf33454c332327f02b1a6b9c08501
Author: Xavier de Blas <xaviblas gmail com>
Date:   Thu Mar 31 18:45:43 2011 +0200

    Fixed arms only on DJ and correct graph

 glade/chronojump.glade |    3 ++-
 src/gui/jump.cs        |   30 ++++++++++++++++++++----------
 2 files changed, 22 insertions(+), 11 deletions(-)
---
diff --git a/glade/chronojump.glade b/glade/chronojump.glade
index de336b3..9df4e76 100644
--- a/glade/chronojump.glade
+++ b/glade/chronojump.glade
@@ -13807,7 +13807,7 @@ by you</property>
                       <widget class="GtkViewport" id="viewport_mode">
                         <property name="visible">True</property>
                         <property name="resize_mode">queue</property>
-                        <property name="hadjustment">0 0 769 76.900000000000006 692.10000000000002 769</property>
+                        <property name="hadjustment">0 0 738 73.799999999999997 664.20000000000005 738</property>
                         <property name="shadow_type">out</property>
                         <child>
                           <widget class="GtkHButtonBox" id="hbuttonbox2">
@@ -16135,6 +16135,7 @@ weight</property>
                                                             <property name="can_focus">True</property>
                                                             <property name="receives_default">False</property>
                                                             <property name="draw_indicator">True</property>
+                                                            <signal name="clicked" handler="on_extra_window_jumps_check_dj_arms_clicked"/>
                                                           </widget>
                                                           <packing>
                                                             <property name="left_attach">1</property>
diff --git a/src/gui/jump.cs b/src/gui/jump.cs
index 60b1fb0..9f0fe81 100644
--- a/src/gui/jump.cs
+++ b/src/gui/jump.cs
@@ -952,12 +952,7 @@ partial class ChronoJumpWindow
 			extra_window_showFallData(myJumpType, true);
 		}
 		
-		//show technique (arms) only in DJ
-		if(myJumpType.StartIn || myJumpType.IsRepetitive || 
-				myJumpType.Name == Constants.TakeOffName || 
-				myJumpType.Name == Constants.TakeOffWeightName) {
-			extra_window_showTechniqueArmsData(false, false); //visible, sensitive
-		} else if(myJumpType.Name == "DJa" || myJumpType.Name == "DJna") { 
+		if(myJumpType.Name == "DJa" || myJumpType.Name == "DJna") { 
 			//on DJa and DJna (coming from More jumps) need to show technique data but not change
 			if(myJumpType.Name == "DJa")
 				extra_window_jumps_check_dj_arms.Active = true;
@@ -966,12 +961,15 @@ partial class ChronoJumpWindow
 
 			hasOptions = true;
 			extra_window_showTechniqueArmsData(true, false); //visible, sensitive
-		}
-		else {
+		} else if(myJumpType.Name == "DJ") { 
+			//user has pressed DJ button
 			hasOptions = true;
 			extra_window_jumps_check_dj_arms.Active = extra_window_jumps_arms;
+
+			on_extra_window_jumps_check_dj_arms_clicked(new object(), new EventArgs());
 			extra_window_showTechniqueArmsData(true, true); //visible, sensitive
-		}
+		} else 
+			extra_window_showTechniqueArmsData(false, false); //visible, sensitive
 		
 		extra_window_jumps_spinbutton_weight.Value = extra_window_jumps_weight;
 		extra_window_jumps_spinbutton_fall.Value = extra_window_jumps_fall;
@@ -1039,6 +1037,17 @@ partial class ChronoJumpWindow
 		extra_window_jumps_showNoOptions(myJumpType, hasOptions);
 	}
 
+	private void on_extra_window_jumps_check_dj_arms_clicked(object o, EventArgs args)
+	{
+		JumpType j = new JumpType();
+		if(extra_window_jumps_check_dj_arms.Active) 
+			j = new JumpType("DJa");
+		else
+			j = new JumpType("DJna");
+
+		changeTestImage(EventType.Types.JUMP.ToString(), j.Name, j.ImageFileName);
+	}
+
 
 	private void on_more_jumps_draw_image_test (object o, EventArgs args) {
 		currentEventType = new JumpType(jumpsMoreWin.SelectedEventName);
@@ -1121,7 +1130,7 @@ partial class ChronoJumpWindow
 		else if(type.Name == "CMJ") extra_window_radio_jump_cmj.Active = true;
 		else if(type.Name == "CMJl") extra_window_radio_jump_cmjl.Active = true;
 		else if(type.Name == "ABK") extra_window_radio_jump_abk.Active = true;
-		else if(type.Name == "DJ") extra_window_radio_jump_dj.Active = true;
+//		else if(type.Name == "DJ") extra_window_radio_jump_dj.Active = true;
 		else if(type.Name == "Rocket") extra_window_radio_jump_rocket.Active = true;
 		else if(type.Name == Constants.TakeOffName) extra_window_radio_jump_takeoff.Active = true;
 		else {
@@ -1217,6 +1226,7 @@ partial class ChronoJumpWindow
 		extra_window_jumps_rj_option = "%";
 	}
 	
+	
 	private string limitString()
 	{
 		if(extra_window_jumps_rj_jumpsLimited) 



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