[chronojump] 4 analyze modes and code reorganization (98%): Better genericWin
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] 4 analyze modes and code reorganization (98%): Better genericWin
- Date: Mon, 16 May 2016 11:58:43 +0000 (UTC)
commit 2aa893867cf115931d3be124480aca7787dcf550
Author: Xavier de Blas <xaviblas gmail com>
Date: Mon May 16 13:57:05 2016 +0200
4 analyze modes and code reorganization (98%): Better genericWin
src/gui/encoder.cs | 4 ++++
src/gui/encoderSelectRepetitions.cs | 1 +
src/gui/genericWindow.cs | 8 +++++++-
3 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/src/gui/encoder.cs b/src/gui/encoder.cs
index 85a2509..b3edb07 100644
--- a/src/gui/encoder.cs
+++ b/src/gui/encoder.cs
@@ -978,6 +978,10 @@ public partial class ChronoJumpWindow
void on_button_encoder_analyze_data_select_curves_clicked (object o, EventArgs args) {
encSelReps.FakeButtonDone.Clicked += new EventHandler(on_analyze_repetitions_selected);
+
+ if(genericWin.Type != GenericWindow.Types.ENCODER_SEL_REPS)
+ prepareAnalyzeRepetitions();
+
encSelReps.Show();
}
diff --git a/src/gui/encoderSelectRepetitions.cs b/src/gui/encoderSelectRepetitions.cs
index 985af4c..af1088b 100644
--- a/src/gui/encoderSelectRepetitions.cs
+++ b/src/gui/encoderSelectRepetitions.cs
@@ -100,6 +100,7 @@ public class EncoderSelectRepetitions
getData();
createBigArray();
createGenericWindow();
+ genericWin.Type = GenericWindow.Types.ENCODER_SEL_REPS;
return genericWin;
}
diff --git a/src/gui/genericWindow.cs b/src/gui/genericWindow.cs
index f1ef641..fde188b 100644
--- a/src/gui/genericWindow.cs
+++ b/src/gui/genericWindow.cs
@@ -110,6 +110,11 @@ public class GenericWindow
public int uniqueID;
public string nameUntranslated;
+ public enum Types { UNDEFINED, ENCODER_SESSION_LOAD, ENCODER_SEL_REPS };
+ //used to decide if a genericWin has to be recreated
+ public Types Type;
+
+
public GenericWindow ()
{
Glade.XML gladeXML;
@@ -139,7 +144,8 @@ public class GenericWindow
GenericWindowBox.image_delete.Pixbuf = pixbuf;
GenericWindowBox.label_header.Text = textHeader;
-
+
+ GenericWindowBox.Type = Types.UNDEFINED;
if(showNow)
GenericWindowBox.generic_window.Show ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]