[chronojump] encoder recalculate to main gui



commit ebc1ace29e1c523bc56c7f6eb9712e2e0eb5a262
Author: Xavier de Blas <xaviblas gmail com>
Date:   Sun May 18 09:25:32 2014 +0200

    encoder recalculate to main gui

 glade/chronojump.glade |  265 ++++++++++++++++++++++++------------------------
 src/gui/chronojump.cs  |    1 +
 src/gui/encoder.cs     |   15 +--
 3 files changed, 138 insertions(+), 143 deletions(-)
---
diff --git a/glade/chronojump.glade b/glade/chronojump.glade
index a867da2..838b108 100644
--- a/glade/chronojump.glade
+++ b/glade/chronojump.glade
@@ -441,101 +441,125 @@
                                       <widget class="GtkHBox" id="hbox126">
                                         <property name="visible">True</property>
                                         <property name="can_focus">False</property>
-                                        <property name="spacing">2</property>
+                                        <property name="spacing">6</property>
                                         <child>
-                                          <widget class="GtkButton" id="button_person_add_single">
+                                          <widget class="GtkHBox" id="hbox77">
                                             <property name="visible">True</property>
-                                            <property name="can_focus">True</property>
-                                            <property name="can_default">True</property>
-                                            <property name="receives_default">True</property>
-                                            <property name="has_tooltip">True</property>
-                                            <property name="tooltip" translatable="yes">New person</property>
-                                            <property name="use_action_appearance">False</property>
-                                            <signal name="clicked" handler="on_person_add_single_activate" 
swapped="no"/>
+                                            <property name="can_focus">False</property>
+                                            <property name="spacing">2</property>
                                             <child>
-                                              <widget class="GtkImage" id="image_persons_new_1">
+                                              <widget class="GtkButton" id="button_person_add_single">
                                                 <property name="visible">True</property>
-                                                <property name="can_focus">False</property>
-                                                <property name="stock">gtk-new</property>
+                                                <property name="can_focus">True</property>
+                                                <property name="can_default">True</property>
+                                                <property name="receives_default">True</property>
+                                                <property name="has_tooltip">True</property>
+                                                <property name="tooltip" translatable="yes">New 
person</property>
+                                                <property name="use_action_appearance">False</property>
+                                                <signal name="clicked" 
handler="on_person_add_single_activate" swapped="no"/>
+                                                <child>
+                                                  <widget class="GtkImage" id="image_persons_new_1">
+                                                    <property name="visible">True</property>
+                                                    <property name="can_focus">False</property>
+                                                    <property name="stock">gtk-new</property>
+                                                  </widget>
+                                                </child>
                                               </widget>
+                                              <packing>
+                                                <property name="expand">False</property>
+                                                <property name="fill">False</property>
+                                                <property name="position">0</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="GtkButton" id="button_person_add_multiple">
-                                            <property name="visible">True</property>
-                                            <property name="can_focus">True</property>
-                                            <property name="can_default">True</property>
-                                            <property name="receives_default">True</property>
-                                            <property name="has_tooltip">True</property>
-                                            <property name="tooltip" translatable="yes">New persons 
(multiple)</property>
-                                            <property name="use_action_appearance">False</property>
-                                            <signal name="clicked" handler="on_person_add_multiple_clicked" 
swapped="no"/>
                                             <child>
-                                              <widget class="GtkImage" id="image_persons_new_plus">
+                                              <widget class="GtkButton" id="button_person_add_multiple">
                                                 <property name="visible">True</property>
-                                                <property name="can_focus">False</property>
-                                                <property name="stock">gtk-new</property>
+                                                <property name="can_focus">True</property>
+                                                <property name="can_default">True</property>
+                                                <property name="receives_default">True</property>
+                                                <property name="has_tooltip">True</property>
+                                                <property name="tooltip" translatable="yes">New persons 
(multiple)</property>
+                                                <property name="use_action_appearance">False</property>
+                                                <signal name="clicked" 
handler="on_person_add_multiple_clicked" swapped="no"/>
+                                                <child>
+                                                  <widget class="GtkImage" id="image_persons_new_plus">
+                                                    <property name="visible">True</property>
+                                                    <property name="can_focus">False</property>
+                                                    <property name="stock">gtk-new</property>
+                                                  </widget>
+                                                </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">1</property>
+                                            <property name="position">0</property>
                                           </packing>
                                         </child>
                                         <child>
-                                          <widget class="GtkButton" id="button_recuperate_person">
+                                          <widget class="GtkHBox" id="hbox78">
                                             <property name="visible">True</property>
-                                            <property name="can_focus">True</property>
-                                            <property name="can_default">True</property>
-                                            <property name="receives_default">True</property>
-                                            <property name="has_tooltip">True</property>
-                                            <property name="tooltip" translatable="yes">Load 
person</property>
-                                            <property name="use_action_appearance">False</property>
-                                            <signal name="clicked" handler="on_recuperate_person_clicked" 
swapped="no"/>
+                                            <property name="can_focus">False</property>
+                                            <property name="spacing">2</property>
                                             <child>
-                                              <widget class="GtkImage" id="image_persons_open_1">
+                                              <widget class="GtkButton" id="button_recuperate_person">
                                                 <property name="visible">True</property>
-                                                <property name="can_focus">False</property>
-                                                <property name="stock">gtk-open</property>
+                                                <property name="can_focus">True</property>
+                                                <property name="can_default">True</property>
+                                                <property name="receives_default">True</property>
+                                                <property name="has_tooltip">True</property>
+                                                <property name="tooltip" translatable="yes">Load 
person</property>
+                                                <property name="use_action_appearance">False</property>
+                                                <signal name="clicked" 
handler="on_recuperate_person_clicked" swapped="no"/>
+                                                <child>
+                                                  <widget class="GtkImage" id="image_persons_open_1">
+                                                    <property name="visible">True</property>
+                                                    <property name="can_focus">False</property>
+                                                    <property name="stock">gtk-open</property>
+                                                  </widget>
+                                                </child>
                                               </widget>
+                                              <packing>
+                                                <property name="expand">False</property>
+                                                <property name="fill">False</property>
+                                                <property name="position">0</property>
+                                              </packing>
                                             </child>
-                                          </widget>
-                                          <packing>
-                                            <property name="expand">False</property>
-                                            <property name="fill">False</property>
-                                            <property name="position">2</property>
-                                          </packing>
-                                        </child>
-                                        <child>
-                                          <widget class="GtkButton" 
id="button_recuperate_persons_from_session">
-                                            <property name="visible">True</property>
-                                            <property name="can_focus">True</property>
-                                            <property name="can_default">True</property>
-                                            <property name="receives_default">True</property>
-                                            <property name="has_tooltip">True</property>
-                                            <property name="tooltip" translatable="yes">Load persons from 
other session</property>
-                                            <property name="use_action_appearance">False</property>
-                                            <signal name="clicked" 
handler="on_recuperate_persons_from_session_clicked" swapped="no"/>
                                             <child>
-                                              <widget class="GtkImage" id="image_persons_open_plus">
+                                              <widget class="GtkButton" 
id="button_recuperate_persons_from_session">
                                                 <property name="visible">True</property>
-                                                <property name="can_focus">False</property>
-                                                <property name="stock">gtk-open</property>
+                                                <property name="can_focus">True</property>
+                                                <property name="can_default">True</property>
+                                                <property name="receives_default">True</property>
+                                                <property name="has_tooltip">True</property>
+                                                <property name="tooltip" translatable="yes">Load persons 
from other session</property>
+                                                <property name="use_action_appearance">False</property>
+                                                <signal name="clicked" 
handler="on_recuperate_persons_from_session_clicked" swapped="no"/>
+                                                <child>
+                                                  <widget class="GtkImage" id="image_persons_open_plus">
+                                                    <property name="visible">True</property>
+                                                    <property name="can_focus">False</property>
+                                                    <property name="stock">gtk-open</property>
+                                                  </widget>
+                                                </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">3</property>
+                                            <property name="position">1</property>
                                           </packing>
                                         </child>
                                       </widget>
@@ -11825,7 +11849,7 @@ on current Chronojump version.</property>
                                                         <property name="width_request">170</property>
                                                         <property name="visible">True</property>
                                                         <property name="can_focus">False</property>
-                                                        <property name="spacing">6</property>
+                                                        <property name="spacing">4</property>
                                                         <child>
                                                           <widget class="GtkButton" 
id="button_encoder_capture_options">
                                                             <property name="visible">True</property>
@@ -11853,7 +11877,6 @@ on current Chronojump version.</property>
                                                         </child>
                                                         <child>
                                                           <widget class="GtkButton" 
id="button_encoder_capture">
-                                                            <property name="width_request">160</property>
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">True</property>
                                                             <property name="can_default">True</property>
@@ -11902,6 +11925,30 @@ on current Chronojump version.</property>
                                                             <property name="position">1</property>
                                                           </packing>
                                                         </child>
+                                                        <child>
+                                                          <widget class="GtkButton" 
id="button_encoder_bells">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">True</property>
+                                                            <property name="receives_default">True</property>
+                                                            <property name="has_tooltip">True</property>
+                                                            <property name="tooltip" 
translatable="yes">Feedback</property>
+                                                            <property 
name="use_action_appearance">False</property>
+                                                            <property name="xalign">0</property>
+                                                            <signal name="clicked" 
handler="on_button_encoder_bells_clicked" swapped="no"/>
+                                                            <child>
+                                                            <widget class="GtkImage" id="image_encoder_bell">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property 
name="stock">gtk-missing-image</property>
+                                                            </widget>
+                                                            </child>
+                                                          </widget>
+                                                          <packing>
+                                                            <property name="expand">False</property>
+                                                            <property name="fill">False</property>
+                                                            <property name="position">2</property>
+                                                          </packing>
+                                                        </child>
                                                       </widget>
                                                       <packing>
                                                         <property name="expand">False</property>
@@ -11913,10 +11960,9 @@ on current Chronojump version.</property>
                                                       <widget class="GtkHBox" 
id="hbox_encoder_capture_doing">
                                                         <property name="width_request">170</property>
                                                         <property name="can_focus">False</property>
-                                                        <property name="spacing">6</property>
+                                                        <property name="spacing">4</property>
                                                         <child>
                                                           <widget class="GtkProgressBar" 
id="encoder_pulsebar_capture">
-                                                            <property name="width_request">110</property>
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
                                                             <property name="activity_mode">True</property>
@@ -11924,7 +11970,7 @@ on current Chronojump version.</property>
                                                             <property 
name="pulse_step">0.050000000000000003</property>
                                                           </widget>
                                                           <packing>
-                                                            <property name="expand">False</property>
+                                                            <property name="expand">True</property>
                                                             <property name="fill">True</property>
                                                             <property name="position">0</property>
                                                           </packing>
@@ -11999,7 +12045,7 @@ on current Chronojump version.</property>
                                                   <widget class="GtkHBox" id="hbox58">
                                                     <property name="visible">True</property>
                                                     <property name="can_focus">False</property>
-                                                    <property name="spacing">10</property>
+                                                    <property name="spacing">4</property>
                                                     <child>
                                                       <widget class="GtkButton" 
id="button_encoder_load_signal">
                                                         <property name="visible">True</property>
@@ -12018,7 +12064,7 @@ on current Chronojump version.</property>
                                                         </child>
                                                       </widget>
                                                       <packing>
-                                                        <property name="expand">True</property>
+                                                        <property name="expand">False</property>
                                                         <property name="fill">True</property>
                                                         <property name="position">0</property>
                                                       </packing>
@@ -12049,47 +12095,49 @@ on current Chronojump version.</property>
                                                       </packing>
                                                     </child>
                                                     <child>
-                                                      <widget class="GtkButton" 
id="button_encoder_export_all_curves">
+                                                      <widget class="GtkButton" 
id="button_encoder_delete_signal">
                                                         <property name="visible">True</property>
+                                                        <property name="sensitive">False</property>
                                                         <property name="can_focus">True</property>
                                                         <property name="receives_default">True</property>
+                                                        <property name="has_tooltip">True</property>
+                                                        <property name="tooltip" translatable="yes">Delete 
signal</property>
                                                         <property 
name="use_action_appearance">False</property>
-                                                        <signal name="clicked" 
handler="on_button_encoder_export_all_curves_clicked" swapped="no"/>
+                                                        <signal name="clicked" 
handler="on_button_encoder_delete_signal_clicked" swapped="no"/>
                                                         <child>
-                                                          <widget class="GtkImage" id="image41">
+                                                          <widget class="GtkImage" 
id="image_encoder_signal_delete">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
-                                                            <property name="stock">gtk-convert</property>
+                                                            <property name="stock">gtk-delete</property>
                                                           </widget>
                                                         </child>
                                                       </widget>
                                                       <packing>
                                                         <property name="expand">False</property>
                                                         <property name="fill">True</property>
+                                                        <property name="pack_type">end</property>
                                                         <property name="position">2</property>
                                                       </packing>
                                                     </child>
                                                     <child>
-                                                      <widget class="GtkButton" 
id="button_encoder_delete_signal">
+                                                      <widget class="GtkButton" 
id="button_encoder_export_all_curves">
                                                         <property name="visible">True</property>
-                                                        <property name="sensitive">False</property>
                                                         <property name="can_focus">True</property>
                                                         <property name="receives_default">True</property>
-                                                        <property name="has_tooltip">True</property>
-                                                        <property name="tooltip" translatable="yes">Delete 
signal</property>
                                                         <property 
name="use_action_appearance">False</property>
-                                                        <signal name="clicked" 
handler="on_button_encoder_delete_signal_clicked" swapped="no"/>
+                                                        <signal name="clicked" 
handler="on_button_encoder_export_all_curves_clicked" swapped="no"/>
                                                         <child>
-                                                          <widget class="GtkImage" 
id="image_encoder_signal_delete">
+                                                          <widget class="GtkImage" id="image41">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
-                                                            <property name="stock">gtk-delete</property>
+                                                            <property name="stock">gtk-convert</property>
                                                           </widget>
                                                         </child>
                                                       </widget>
                                                       <packing>
                                                         <property name="expand">False</property>
                                                         <property name="fill">True</property>
+                                                        <property name="pack_type">end</property>
                                                         <property name="position">3</property>
                                                       </packing>
                                                     </child>
@@ -20070,7 +20118,7 @@ comments</property>
           <widget class="GtkTable" id="table7">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
-            <property name="n_rows">7</property>
+            <property name="n_rows">6</property>
             <property name="n_columns">2</property>
             <property name="column_spacing">12</property>
             <property name="row_spacing">8</property>
@@ -20319,55 +20367,6 @@ comments</property>
               </packing>
             </child>
             <child>
-              <widget class="GtkLabel" id="label4">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">Feedback</property>
-              </widget>
-              <packing>
-                <property name="top_attach">6</property>
-                <property name="bottom_attach">7</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkHBox" id="hbox1">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <child>
-                  <widget class="GtkButton" id="button_encoder_bells">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">True</property>
-                    <property name="has_tooltip">True</property>
-                    <property name="tooltip" translatable="yes">Bells</property>
-                    <property name="use_action_appearance">False</property>
-                    <property name="xalign">0</property>
-                    <signal name="clicked" handler="on_button_encoder_bells_clicked" swapped="no"/>
-                    <child>
-                      <widget class="GtkImage" id="image_encoder_bell">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="stock">gtk-missing-image</property>
-                      </widget>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">False</property>
-                    <property name="position">0</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="right_attach">2</property>
-                <property name="top_attach">6</property>
-                <property name="bottom_attach">7</property>
-                <property name="x_options">GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
               <widget class="GtkLabel" id="label7">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
diff --git a/src/gui/chronojump.cs b/src/gui/chronojump.cs
index 8365ef5..e8c524f 100644
--- a/src/gui/chronojump.cs
+++ b/src/gui/chronojump.cs
@@ -700,6 +700,7 @@ public partial class ChronoJumpWindow
                pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "stock_bell.png");
                image_jump_reactive_bell.Pixbuf = pixbuf;
                image_run_interval_bell.Pixbuf = pixbuf;
+               image_encoder_bell.Pixbuf = pixbuf;
                
                pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "preferences-system.png");
                image_jump_reactive_repair.Pixbuf = pixbuf;
diff --git a/src/gui/encoder.cs b/src/gui/encoder.cs
index adb8762..45e5c76 100644
--- a/src/gui/encoder.cs
+++ b/src/gui/encoder.cs
@@ -47,7 +47,7 @@ public partial class ChronoJumpWindow
        [Widget] Gtk.Box hbox_encoder_capture_wait;
        [Widget] Gtk.Box hbox_encoder_capture_doing;
        [Widget] Gtk.Button button_encoder_capture;
-       [Widget] Gtk.Button button_encoder_bells;
+       [Widget] Gtk.Image image_encoder_bell;
        [Widget] Gtk.Button button_encoder_capture_cancel;
        [Widget] Gtk.Button button_encoder_capture_finish;
        [Widget] Gtk.Button button_encoder_recalculate;
@@ -347,6 +347,10 @@ public partial class ChronoJumpWindow
                //update the bars graph because main variable maybe has changed
        }
        
+       private void on_button_encoder_bells_clicked(object o, EventArgs args) {
+               repetitiveConditionsWin.View(Constants.BellModes.ENCODER, volumeOn);
+       }
+
        private bool encoderCheckPort() {
                if(chronopicWin.GetEncoderPort() == Util.GetDefaultPort()) {
                        new DialogMessage(Constants.MessageTypes.WARNING, 
@@ -4589,7 +4593,6 @@ public class EncoderCaptureOptionsWindow {
        [Widget] public Gtk.SpinButton spin_encoder_capture_curves_height_range;
        [Widget] Gtk.Box hbox_combo_main_variable;
        [Widget] Gtk.ComboBox combo_main_variable;
-       [Widget] Gtk.Image image_encoder_bell;
        [Widget] public Gtk.CheckButton check_show_start_and_duration;
        [Widget] Gtk.Button button_close;
        
@@ -4612,10 +4615,6 @@ public class EncoderCaptureOptionsWindow {
                UtilGtk.IconWindow(encoder_capture_options);
                
                FakeButtonClose = new Gtk.Button();
-               
-               //putNonStandardIcons
-               Pixbuf pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "stock_bell.png");
-               image_encoder_bell.Pixbuf = pixbuf;
        }
 
        
@@ -4685,10 +4684,6 @@ public class EncoderCaptureOptionsWindow {
                return -1;
        }
 
-       private void on_button_encoder_bells_clicked(object o, EventArgs args) {
-               repetitiveConditionsWin.View(Constants.BellModes.ENCODER, volumeOn);
-       }
-
        protected virtual void on_button_close_clicked (object o, EventArgs args)
        {
                EncoderCaptureOptionsWindowBox.encoder_capture_options.Hide();


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