[chronojump] contacts hpaned showing both starts at the middle, and disabled combo_pulses (TODO: enable it again)



commit e171aacd33cb1c80f60c5154edf27dff8b538724
Author: Xavier de Blas <xaviblas gmail com>
Date:   Thu Aug 5 21:02:15 2021 +0200

    contacts hpaned showing both starts at the middle, and disabled combo_pulses (TODO: enable it again)

 glade/app1.glade                  | 121 ++++++++++++--------------------------
 src/gui/app1/chronojump.cs        |  26 +++++---
 src/gui/app1/chronojumpPersons.cs |   2 +-
 3 files changed, 56 insertions(+), 93 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index b8622cdfe..f6c10199f 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -8034,7 +8034,7 @@ EncoderInertialCapture</property>
                                                             </packing>
                                                             </child>
                                                             <child>
-                                                            <widget class="GtkHPaned" id="hpaned1">
+                                                            <widget class="GtkHPaned" 
id="hpaned_contacts_graph_table">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">True</property>
                                                             <child>
@@ -10966,43 +10966,39 @@ EncoderInertialCapture</property>
                                                             </packing>
                                                             </child>
                                                             <child>
-                                                            <widget class="GtkVBox" id="vbox87">
-                                                            <property name="visible">True</property>
-                                                            <property name="can_focus">False</property>
-                                                            <child>
-                                                            <widget class="GtkAlignment" id="alignment124">
-                                                            <property name="visible">True</property>
-                                                            <property name="can_focus">False</property>
-                                                            <property name="top_padding">4</property>
-                                                            <child>
-                                                            <widget class="GtkVBox" id="vbox130">
+                                                            <widget class="GtkHBox" id="hbox282">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
-                                                            <property name="spacing">4</property>
+                                                            <property name="spacing">2</property>
                                                             <child>
-                                                            <widget class="GtkHBox" id="hbox271">
+                                                            <widget class="GtkScrolledWindow" 
id="scrolledwindow25">
+                                                            <property name="width_request">200</property>
                                                             <property name="visible">True</property>
-                                                            <property name="can_focus">False</property>
-                                                            <property name="spacing">12</property>
+                                                            <property name="can_focus">True</property>
+                                                            <property 
name="hscrollbar_policy">automatic</property>
+                                                            <property 
name="vscrollbar_policy">automatic</property>
+                                                            <property name="shadow_type">etched-in</property>
                                                             <child>
-                                                            <widget class="GtkHBox" id="hbox_combo_pulses">
+                                                            <widget class="GtkTreeView" id="treeview_pulses">
                                                             <property name="visible">True</property>
-                                                            <property name="can_focus">False</property>
-                                                            <child>
-                                                            <placeholder/>
+                                                            <property name="can_focus">True</property>
+                                                            <property name="rules_hint">True</property>
+                                                            <property name="enable_search">False</property>
+                                                            <signal name="button_release_event" 
handler="on_treeview_button_release_event" swapped="no"/>
+                                                            </widget>
                                                             </child>
                                                             </widget>
                                                             <packing>
-                                                            <property name="expand">False</property>
+                                                            <property name="expand">True</property>
                                                             <property name="fill">True</property>
                                                             <property name="position">0</property>
                                                             </packing>
                                                             </child>
                                                             <child>
-                                                            <widget class="GtkHBox" id="hbox128">
+                                                            <widget class="GtkVBox" id="vbox38">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
-                                                            <property name="spacing">4</property>
+                                                            <property name="spacing">6</property>
                                                             <child>
                                                             <widget class="GtkButton" 
id="button_pulses_zoom">
                                                             <property name="visible">True</property>
@@ -11121,59 +11117,8 @@ EncoderInertialCapture</property>
                                                             </child>
                                                             </widget>
                                                             <packing>
-                                                            <property name="expand">True</property>
-                                                            <property name="fill">True</property>
-                                                            <property name="position">1</property>
-                                                            </packing>
-                                                            </child>
-                                                            </widget>
-                                                            <packing>
-                                                            <property name="expand">True</property>
-                                                            <property name="fill">True</property>
-                                                            <property name="position">0</property>
-                                                            </packing>
-                                                            </child>
-                                                            </widget>
-                                                            </child>
-                                                            </widget>
-                                                            <packing>
                                                             <property name="expand">False</property>
                                                             <property name="fill">False</property>
-                                                            <property name="position">0</property>
-                                                            </packing>
-                                                            </child>
-                                                            <child>
-                                                            <widget class="GtkHBox" id="hbox282">
-                                                            <property name="visible">True</property>
-                                                            <property name="can_focus">False</property>
-                                                            <child>
-                                                            <widget class="GtkScrolledWindow" 
id="scrolledwindow25">
-                                                            <property name="width_request">200</property>
-                                                            <property name="visible">True</property>
-                                                            <property name="can_focus">True</property>
-                                                            <property 
name="hscrollbar_policy">automatic</property>
-                                                            <property 
name="vscrollbar_policy">automatic</property>
-                                                            <property name="shadow_type">etched-in</property>
-                                                            <child>
-                                                            <widget class="GtkTreeView" id="treeview_pulses">
-                                                            <property name="visible">True</property>
-                                                            <property name="can_focus">True</property>
-                                                            <property name="rules_hint">True</property>
-                                                            <property name="enable_search">False</property>
-                                                            <signal name="button_release_event" 
handler="on_treeview_button_release_event" swapped="no"/>
-                                                            </widget>
-                                                            </child>
-                                                            </widget>
-                                                            <packing>
-                                                            <property name="expand">True</property>
-                                                            <property name="fill">True</property>
-                                                            <property name="position">0</property>
-                                                            </packing>
-                                                            </child>
-                                                            </widget>
-                                                            <packing>
-                                                            <property name="expand">True</property>
-                                                            <property name="fill">True</property>
                                                             <property name="position">1</property>
                                                             </packing>
                                                             </child>
@@ -25572,6 +25517,9 @@ Concentric</property>
                                                             <child>
                                                             <placeholder/>
                                                             </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
                                                             </widget>
                                                             <packing>
                                                             <property name="expand">False</property>
@@ -31883,6 +31831,18 @@ 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>
@@ -31919,18 +31879,6 @@ 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>
@@ -41202,6 +41150,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/chronojump.cs b/src/gui/app1/chronojump.cs
index 80d3d5bff..4c2231371 100644
--- a/src/gui/app1/chronojump.cs
+++ b/src/gui/app1/chronojump.cs
@@ -166,6 +166,7 @@ public partial class ChronoJumpWindow
        [Widget] Gtk.Image image_encoder_capture_finish;
        [Widget] Gtk.Image image_encoder_capture_cancel;
 
+       [Widget] Gtk.HPaned hpaned_contacts_graph_table;
        [Widget] Gtk.TreeView treeview_persons;
        [Widget] Gtk.TreeView treeview_jumps;
        [Widget] Gtk.TreeView treeview_jumps_rj;
@@ -198,7 +199,7 @@ public partial class ChronoJumpWindow
        [Widget] Gtk.Image image_line_person_max;
        [Widget] Gtk.Image image_line_person_max_all_sessions;
 
-       [Widget] Gtk.Box hbox_combo_pulses;
+//     [Widget] Gtk.Box hbox_combo_pulses;
        [Widget] Gtk.VBox vbox_jumps;
        //[Widget] Gtk.Box hbox_jumps_test;
        [Widget] Gtk.Box hbox_jumps_rj;
@@ -222,7 +223,7 @@ public partial class ChronoJumpWindow
        CjComboSelectRunsI comboSelectRunsI;
        CjCombo comboSelectContactsTop;
 
-       [Widget] Gtk.ComboBox combo_pulses;
+//     [Widget] Gtk.ComboBox combo_pulses;
 
        //menu person
        [Widget] Gtk.Button button_persons_up;
@@ -660,7 +661,7 @@ public partial class ChronoJumpWindow
                createComboSelectRunsInterval(true);
 
                //reaction_times has no combo
-               createComboPulses();
+               //createComboPulses();
                //createComboMultiChronopic();
                createdStatsWin = false;
 
@@ -2363,6 +2364,7 @@ public partial class ChronoJumpWindow
 
        //no need of reationTimes
 
+       /*
        private void createComboPulses() {
                combo_pulses = ComboBox.NewText();
                UtilGtk.ComboUpdate(combo_pulses, 
SqlitePulseType.SelectPulseTypes(Constants.AllPulsesNameStr(), true), ""); //without filter, only select name
@@ -2374,6 +2376,7 @@ public partial class ChronoJumpWindow
                hbox_combo_pulses.ShowAll();
                combo_pulses.Sensitive = false;
        }
+       */
 
        /*
        private void createComboMultiChronopic() 
@@ -2616,7 +2619,8 @@ public partial class ChronoJumpWindow
 
        //no need of reationTimes because is done in:
        //gui/reactionTime on_extra_window_reaction_times_test_changed()
-       
+
+       /*
        private void on_combo_pulses_changed(object o, EventArgs args)
        {
                //combo_pulses.Changed -= new EventHandler (on_combo_pulses_changed);
@@ -2632,6 +2636,7 @@ public partial class ChronoJumpWindow
                treeview_pulses_storeReset();
                fillTreeView_pulses(myText);
        }
+       */
 
 
        /* ---------------------------------------------------------
@@ -3212,7 +3217,7 @@ public partial class ChronoJumpWindow
                        pre_fillTreeView_jumps_rj(false);
                        pre_fillTreeView_runs(false);
                        pre_fillTreeView_runs_interval(false);
-                       on_combo_pulses_changed(combo_pulses, args);
+                       //on_combo_pulses_changed(combo_pulses, args);
 
                        //currently no combo_reaction_times
                        treeview_reaction_times_storeReset();
@@ -3901,6 +3906,10 @@ public partial class ChronoJumpWindow
                vbox_contacts_capture_graph.Visible = check_contacts_capture_graph.Active;
                notebook_results.Visible = check_contacts_capture_table.Active;
 
+               //when showing both widgets, start at the middle
+               if(vbox_contacts_capture_graph.Visible && notebook_results.Visible)
+                       hpaned_contacts_graph_table.Position = 
Convert.ToInt32(hpaned_contacts_graph_table.Allocation.Width / 2.0);
+
                if (check_contacts_capture_graph.Active || check_contacts_capture_table.Active)
                        hbox_contacts_capture_show_need_one.Visible = false;
                else
@@ -3909,7 +3918,6 @@ public partial class ChronoJumpWindow
                if(current_mode == Constants.Modes.JUMPSSIMPLE || current_mode == Constants.Modes.RUNSSIMPLE)
                        hbox_contacts_simple_graph_controls.Visible = check_contacts_capture_graph.Active;
 
-
                /*
                   update the preferences variable
                   note as can be changed while capturing, it will be saved to SQL on exit
@@ -6430,6 +6438,7 @@ LogB.Debug("mc finished 5");
        }
        
        private void on_edit_selected_pulse_accepted (object o, EventArgs args) {
+               /*
                LogB.Information("edit selected pulse accepted");
                
                Pulse myPulse = SqlitePulse.SelectPulseData( myTreeViewPulses.EventSelectedID, false );
@@ -6441,6 +6450,7 @@ LogB.Debug("mc finished 5");
                        treeview_pulses_storeReset();
                        fillTreeView_pulses(UtilGtk.ComboGetActive(combo_pulses));
                }
+               */
        }
        
        private void on_edit_selected_multi_chronopic_clicked (object o, EventArgs args) {
@@ -7070,10 +7080,12 @@ LogB.Debug("mc finished 5");
        }
        
        private void on_repair_selected_pulse_accepted (object o, EventArgs args) {
+       /*
                LogB.Information("repair selected pulse accepted");
                
                treeview_pulses_storeReset();
                fillTreeView_pulses(UtilGtk.ComboGetActive(combo_pulses));
+               */
        }
 
        private void on_repair_selected_multi_chronopic_clicked (object o, EventArgs args) {
@@ -8031,7 +8043,7 @@ LogB.Debug("mc finished 5");
                combo_select_jumps_rj.Sensitive = true;
                combo_select_runs.Sensitive = true;
                combo_select_runs_interval.Sensitive = true;
-               combo_pulses.Sensitive = true;
+               //combo_pulses.Sensitive = true;
                
                vbox_execute_test.Sensitive = true;
        }
diff --git a/src/gui/app1/chronojumpPersons.cs b/src/gui/app1/chronojumpPersons.cs
index 636a4433f..f184d1d84 100644
--- a/src/gui/app1/chronojumpPersons.cs
+++ b/src/gui/app1/chronojumpPersons.cs
@@ -335,7 +335,7 @@ public partial class ChronoJumpWindow
                        pre_fillTreeView_jumps_rj(false);
                        pre_fillTreeView_runs(false);
                        pre_fillTreeView_runs_interval(false);
-                       on_combo_pulses_changed(combo_pulses, args);
+//                     on_combo_pulses_changed(combo_pulses, args);
 
                        if(createdStatsWin) {
                                stats_win_fillTreeView_stats(false, true);


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