[chronojump] Encoder analyze single instant (added time diff)
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Encoder analyze single instant (added time diff)
- Date: Fri, 5 Feb 2016 12:21:27 +0000 (UTC)
commit d5e926997c2931bee6986920362312408a51e850
Author: Xavier de Blas <xaviblas gmail com>
Date: Fri Feb 5 13:19:21 2016 +0100
Encoder analyze single instant (added time diff)
glade/chronojump.glade | 217 +++++++++++++++++++++++++++++-------------------
src/gui/encoder.cs | 5 +-
2 files changed, 134 insertions(+), 88 deletions(-)
---
diff --git a/glade/chronojump.glade b/glade/chronojump.glade
index 54a8151..8fd94cb 100644
--- a/glade/chronojump.glade
+++ b/glade/chronojump.glade
@@ -7952,6 +7952,9 @@ after time</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
</child>
<child>
@@ -9438,6 +9441,9 @@ after time</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="position">2</property>
@@ -10565,6 +10571,9 @@ after time</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="position">4</property>
@@ -18198,36 +18207,6 @@ on current Chronojump version.</property>
</packing>
</child>
<child>
- <widget class="GtkLabel"
id="label_encoder_analyze_average">
- <property name="can_focus">False</property>
- <property name="tooltip"
translatable="yes">Average</property>
- <property name="label"
translatable="yes">AVG</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- <property name="x_options"/>
- <property name="y_options"/>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel"
id="label_encoder_analyze_max">
- <property name="can_focus">False</property>
- <property name="tooltip"
translatable="yes">Maximum</property>
- <property name="label"
translatable="yes">Max</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
- <property name="x_options"/>
- <property name="y_options"/>
- </packing>
- </child>
- <child>
<widget class="GtkHBox" id="hbox194">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -18562,36 +18541,6 @@ on current Chronojump version.</property>
</packing>
</child>
<child>
- <widget class="GtkLabel"
id="label_needed_to_not_shrink">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- </widget>
- <packing>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- <property name="y_options"/>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel"
id="label_needed_to_not_shrink_1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="width_chars">8</property>
- </widget>
- <packing>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
- <property name="x_options"/>
- <property name="y_options"/>
- </packing>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
<widget class="GtkLabel" id="label150">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -18665,25 +18614,29 @@ on current Chronojump version.</property>
</packing>
</child>
<child>
- <widget class="GtkLabel"
id="label_needed_to_not_shrink1">
+ <widget class="GtkLabel"
id="label_encoder_analyze_displ_diff">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="width_chars">8</property>
</widget>
<packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
+ <property name="x_options"/>
<property name="y_options"/>
</packing>
</child>
<child>
- <widget class="GtkLabel"
id="label_encoder_analyze_diff">
+ <widget class="GtkLabel"
id="label_encoder_analyze_speed_diff">
+ <property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="tooltip"
translatable="yes">Difference</property>
- <property name="label"
translatable="yes">Diff</property>
+ <property name="width_chars">8</property>
</widget>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
+ <property name="left_attach">3</property>
+ <property name="right_attach">4</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="x_options"/>
@@ -18691,14 +18644,14 @@ on current Chronojump version.</property>
</packing>
</child>
<child>
- <widget class="GtkLabel"
id="label_encoder_analyze_displ_diff">
+ <widget class="GtkLabel"
id="label_encoder_analyze_accel_diff">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="width_chars">8</property>
</widget>
<packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
+ <property name="left_attach">4</property>
+ <property name="right_attach">5</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="x_options"/>
@@ -18706,14 +18659,14 @@ on current Chronojump version.</property>
</packing>
</child>
<child>
- <widget class="GtkLabel"
id="label_encoder_analyze_speed_diff">
+ <widget class="GtkLabel"
id="label_encoder_analyze_force_diff">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="width_chars">8</property>
</widget>
<packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
+ <property name="left_attach">5</property>
+ <property name="right_attach">6</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="x_options"/>
@@ -18721,14 +18674,14 @@ on current Chronojump version.</property>
</packing>
</child>
<child>
- <widget class="GtkLabel"
id="label_encoder_analyze_accel_diff">
+ <widget class="GtkLabel"
id="label_encoder_analyze_power_diff">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="width_chars">8</property>
</widget>
<packing>
- <property name="left_attach">4</property>
- <property name="right_attach">5</property>
+ <property name="left_attach">6</property>
+ <property name="right_attach">7</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="x_options"/>
@@ -18736,29 +18689,68 @@ on current Chronojump version.</property>
</packing>
</child>
<child>
- <widget class="GtkLabel"
id="label_encoder_analyze_force_diff">
- <property name="visible">True</property>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <widget class="GtkLabel"
id="label_encoder_analyze_diff">
<property name="can_focus">False</property>
- <property name="width_chars">8</property>
+ <property name="tooltip"
translatable="yes">Difference</property>
+ <property
name="xalign">0.95999997854232788</property>
+ <property name="label"
translatable="yes">Diff</property>
</widget>
<packing>
- <property name="left_attach">5</property>
- <property name="right_attach">6</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
- <property name="x_options"/>
+ <property name="x_options">GTK_FILL</property>
<property name="y_options"/>
</packing>
</child>
<child>
- <widget class="GtkLabel"
id="label_encoder_analyze_power_diff">
+ <placeholder/>
+ </child>
+ <child>
+ <widget class="GtkLabel"
id="label_encoder_analyze_average">
+ <property name="can_focus">False</property>
+ <property name="tooltip"
translatable="yes">Average</property>
+ <property
name="xalign">0.95999997854232788</property>
+ <property name="label"
translatable="yes">AVG</property>
+ </widget>
+ <packing>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"/>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <widget class="GtkLabel"
id="label_encoder_analyze_max">
+ <property name="can_focus">False</property>
+ <property name="tooltip"
translatable="yes">Maximum</property>
+ <property
name="xalign">0.95999997854232788</property>
+ <property name="label"
translatable="yes">Max</property>
+ </widget>
+ <packing>
+ <property name="top_attach">5</property>
+ <property name="bottom_attach">6</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"/>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel"
id="label_encoder_analyze_time_diff">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="width_chars">8</property>
</widget>
<packing>
- <property name="left_attach">6</property>
- <property name="right_attach">7</property>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="x_options"/>
@@ -23207,6 +23199,9 @@ by you</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
</child>
</widget>
@@ -24233,6 +24228,9 @@ by you</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
</child>
</widget>
@@ -25751,6 +25749,9 @@ by you</property>
<placeholder/>
</child>
<child>
+ <placeholder/>
+ </child>
+ <child>
<widget class="GtkButton" id="button_video_url">
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -26326,6 +26327,9 @@ by you</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">True</property>
@@ -38384,6 +38388,24 @@ options</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
</child>
</widget>
@@ -40451,6 +40473,18 @@ To differentiate between male and female, use the values 1/0, or m/f, or M/F on
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
</child>
</widget>
@@ -41725,9 +41759,6 @@ To differentiate between male and female, use the values 1/0, or m/f, or M/F on
<placeholder/>
</child>
<child>
- <placeholder/>
- </child>
- <child>
<widget class="GtkLabel" id="label218">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -42753,6 +42784,9 @@ To differentiate between male and female, use the values 1/0, or m/f, or M/F on
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
</child>
</widget>
@@ -46551,6 +46585,9 @@ It starts before and arrives there with some speed.</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="left_attach">2</property>
@@ -47241,6 +47278,9 @@ It starts before and arrives there with some speed.</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
</child>
</widget>
@@ -47946,6 +47986,9 @@ It starts before and arrives there with some speed.</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
</child>
</widget>
diff --git a/src/gui/encoder.cs b/src/gui/encoder.cs
index 2b7a8bc..d193573 100644
--- a/src/gui/encoder.cs
+++ b/src/gui/encoder.cs
@@ -152,6 +152,7 @@ public partial class ChronoJumpWindow
[Widget] Gtk.Label label_encoder_analyze_accel_b;
[Widget] Gtk.Label label_encoder_analyze_force_b;
[Widget] Gtk.Label label_encoder_analyze_power_b;
+ [Widget] Gtk.Label label_encoder_analyze_time_diff;
[Widget] Gtk.Label label_encoder_analyze_displ_diff;
[Widget] Gtk.Label label_encoder_analyze_speed_diff;
[Widget] Gtk.Label label_encoder_analyze_accel_diff;
@@ -5446,6 +5447,7 @@ public partial class ChronoJumpWindow
int msb = Convert.ToInt32(hscale_encoder_analyze_b.Value);
bool success = eai.CalculateRangeParams(msa, msb);
if(success) {
+ label_encoder_analyze_time_diff.Text = (msb - msa).ToString();
label_encoder_analyze_displ_diff.Text = Util.TrimDecimals(eai.GetParam("displ",msb) -
eai.GetParam("displ",msa), 1);
label_encoder_analyze_speed_diff.Text = Util.TrimDecimals(eai.GetParam("speed",msb) -
eai.GetParam("speed",msa), 2);
label_encoder_analyze_accel_diff.Text = Util.TrimDecimals(eai.GetParam("accel",msb) -
eai.GetParam("accel",msa), 2);
@@ -5477,6 +5479,7 @@ public partial class ChronoJumpWindow
label_encoder_analyze_accel_b.Visible = visible;
label_encoder_analyze_force_b.Visible = visible;
label_encoder_analyze_power_b.Visible = visible;
+ label_encoder_analyze_time_diff.Visible = visible;
label_encoder_analyze_displ_diff.Visible = visible;
label_encoder_analyze_speed_diff.Visible = visible;
label_encoder_analyze_accel_diff.Visible = visible;
@@ -5522,7 +5525,7 @@ public partial class ChronoJumpWindow
int xposb =
eai.GetVerticalLinePosition(Convert.ToInt32(hscale_encoder_analyze_b.Value));
if(xposb != xposa) {
- g.SetSourceRGBA(0.945, 0.84, 0.518, .5); //lighter yellow, half transp
+ g.SetSourceRGBA(0.906, 0.745, 0.098, .5); //Chronojump yellow, half
transp
g.Rectangle(xposa ,0, xposb-xposa,
drawingarea_encoder_analyze_cairo_pixbuf.Height);
g.Fill();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]