[chronojump] EncoderRhythm - Better use clusters message



commit 4b58ccc91746214007ed08a2e1678dec5b108f1e
Author: Xavier de Blas <xaviblas gmail com>
Date:   Tue Feb 13 14:00:12 2018 +0100

    EncoderRhythm - Better use clusters message

 glade/repetitive_conditions.glade |   59 +++++++++++++++++++++++-------------
 src/gui/repetitiveConditions.cs   |   17 ++++++++++
 2 files changed, 55 insertions(+), 21 deletions(-)
---
diff --git a/glade/repetitive_conditions.glade b/glade/repetitive_conditions.glade
index 5fa28e9..526ac37 100644
--- a/glade/repetitive_conditions.glade
+++ b/glade/repetitive_conditions.glade
@@ -4027,13 +4027,45 @@
                                 <property name="can_focus">False</property>
                                 <property name="top_padding">10</property>
                                 <child>
-                                  <widget class="GtkCheckButton" id="check_rhythm_use_clusters">
-                                    <property name="label" translatable="yes">Use clusters</property>
+                                  <widget class="GtkHBox" id="hbox38">
                                     <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_rhythm_use_clusters_toggled" 
swapped="no"/>
+                                    <property name="can_focus">False</property>
+                                    <property name="spacing">8</property>
+                                    <child>
+                                      <widget class="GtkCheckButton" id="check_rhythm_use_clusters">
+                                        <property name="label" translatable="yes">Use clusters</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_rhythm_use_clusters_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="GtkButton" id="button_use_clusters_help">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="receives_default">True</property>
+                                        <signal name="clicked" handler="on_button_use_clusters_help_clicked" 
swapped="no"/>
+                                        <child>
+                                          <widget class="GtkImage" id="image_clusters_info">
+                                            <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">1</property>
+                                      </packing>
+                                    </child>
                                   </widget>
                                 </child>
                               </widget>
@@ -4155,21 +4187,6 @@
                                         <property name="position">1</property>
                                       </packing>
                                     </child>
-                                    <child>
-                                      <widget class="GtkTextView" id="textview_encoder_rhythm_clusters">
-                                        <property name="visible">True</property>
-                                        <property name="sensitive">False</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="text" translatable="yes">Set will end when user 
press Finish or Cancel or
-when there's no change in the encoder during this time:
-1.5 * Rest between clusters</property>
-                                      </widget>
-                                      <packing>
-                                        <property name="expand">True</property>
-                                        <property name="fill">True</property>
-                                        <property name="position">2</property>
-                                      </packing>
-                                    </child>
                                   </widget>
                                 </child>
                               </widget>
diff --git a/src/gui/repetitiveConditions.cs b/src/gui/repetitiveConditions.cs
index b0f1a98..af2eda0 100644
--- a/src/gui/repetitiveConditions.cs
+++ b/src/gui/repetitiveConditions.cs
@@ -169,6 +169,7 @@ public class RepetitiveConditionsWindow
        [Widget] Gtk.RadioButton radio_rest_after_ecc;
        [Widget] Gtk.SpinButton spin_rhythm_reps_cluster;
        [Widget] Gtk.SpinButton spin_rhythm_rest_clusters;
+       [Widget] Gtk.Image image_clusters_info;
 
        const int FEEDBACKPAGE = 0;
        const int RHYTHMPAGE = 1;
@@ -342,6 +343,9 @@ public class RepetitiveConditionsWindow
                image_encoder_power_lower.Pixbuf = pixbuf;
                image_encoder_peakpower_lower.Pixbuf = pixbuf;
                image_repetitive_test_bad.Pixbuf = pixbuf;
+
+               pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "image_info.png");
+               image_clusters_info.Pixbuf = pixbuf;
        }
 
        void on_button_test_clicked (object o, EventArgs args)
@@ -471,6 +475,7 @@ public class RepetitiveConditionsWindow
                        comboEncoderAutomaticVariableFillHistorical();
        }
 
+
        void on_spinbutton_encoder_automatic_greater_value_changed (object o, EventArgs args) {
                checkbutton_encoder_automatic_greater.Active = true;
        }
@@ -626,6 +631,18 @@ public class RepetitiveConditionsWindow
                vbox_rhythm_cluster.Visible = check_rhythm_use_clusters.Active;
        }
 
+       private void on_button_use_clusters_help_clicked (object o, EventArgs args)
+       {
+               new DialogMessage(
+                               Catalog.GetString("Use clusters"),
+                               Constants.MessageTypes.INFO,
+                               Catalog.GetString("Use clusters in order to group repetitions inside a set 
separated by rest time.")
+                               + "\n\n" +
+                               Catalog.GetString("Set will end when user press Finish or Cancel or when 
there's no change in the encoder during this time:\n" +
+                                       "1.5 * Rest between clusters") );
+       }
+
+
        private void on_button_rhythm_default_clicked (object o, EventArgs args)
        {
                //have default values


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