[chronojump] ForceSensor exercise edit/delete buttons only if ex selected
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] ForceSensor exercise edit/delete buttons only if ex selected
- Date: Mon, 17 Feb 2020 18:16:34 +0000 (UTC)
commit a6d74252ec4f0162f3fa239f61db8567cb2c3d26
Author: Xavier de Blas <xaviblas gmail com>
Date: Mon Feb 17 19:15:57 2020 +0100
ForceSensor exercise edit/delete buttons only if ex selected
src/gui/app1/forceSensor.cs | 12 ++++++++++++
1 file changed, 12 insertions(+)
---
diff --git a/src/gui/app1/forceSensor.cs b/src/gui/app1/forceSensor.cs
index 87dd2424..e09fe43e 100644
--- a/src/gui/app1/forceSensor.cs
+++ b/src/gui/app1/forceSensor.cs
@@ -58,6 +58,8 @@ public partial class ChronoJumpWindow
[Widget] Gtk.SpinButton spin_force_sensor_calibration_kg_value;
[Widget] Gtk.Button button_force_sensor_image_save_signal;
[Widget] Gtk.DrawingArea force_capture_drawingarea;
+ [Widget] Gtk.Button button_force_sensor_exercise_edit;
+ [Widget] Gtk.Button button_force_sensor_exercise_delete;
ForceSensorExerciseWindow forceSensorExerciseWin;
ForceSensorElasticBandsWindow forceSensorElasticBandsWin;
@@ -2315,6 +2317,8 @@ LogB.Information(" fs R ");
//needed because the += EventHandler does not work on first fill of the combo
on_combo_force_sensor_exercise_changed (new object (), new EventArgs ());
+
+
combo_force_sensor_button_sensitive_exercise(UtilGtk.ComboGetActive(combo_force_sensor_exercise) != "");
}
private void on_combo_force_sensor_exercise_changed (object o, EventArgs args)
@@ -2327,6 +2331,7 @@ LogB.Information(" fs R ");
label_button_force_sensor_stiffness.Text = "0";
image_button_force_sensor_stiffness_problem.Visible = true;
button_force_sensor_stiffness.Visible = false;
+ combo_force_sensor_button_sensitive_exercise(false);
return;
}
@@ -2344,6 +2349,7 @@ LogB.Information(" fs R ");
image_button_force_sensor_stiffness_problem.Visible = false;
}
setLabelContactsExerciseSelected(Catalog.GetString(fse.Name));
+ combo_force_sensor_button_sensitive_exercise(true);
}
private void fillForceSensorExerciseCombo(string name)
@@ -2374,6 +2380,12 @@ LogB.Information(" fs R ");
combo_force_sensor_exercise.Active =
UtilGtk.ComboMakeActive(combo_force_sensor_exercise, name);
}
+ private void combo_force_sensor_button_sensitive_exercise(bool exerciseSelected)
+ {
+ button_force_sensor_exercise_edit.Sensitive = exerciseSelected;
+ button_force_sensor_exercise_delete.Sensitive = exerciseSelected;
+ }
+
void on_button_force_sensor_exercise_edit_clicked (object o, EventArgs args)
{
if(UtilGtk.ComboGetActive(combo_force_sensor_exercise) == "")
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]