[chronojump] Encoder analyze 4 radiobuttons show animated text explanations
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Encoder analyze 4 radiobuttons show animated text explanations
- Date: Fri, 13 Dec 2019 10:28:45 +0000 (UTC)
commit b441fa4212e3711ae87c251203e33b570a51cdd9
Author: Xavier de Blas <xaviblas gmail com>
Date: Fri Dec 13 11:28:19 2019 +0100
Encoder analyze 4 radiobuttons show animated text explanations
glade/app1.glade | 167 +++++++++++++++++++++++++++++++++++++++------
src/gui/app1/chronojump.cs | 14 +++-
src/gui/encoder.cs | 63 +++++++++++------
3 files changed, 205 insertions(+), 39 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index 5152e5dd..c8868d74 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -22169,6 +22169,9 @@ Concentric</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
@@ -24416,18 +24419,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>
@@ -24464,6 +24455,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>
@@ -27223,7 +27226,7 @@ then click this button.</property>
<property name="tooltip"
translatable="yes">Individual / current set</property>
<property name="active">True</property>
<property name="draw_indicator">False</property>
- <signal name="toggled"
handler="on_radio_encoder_analyze_individual_current_set_toggled" swapped="no"/>
+ <signal name="toggled"
handler="on_radio_encoder_analyze_pre" swapped="no"/>
<child>
<widget class="GtkImage"
id="image_encoder_analyze_individual_current_set">
<property name="visible">True</property>
@@ -27247,7 +27250,7 @@ then click this button.</property>
<property name="active">True</property>
<property name="draw_indicator">False</property>
<property
name="group">radio_encoder_analyze_individual_current_set</property>
- <signal name="toggled"
handler="on_radio_encoder_analyze_individual_current_session_toggled" swapped="no"/>
+ <signal name="toggled"
handler="on_radio_encoder_analyze_pre" swapped="no"/>
<child>
<widget class="GtkImage"
id="image_encoder_analyze_individual_current_session">
<property name="visible">True</property>
@@ -27271,7 +27274,7 @@ then click this button.</property>
<property name="active">True</property>
<property name="draw_indicator">False</property>
<property
name="group">radio_encoder_analyze_individual_current_set</property>
- <signal name="toggled"
handler="on_radio_encoder_analyze_individual_all_sessions_toggled" swapped="no"/>
+ <signal name="toggled"
handler="on_radio_encoder_analyze_pre" swapped="no"/>
<child>
<widget class="GtkImage"
id="image_encoder_analyze_individual_all_sessions">
<property name="visible">True</property>
@@ -27295,7 +27298,7 @@ then click this button.</property>
<property name="active">True</property>
<property name="draw_indicator">False</property>
<property
name="group">radio_encoder_analyze_individual_current_set</property>
- <signal name="toggled"
handler="on_radio_encoder_analyze_groupal_current_session_toggled" swapped="no"/>
+ <signal name="toggled"
handler="on_radio_encoder_analyze_pre" swapped="no"/>
<child>
<widget class="GtkImage"
id="image_encoder_analyze_groupal_current_session">
<property name="visible">True</property>
@@ -27318,6 +27321,17 @@ then click this button.</property>
</packing>
</child>
<child>
+ <widget class="GtkNotebook"
id="notebook_encoder_analyze_data_options_animate_explanation">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="show_tabs">False</property>
+ <property name="show_border">False</property>
+ <child>
+ <widget class="GtkHBox" id="hbox173">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">20</property>
+ <child>
<widget class="GtkHBox"
id="hbox_encoder_analyze_current_signal">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -27387,7 +27401,7 @@ then click this button.</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>
@@ -27400,7 +27414,7 @@ then click this button.</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>
@@ -27544,7 +27558,119 @@ then click this button.</property>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label13">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">page
1</property>
+ </widget>
+ <packing>
+ <property name="tab_fill">False</property>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label28">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label"
translatable="yes">Individual / current set</property>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label19">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">page
2</property>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ <property name="tab_fill">False</property>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label185">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label"
translatable="yes">Individual / current session</property>
+ </widget>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label33">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">page
3</property>
+ </widget>
+ <packing>
+ <property name="position">2</property>
+ <property name="tab_fill">False</property>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label368">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label"
translatable="yes">Individual / all sessions</property>
+ </widget>
+ <packing>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label104">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">page
4</property>
+ </widget>
+ <packing>
<property name="position">3</property>
+ <property name="tab_fill">False</property>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label397">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label"
translatable="yes">Groupal / current session</property>
+ </widget>
+ <packing>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label113">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">page
5</property>
+ </widget>
+ <packing>
+ <property name="position">4</property>
+ <property name="tab_fill">False</property>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
</packing>
</child>
<child>
@@ -27558,7 +27684,7 @@ then click this button.</property>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="pack_type">end</property>
- <property name="position">4</property>
+ <property name="position">2</property>
</packing>
</child>
</widget>
@@ -31549,6 +31675,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 d45d3cd5..e80345b1 100644
--- a/src/gui/app1/chronojump.cs
+++ b/src/gui/app1/chronojump.cs
@@ -917,8 +917,20 @@ public partial class ChronoJumpWindow
}
public void on_radio_mode_encoder_analyze_small_toggled (object obj, EventArgs args) {
- if(radio_mode_encoder_analyze_small.Active)
+ if(radio_mode_encoder_analyze_small.Active)
+ {
notebook_encoder_sup.CurrentPage = 1;
+
+ //to display the explanation animation
+ if(radio_encoder_analyze_individual_current_set.Active)
+ on_radio_encoder_analyze_pre (radio_encoder_analyze_individual_current_set,
new EventArgs());
+ else if(radio_encoder_analyze_individual_current_session.Active)
+ on_radio_encoder_analyze_pre
(radio_encoder_analyze_individual_current_session, new EventArgs());
+ else if(radio_encoder_analyze_individual_all_sessions.Active)
+ on_radio_encoder_analyze_pre (radio_encoder_analyze_individual_all_sessions,
new EventArgs());
+ else if(radio_encoder_analyze_groupal_current_session.Active)
+ on_radio_encoder_analyze_pre (radio_encoder_analyze_groupal_current_session,
new EventArgs());
+ }
}
diff --git a/src/gui/encoder.cs b/src/gui/encoder.cs
index a9b0d7cf..4fa46be6 100644
--- a/src/gui/encoder.cs
+++ b/src/gui/encoder.cs
@@ -222,6 +222,7 @@ public partial class ChronoJumpWindow
[Widget] Gtk.Button button_encoder_analyze_table_save;
[Widget] Gtk.Button button_encoder_analyze_1RM_save;
+ [Widget] Gtk.Notebook notebook_encoder_analyze_data_options_animate_explanation;
[Widget] Gtk.RadioButton radio_encoder_analyze_individual_current_set;
[Widget] Gtk.RadioButton radio_encoder_analyze_individual_current_session;
[Widget] Gtk.RadioButton radio_encoder_analyze_individual_all_sessions;
@@ -3258,11 +3259,32 @@ public partial class ChronoJumpWindow
}
}
- private void on_radio_encoder_analyze_individual_current_set_toggled (object obj, EventArgs args)
+ private void on_radio_encoder_analyze_pre (object obj, EventArgs args)
+ {
+ if(obj == (object) radio_encoder_analyze_individual_current_set && ((Gtk.RadioButton)
obj).Active)
+ {
+ notebook_encoder_analyze_data_options_animate_explanation.CurrentPage = 1;
+ GLib.Timeout.Add(1000, new
GLib.TimeoutHandler(on_radio_encoder_analyze_individual_current_set));
+ }
+ else if(obj == (object) radio_encoder_analyze_individual_current_session &&
((Gtk.RadioButton) obj).Active)
+ {
+ notebook_encoder_analyze_data_options_animate_explanation.CurrentPage = 2;
+ GLib.Timeout.Add(1000, new
GLib.TimeoutHandler(on_radio_encoder_analyze_individual_current_session));
+ }
+ else if(obj == (object) radio_encoder_analyze_individual_all_sessions && ((Gtk.RadioButton)
obj).Active)
+ {
+ notebook_encoder_analyze_data_options_animate_explanation.CurrentPage = 3;
+ GLib.Timeout.Add(1000, new
GLib.TimeoutHandler(on_radio_encoder_analyze_individual_all_sessions));
+ }
+ else if(obj == (object) radio_encoder_analyze_groupal_current_session && ((Gtk.RadioButton)
obj).Active)
+ {
+ notebook_encoder_analyze_data_options_animate_explanation.CurrentPage = 4;
+ GLib.Timeout.Add(1000, new
GLib.TimeoutHandler(on_radio_encoder_analyze_groupal_current_session));
+ }
+ }
+
+ private bool on_radio_encoder_analyze_individual_current_set ()
{
- if(! radio_encoder_analyze_individual_current_set.Active)
- return;
-
//not called here
//prepareAnalyzeRepetitions();
@@ -3299,13 +3321,13 @@ public partial class ChronoJumpWindow
hbox_encoder_analyze_current_signal.Visible = true;
showTriggersAndTab();
+
+ notebook_encoder_analyze_data_options_animate_explanation.CurrentPage = 0;
+ return false; //do not call this again
}
-
- private void on_radio_encoder_analyze_individual_current_session_toggled (object obj, EventArgs args)
+
+ private bool on_radio_encoder_analyze_individual_current_session ()
{
- if(! radio_encoder_analyze_individual_current_session.Active)
- return;
-
updateEncoderAnalyzeExercisesPre();
prepareAnalyzeRepetitions();
@@ -3354,13 +3376,13 @@ public partial class ChronoJumpWindow
hbox_encoder_analyze_current_signal.Visible = false;
showTriggerTab(false);
+
+ notebook_encoder_analyze_data_options_animate_explanation.CurrentPage = 0;
+ return false; //do not call this again
}
-
- private void on_radio_encoder_analyze_individual_all_sessions_toggled (object obj, EventArgs args)
+
+ private bool on_radio_encoder_analyze_individual_all_sessions ()
{
- if(! radio_encoder_analyze_individual_all_sessions.Active)
- return;
-
updateEncoderAnalyzeExercisesPre();
prepareAnalyzeRepetitions();
@@ -3391,13 +3413,13 @@ public partial class ChronoJumpWindow
button_encoder_monthly_change_current_session.Visible = false;
showTriggerTab(false);
+
+ notebook_encoder_analyze_data_options_animate_explanation.CurrentPage = 0;
+ return false; //do not call this again
}
-
- private void on_radio_encoder_analyze_groupal_current_session_toggled (object obj, EventArgs args)
+
+ private bool on_radio_encoder_analyze_groupal_current_session ()
{
- if(! radio_encoder_analyze_groupal_current_session.Active)
- return;
-
updateEncoderAnalyzeExercisesPre();
prepareAnalyzeRepetitions();
@@ -3427,6 +3449,9 @@ public partial class ChronoJumpWindow
button_encoder_monthly_change_current_session.Visible = false;
showTriggerTab(false);
+
+ notebook_encoder_analyze_data_options_animate_explanation.CurrentPage = 0;
+ return false; //do not call this again
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]