[chronojump] race analyzer on analyze button, if we are on triggers tab then change tab to graph



commit 65455076345f665ccb0ad31a5f6f6b48c33ba1a0
Author: Xavier de Blas <xaviblas gmail com>
Date:   Thu Feb 17 17:17:53 2022 +0100

    race analyzer on analyze button, if we are on triggers tab then change tab to graph

 glade/app1.glade                  | 32 +++++++++++++++++++-------------
 src/gui/app1/runEncoderAnalyze.cs | 11 ++++++++++-
 2 files changed, 29 insertions(+), 14 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index baa2b26f6..ae48fa3a6 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -26221,6 +26221,9 @@ Concentric</property>
                                                             <child>
                                                             <placeholder/>
                                                             </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
                                                             </widget>
                                                             <packing>
                                                             <property name="expand">False</property>
@@ -29638,7 +29641,7 @@ Concentric</property>
                                                             <property name="show_tabs">False</property>
                                                             <property name="show_border">False</property>
                                                             <child>
-                                                            <widget class="GtkNotebook" id="notebook2">
+                                                            <widget class="GtkNotebook" 
id="notebook_run_encoder_analyze_current_set">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">True</property>
                                                             <property name="tab_pos">bottom</property>
@@ -32578,18 +32581,6 @@ Concentric</property>
                                                             <property name="can_focus">False</property>
                                                             <property name="spacing">6</property>
                                                             <child>
-                                                            <widget class="GtkLabel" 
id="label_video_encoder_tests_will_be_filmed">
-                                                            <property name="can_focus">False</property>
-                                                            <property name="label" translatable="yes">Tests 
will be filmed</property>
-                                                            </widget>
-                                                            <packing>
-                                                            <property name="expand">False</property>
-                                                            <property name="fill">False</property>
-                                                            <property name="pack_type">end</property>
-                                                            <property name="position">0</property>
-                                                            </packing>
-                                                            </child>
-                                                            <child>
                                                             <widget class="GtkHBox" 
id="hbox_video_encoder_capturing">
                                                             <property name="can_focus">False</property>
                                                             <property name="spacing">4</property>
@@ -32626,6 +32617,18 @@ Concentric</property>
                                                             </packing>
                                                             </child>
                                                             <child>
+                                                            <widget class="GtkLabel" 
id="label_video_encoder_tests_will_be_filmed">
+                                                            <property name="can_focus">False</property>
+                                                            <property name="label" translatable="yes">Tests 
will be filmed</property>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">False</property>
+                                                            <property name="fill">False</property>
+                                                            <property name="pack_type">end</property>
+                                                            <property name="position">0</property>
+                                                            </packing>
+                                                            </child>
+                                                            <child>
                                                             <widget class="GtkHBox" 
id="hbox_video_encoder_no_capturing">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
@@ -42094,6 +42097,9 @@ then click this button.</property>
                                                             <child>
                                                             <placeholder/>
                                                             </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
                                                             </widget>
                                                             <packing>
                                                             <property name="expand">False</property>
diff --git a/src/gui/app1/runEncoderAnalyze.cs b/src/gui/app1/runEncoderAnalyze.cs
index 17f379e51..e0319366b 100644
--- a/src/gui/app1/runEncoderAnalyze.cs
+++ b/src/gui/app1/runEncoderAnalyze.cs
@@ -28,7 +28,6 @@ using Mono.Unix;
 
 public partial class ChronoJumpWindow 
 {
-       [Widget] Gtk.Notebook notebook_run_encoder_analyze;
        [Widget] Gtk.CheckButton check_run_encoder_analyze_accel;
        [Widget] Gtk.CheckButton check_run_encoder_analyze_force;
        [Widget] Gtk.CheckButton check_run_encoder_analyze_power;
@@ -63,7 +62,11 @@ public partial class ChronoJumpWindow
        [Widget] Gtk.Label label_run_encoder_export_result;
        [Widget] Gtk.Button button_run_encoder_export_result_open;
 
+       [Widget] Gtk.Notebook notebook_run_encoder_analyze;
+       [Widget] Gtk.Notebook notebook_run_encoder_analyze_current_set;
+
        private enum notebook_run_encoder_analyze_pages { CURRENTSET, CURRENTSESSION, OPTIONS }
+       private enum notebook_run_encoder_analyze_current_set_pages { GRAPH, TABLE, TRIGGERS }
 
        private void createRunEncoderAnalyzeCombos ()
        {
@@ -200,6 +203,12 @@ public partial class ChronoJumpWindow
 
                if(lastRunEncoderFullPath != null && lastRunEncoderFullPath != "")
                        raceEncoderCopyToTempAndDoRGraph();
+
+               //move from triggers tab (if we are there) to graph tab
+               if(notebook_run_encoder_analyze_current_set.CurrentPage ==
+                               Convert.ToInt32(notebook_run_encoder_analyze_current_set_pages.TRIGGERS))
+                       notebook_run_encoder_analyze_current_set.CurrentPage =
+                               Convert.ToInt32(notebook_run_encoder_analyze_current_set_pages.GRAPH);
        }
 
        private void on_button_raceAnalyzer_table_save_clicked (object o, EventArgs args)


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