[chronojump] Removed ShowOnlyBars from preferences



commit 9ee580ce4644c3b0e6853f16f622d36b36b345b3
Author: Xavier de Blas <xaviblas gmail com>
Date:   Mon Jul 19 13:49:42 2021 +0200

    Removed ShowOnlyBars from preferences

 glade/preferences_win.glade | 69 ++-------------------------------------------
 src/gui/preferences.cs      | 17 -----------
 2 files changed, 3 insertions(+), 83 deletions(-)
---
diff --git a/glade/preferences_win.glade b/glade/preferences_win.glade
index 67961a1ba..a7e8129bd 100644
--- a/glade/preferences_win.glade
+++ b/glade/preferences_win.glade
@@ -2655,69 +2655,6 @@ It starts before and arrives there with some speed.</property>
                                             <property name="visible">True</property>
                                             <property name="can_focus">False</property>
                                             <property name="spacing">8</property>
-                                            <child>
-                                              <widget class="GtkHBox" id="hbox30">
-                                                <property name="visible">True</property>
-                                                <property name="can_focus">False</property>
-                                                <property name="spacing">20</property>
-                                                <child>
-                                                  <widget class="GtkCheckButton" 
id="check_appearance_encoder_only_bars">
-                                                    <property name="label" translatable="yes">Show only 
bars</property>
-                                                    <property name="visible">True</property>
-                                                    <property name="can_focus">True</property>
-                                                    <property name="receives_default">False</property>
-                                                    <property name="draw_indicator">True</property>
-                                                    <signal name="toggled" 
handler="on_check_appearance_encoder_only_bars_toggled" swapped="no"/>
-                                                  </widget>
-                                                  <packing>
-                                                    <property name="expand">False</property>
-                                                    <property name="fill">False</property>
-                                                    <property name="position">0</property>
-                                                  </packing>
-                                                </child>
-                                                <child>
-                                                  <widget class="GtkHBox" id="hbox_restart">
-                                                    <property name="can_focus">False</property>
-                                                    <property name="spacing">12</property>
-                                                    <child>
-                                                      <widget class="GtkLabel" id="label73">
-                                                        <property name="visible">True</property>
-                                                        <property name="can_focus">False</property>
-                                                        <property name="xalign">0</property>
-                                                        <property name="label" translatable="yes">This 
change needs restarting Chronojump</property>
-                                                      </widget>
-                                                      <packing>
-                                                        <property name="expand">False</property>
-                                                        <property name="fill">False</property>
-                                                        <property name="position">0</property>
-                                                      </packing>
-                                                    </child>
-                                                    <child>
-                                                      <widget class="GtkImage" id="image2">
-                                                        <property name="visible">True</property>
-                                                        <property name="can_focus">False</property>
-                                                        <property name="stock">gtk-dialog-warning</property>
-                                                      </widget>
-                                                      <packing>
-                                                        <property name="expand">False</property>
-                                                        <property name="fill">False</property>
-                                                        <property name="position">1</property>
-                                                      </packing>
-                                                    </child>
-                                                  </widget>
-                                                  <packing>
-                                                    <property name="expand">False</property>
-                                                    <property name="fill">False</property>
-                                                    <property name="position">1</property>
-                                                  </packing>
-                                                </child>
-                                              </widget>
-                                              <packing>
-                                                <property name="expand">False</property>
-                                                <property name="fill">False</property>
-                                                <property name="position">0</property>
-                                              </packing>
-                                            </child>
                                             <child>
                                               <widget class="GtkLabel" id="label4">
                                                 <property name="visible">True</property>
@@ -2728,7 +2665,7 @@ It starts before and arrives there with some speed.</property>
                                               <packing>
                                                 <property name="expand">False</property>
                                                 <property name="fill">False</property>
-                                                <property name="position">1</property>
+                                                <property name="position">0</property>
                                               </packing>
                                             </child>
                                             <child>
@@ -2827,7 +2764,7 @@ It starts before and arrives there with some speed.</property>
                                               <packing>
                                                 <property name="expand">False</property>
                                                 <property name="fill">False</property>
-                                                <property name="position">2</property>
+                                                <property name="position">1</property>
                                               </packing>
                                             </child>
                                             <child>
@@ -2887,7 +2824,7 @@ It starts before and arrives there with some speed.</property>
                                               <packing>
                                                 <property name="expand">False</property>
                                                 <property name="fill">False</property>
-                                                <property name="position">3</property>
+                                                <property name="position">2</property>
                                               </packing>
                                             </child>
                                           </widget>
diff --git a/src/gui/preferences.cs b/src/gui/preferences.cs
index 43e2b02d9..93e850fe8 100644
--- a/src/gui/preferences.cs
+++ b/src/gui/preferences.cs
@@ -144,8 +144,6 @@ public class PreferencesWindow
        [Widget] Gtk.CheckButton checkbutton_encoder_capture_inertial_discard_first_n;
        [Widget] Gtk.HBox hbox_encoder_capture_inertial_discard_first_n;
        [Widget] Gtk.SpinButton spin_encoder_capture_inertial_discard_first_n;
-       [Widget] Gtk.CheckButton check_appearance_encoder_only_bars;
-       [Widget] Gtk.HBox hbox_restart;
        [Widget] Gtk.SpinButton spin_encoder_capture_show_only_some_bars;
        [Widget] Gtk.RadioButton radio_encoder_capture_show_all_bars;
        [Widget] Gtk.RadioButton radio_encoder_capture_show_only_some_bars;
@@ -655,11 +653,6 @@ public class PreferencesWindow
                        PreferencesWindowBox.hbox_encoder_capture_inertial_discard_first_n.Visible = false;
                }
 
-               if(preferences.encoderCaptureShowOnlyBars)
-                       PreferencesWindowBox.check_appearance_encoder_only_bars.Active = true;
-               else
-                       PreferencesWindowBox.check_appearance_encoder_only_bars.Active = false;
-
                if(preferences.encoderCaptureShowNRepetitions < 0) {
                        PreferencesWindowBox.radio_encoder_capture_show_all_bars.Active = true;
                        PreferencesWindowBox.spin_encoder_capture_show_only_some_bars.Value = 10;
@@ -1260,11 +1253,6 @@ public class PreferencesWindow
                check_appearance_person_photo.Sensitive = ! check_appearance_person_win_hide.Active;
        }
 
-       private void on_check_appearance_encoder_only_bars_toggled (object obj, EventArgs args) 
-       {
-               hbox_restart.Visible = ! check_appearance_encoder_only_bars.Active;
-       }
-
        private void on_checkbutton_encoder_capture_inertial_discard_first_n_toggled (object obj, EventArgs 
args)
        {
                hbox_encoder_capture_inertial_discard_first_n.Visible = 
(checkbutton_encoder_capture_inertial_discard_first_n.Active);
@@ -2055,11 +2043,6 @@ public class PreferencesWindow
                        preferences.encoderCaptureInertialDiscardFirstN = spinEncoderCaptureDiscardFirstN;
                }
 
-               if( preferences.encoderCaptureShowOnlyBars != 
PreferencesWindowBox.check_appearance_encoder_only_bars.Active ) {
-                       SqlitePreferences.Update("encoderCaptureShowOnlyBars", 
PreferencesWindowBox.check_appearance_encoder_only_bars.Active.ToString(), true);
-                       preferences.encoderCaptureShowOnlyBars = 
PreferencesWindowBox.check_appearance_encoder_only_bars.Active;
-               }
-
                if( preferences.encoderCaptureShowNRepetitions > 0 && 
PreferencesWindowBox.radio_encoder_capture_show_all_bars.Active )
                {
                        SqlitePreferences.Update("encoderCaptureShowNRepetitions", "-1", true);


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