[chronojump] encoderConfiguratinWin with manage. Done!
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] encoderConfiguratinWin with manage. Done!
- Date: Tue, 10 Jan 2017 09:44:07 +0000 (UTC)
commit fa9bfb2d0f9c0ea2eac671c99368302f56f4a905
Author: Xavier de Blas <xaviblas gmail com>
Date: Tue Jan 10 10:43:22 2017 +0100
encoderConfiguratinWin with manage. Done!
src/gui/chronojump.cs | 16 ++++++++++++----
src/gui/encoder.cs | 9 ++++-----
src/gui/encoderConfiguration.cs | 9 ++++++---
3 files changed, 22 insertions(+), 12 deletions(-)
---
diff --git a/src/gui/chronojump.cs b/src/gui/chronojump.cs
index 6ad7a32..0316a00 100644
--- a/src/gui/chronojump.cs
+++ b/src/gui/chronojump.cs
@@ -3073,8 +3073,12 @@ public partial class ChronoJumpWindow
menuitem_mode_selected_power_gravitatory.Visible = true;
//change encoderConfigurationCurrent if needed
- if(encoderConfigurationCurrent.has_inertia) {
- encoderConfigurationCurrent =
SqliteEncoderConfiguration.SelectActive(Constants.EncoderGI.GRAVITATORY).encoderConfiguration;
+ if(encoderConfigurationCurrent.has_inertia)
+ {
+ EncoderConfigurationSQLObject econfSO =
SqliteEncoderConfiguration.SelectActive(Constants.EncoderGI.GRAVITATORY);
+ encoderConfigurationCurrent = econfSO.encoderConfiguration;
+ label_encoder_selected.Text = econfSO.name;
+
changed = true;
}
@@ -3093,8 +3097,12 @@ public partial class ChronoJumpWindow
menuitem_mode_selected_power_inertial.Visible = true;
//change encoderConfigurationCurrent if needed
- if(! encoderConfigurationCurrent.has_inertia) {
- encoderConfigurationCurrent =
SqliteEncoderConfiguration.SelectActive(Constants.EncoderGI.INERTIAL).encoderConfiguration;
+ if(! encoderConfigurationCurrent.has_inertia)
+ {
+ EncoderConfigurationSQLObject econfSO =
SqliteEncoderConfiguration.SelectActive(Constants.EncoderGI.INERTIAL);
+ encoderConfigurationCurrent = econfSO.encoderConfiguration;
+ label_encoder_selected.Text = econfSO.name;
+
changed = true;
}
diff --git a/src/gui/encoder.cs b/src/gui/encoder.cs
index 74e637e..576e828 100644
--- a/src/gui/encoder.cs
+++ b/src/gui/encoder.cs
@@ -382,7 +382,9 @@ public partial class ChronoJumpWindow
encoder_pulsebar_analyze.Text = "";
//read from SQL
- encoderConfigurationCurrent =
SqliteEncoderConfiguration.SelectActive(Constants.EncoderGI.GRAVITATORY).encoderConfiguration;
+ EncoderConfigurationSQLObject econfSO =
SqliteEncoderConfiguration.SelectActive(Constants.EncoderGI.GRAVITATORY);
+ encoderConfigurationCurrent = econfSO.encoderConfiguration;
+ label_encoder_selected.Text = econfSO.name;
encoderCaptureListStore = new Gtk.ListStore (typeof (EncoderCurve));
@@ -450,6 +452,7 @@ public partial class ChronoJumpWindow
encoder_configuration_win.Button_close.Clicked -= new
EventHandler(on_encoder_configuration_win_closed);
EncoderConfiguration eConfNew = encoder_configuration_win.GetAcceptedValues();
+ label_encoder_selected.Text = encoder_configuration_win.Entry_save_name;
if(encoderConfigurationCurrent == eConfNew)
return;
@@ -476,8 +479,6 @@ public partial class ChronoJumpWindow
encoderConfigurationCurrent.inertiaTotal =
UtilEncoder.CalculeInertiaTotal(encoderConfigurationCurrent);
label_encoder_im_total.Text = encoderConfigurationCurrent.inertiaTotal.ToString();
}
-
- label_encoder_selected.Text = encoderConfigurationCurrent.code;
}
void on_combo_encoder_anchorage_changed (object o, EventArgs args) {
@@ -1442,8 +1443,6 @@ public partial class ChronoJumpWindow
}
else
notebook_encoder_capture_extra_mass.CurrentPage = 0;
-
- label_encoder_selected.Text = encoderConfigurationCurrent.code;
}
void encoderSignalDelete (string signalURL, int signalID)
diff --git a/src/gui/encoderConfiguration.cs b/src/gui/encoderConfiguration.cs
index 64779d9..785706f 100644
--- a/src/gui/encoderConfiguration.cs
+++ b/src/gui/encoderConfiguration.cs
@@ -844,12 +844,12 @@ public class EncoderConfigurationWindow
protected void on_delete_event (object o, DeleteEventArgs args)
{
- args.RetVal = true;
-
if(capturing)
button_encoder_capture_inertial_cancel.Click();
- on_button_close_clicked(new object(), new EventArgs());
+ button_close.Click();
+
+ args.RetVal = true;
}
public Button Button_close {
@@ -866,6 +866,9 @@ public class EncoderConfigurationWindow
// get { return button_encoder_capture_inertial_finish; }
//}
+ public string Entry_save_name {
+ get { return entry_save_name.Text; }
+ }
public double Spin_im_weight {
get { return spin_im_weight_calcule.Value; }
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]