[chronojump] vbox_inertial_instructions at side of hpaned_encoder
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] vbox_inertial_instructions at side of hpaned_encoder
- Date: Mon, 19 Jul 2021 12:10:39 +0000 (UTC)
commit fd49cbca0337bb2f9436ce85676d61fa2f6d58d1
Author: Xavier de Blas <xaviblas gmail com>
Date: Mon Jul 19 12:33:35 2021 +0200
vbox_inertial_instructions at side of hpaned_encoder
glade/app1.glade | 486 +++++++++++++++++++++++-------------------------
src/gui/app1/encoder.cs | 24 ++-
2 files changed, 244 insertions(+), 266 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index b32d4b1e6..39095be4c 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -32420,12 +32420,6 @@ Concentric</property>
<property name="can_focus">True</property>
<property name="position">400</property>
<child>
- <widget class="GtkNotebook"
id="notebook_encoder_capture_or_inertial_instructions">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="show_tabs">False</property>
- <property name="show_border">False</property>
- <child>
<widget class="GtkVBox" id="vbox105">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -32756,256 +32750,6 @@ Concentric</property>
</packing>
</child>
</widget>
- </child>
- <child>
- <widget class="GtkLabel" id="label158">
- <property name="can_focus">False</property>
- <property name="label">graph and maybe
table</property>
- </widget>
- <packing>
- <property name="tab_fill">False</property>
- <property name="type">tab</property>
- </packing>
- </child>
- <child>
- <widget class="GtkVBox" id="vbox81">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="border_width">10</property>
- <property name="spacing">12</property>
- <child>
- <widget class="GtkLabel" id="label135">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label"><b>Initial
calibration</b></property>
- <property name="use_markup">True</property>
- <property name="justify">center</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="image_encoder_inertial_instructions">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property
name="stock">gtk-missing-image</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <widget class="GtkHBox" id="hbox189">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <widget class="GtkVBox" id="vbox41">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">12</property>
- <child>
- <widget class="GtkLabel" id="label136">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Start
with the rope completely unwrapped,
-then click this button.</property>
- <property name="use_markup">True</property>
- <property name="justify">center</property>
- </widget>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkVButtonBox" id="vbuttonbox2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">30</property>
- <property name="layout_style">start</property>
- <child>
- <widget class="GtkButton"
id="button_encoder_inertial_calibrate">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="relief">half</property>
- <signal name="clicked"
handler="on_button_encoder_inertial_calibrate_clicked" swapped="no"/>
- <child>
- <widget class="GtkHBox" id="hbox72">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">8</property>
- <child>
- <widget class="GtkImage"
id="image_encoder_calibrate">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property
name="stock">gtk-missing-image</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="label255">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label"
translatable="yes">Calibrate</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </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">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel"
id="label_calibrate_output_message">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
- <widget class="GtkVButtonBox" id="vbuttonbox3">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <widget class="GtkButton"
id="button_encoder_inertial_calibrate_close">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="relief">half</property>
- <signal name="clicked"
handler="on_button_encoder_inertial_calibrate_close_clicked" swapped="no"/>
- <accelerator key="Escape" signal="clicked"/>
- <child>
- <widget class="GtkLabel" id="label89">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label"
translatable="yes">Close</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">3</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</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="GtkLabel" id="label_wait">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label"> </property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">3</property>
- </packing>
- </child>
- <child>
- <widget class="GtkHBox" id="hbox209">
- <property name="can_focus">False</property>
- <property name="spacing">4</property>
- <child>
- <widget class="GtkLabel" id="label_recalibrate">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">1</property>
- <property name="label"> If you want to
recalibrate, push this button</property>
- </widget>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="label_recalibrate1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">1</property>
- <property name="label">-></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="pack_type">end</property>
- <property name="position">4</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="label159">
- <property name="can_focus">False</property>
- <property name="label">encoder inertial
instructions</property>
- </widget>
- <packing>
- <property name="position">1</property>
- <property name="tab_fill">False</property>
- <property name="type">tab</property>
- </packing>
- </child>
- </widget>
<packing>
<property name="resize">True</property>
<property name="shrink">False</property>
@@ -33571,6 +33315,234 @@ then click this button.</property>
</packing>
</child>
<child>
+ <widget class="GtkVBox"
id="vbox_inertial_instructions">
+ <property name="can_focus">False</property>
+ <property name="border_width">10</property>
+ <property name="spacing">12</property>
+ <child>
+ <widget class="GtkLabel" id="label135">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label"><b>Initial
calibration</b></property>
+ <property name="use_markup">True</property>
+ <property name="justify">center</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="image_encoder_inertial_instructions">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property
name="stock">gtk-missing-image</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox189">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <widget class="GtkVBox" id="vbox41">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">12</property>
+ <child>
+ <widget class="GtkLabel" id="label136">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Start
with the rope completely unwrapped,
+then click this button.</property>
+ <property name="use_markup">True</property>
+ <property name="justify">center</property>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkVButtonBox" id="vbuttonbox2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">30</property>
+ <property name="layout_style">start</property>
+ <child>
+ <widget class="GtkButton"
id="button_encoder_inertial_calibrate">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="relief">half</property>
+ <signal name="clicked"
handler="on_button_encoder_inertial_calibrate_clicked" swapped="no"/>
+ <child>
+ <widget class="GtkHBox" id="hbox72">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">8</property>
+ <child>
+ <widget class="GtkImage"
id="image_encoder_calibrate">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property
name="stock">gtk-missing-image</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label255">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label"
translatable="yes">Calibrate</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </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">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel"
id="label_calibrate_output_message">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkVButtonBox" id="vbuttonbox3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <widget class="GtkButton"
id="button_encoder_inertial_calibrate_close">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="relief">half</property>
+ <signal name="clicked"
handler="on_button_encoder_inertial_calibrate_close_clicked" swapped="no"/>
+ <accelerator key="Escape" signal="clicked"/>
+ <child>
+ <widget class="GtkLabel" id="label89">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label"
translatable="yes">Close</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">3</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</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="GtkLabel" id="label_wait">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label"> </property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox209">
+ <property name="can_focus">False</property>
+ <property name="spacing">4</property>
+ <child>
+ <widget class="GtkLabel" id="label_recalibrate">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">1</property>
+ <property name="label"> If you want to
recalibrate, push this button</property>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label_recalibrate1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">1</property>
+ <property name="label">-></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="pack_type">end</property>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
<widget class="GtkVBox" id="vbox_angle_now">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -33696,7 +33668,7 @@ then click this button.</property>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="padding">10</property>
- <property name="position">1</property>
+ <property name="position">2</property>
</packing>
</child>
</widget>
diff --git a/src/gui/app1/encoder.cs b/src/gui/app1/encoder.cs
index b5b851457..9f3a8b59b 100644
--- a/src/gui/app1/encoder.cs
+++ b/src/gui/app1/encoder.cs
@@ -73,6 +73,7 @@ public partial class ChronoJumpWindow
[Widget] Gtk.Frame frame_encoder_capture_options;
[Widget] Gtk.HBox hbox_encoder_capture_actions;
[Widget] Gtk.HPaned hpaned_encoder;
+ [Widget] Gtk.VBox vbox_inertial_instructions;
[Widget] Gtk.Box hbox_encoder_capture_wait;
[Widget] Gtk.Box vbox_encoder_capture_doing;
@@ -331,11 +332,8 @@ public partial class ChronoJumpWindow
[Widget] Gtk.Alignment alignment_treeview_encoder_capture_curves;
[Widget] Gtk.TreeView treeview_encoder_capture_curves;
[Widget] Gtk.TreeView treeview_encoder_analyze_curves;
-
- [Widget] Gtk.Notebook notebook_encoder_capture_or_inertial_instructions;
-
- [Widget] Gtk.DrawingArea encoder_capture_signal_drawingarea;
+ [Widget] Gtk.DrawingArea encoder_capture_signal_drawingarea;
[Widget] Gtk.DrawingArea encoder_capture_curves_bars_drawingarea;
Gdk.Pixmap encoder_capture_signal_pixmap = null;
Gdk.Pixmap encoder_capture_curves_bars_pixmap = null;
@@ -834,12 +832,16 @@ public partial class ChronoJumpWindow
button_encoder_inertial_calibrate_close.Sensitive = true;
label_wait.Text = " ";
label_calibrate_output_message.Text = "";
- notebook_encoder_capture_or_inertial_instructions.Page = 1;
+
+ hpaned_encoder.Visible = false;
+ vbox_inertial_instructions.Visible = true;
}
private void on_button_encoder_inertial_calibrate_close_clicked (object o, EventArgs args)
{
- notebook_encoder_capture_or_inertial_instructions.Page = 0;
+ hpaned_encoder.Visible = true;
+ vbox_inertial_instructions.Visible = false;
+
sensitiveGuiEventDone();
}
@@ -6603,9 +6605,13 @@ public partial class ChronoJumpWindow
needToCallPrepareEncoderGraphs = false;
}
- //if on inertia and already showing instructions, return to page 0
- if(notebook_encoder_capture_or_inertial_instructions.Page == 1)
- notebook_encoder_capture_or_inertial_instructions.Page = 0;
+ //TODO: test this if this is needed:
+ //if on inertia and already showing instructions, hide them
+ if(hpaned_encoder.Visible == false)
+ {
+ hpaned_encoder.Visible = true;
+ vbox_inertial_instructions.Visible = false;
+ }
if(! encoderThread.IsAlive || encoderProcessCancel)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]