[chronojump] Encoder capture treeview in notebook 2nd page if config.EncoderCaptureShowOnlyBars
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Encoder capture treeview in notebook 2nd page if config.EncoderCaptureShowOnlyBars
- Date: Sun, 2 Aug 2015 16:00:02 +0000 (UTC)
commit 33785e1a3ac9527cdfc72a60e1d2708b6355c391
Author: Xavier de Blas <xaviblas gmail com>
Date: Sun Aug 2 12:27:54 2015 +0200
Encoder capture treeview in notebook 2nd page if config.EncoderCaptureShowOnlyBars
glade/chronojump.glade | 136 ++++++++++++++++++++++++++++++++++++++++++------
src/gui/encoder.cs | 1 +
src/gui/networks.cs | 29 ++++++++++-
3 files changed, 149 insertions(+), 17 deletions(-)
---
diff --git a/glade/chronojump.glade b/glade/chronojump.glade
index 0abc251..79922e5 100644
--- a/glade/chronojump.glade
+++ b/glade/chronojump.glade
@@ -7666,6 +7666,9 @@ after time</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
</child>
<child>
@@ -9086,6 +9089,9 @@ after time</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="position">2</property>
@@ -10147,6 +10153,9 @@ after time</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="position">4</property>
@@ -15687,12 +15696,19 @@ on current Chronojump version.</property>
<property name="can_focus">True</property>
<property name="position">400</property>
<child>
- <widget class="GtkVPaned" id="vpaned_encoder_main">
+ <widget class="GtkNotebook"
id="notebook_encoder_capture_main">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="position">200</property>
+ <property name="tab_pos">bottom</property>
+ <property name="show_tabs">False</property>
+ <property name="show_border">False</property>
<child>
- <widget class="GtkAlignment"
id="alignment_encoder_capture_curves_bars_drawingarea">
+ <widget class="GtkVPaned" id="vpaned_encoder_main">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="position">200</property>
+ <child>
+ <widget class="GtkAlignment"
id="alignment_encoder_capture_curves_bars_drawingarea">
<property name="height_request">170</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -15833,14 +15849,14 @@ on current Chronojump version.</property>
</child>
</widget>
</child>
- </widget>
- <packing>
+ </widget>
+ <packing>
<property name="resize">True</property>
<property name="shrink">False</property>
- </packing>
- </child>
- <child>
- <widget class="GtkAlignment"
id="alignment_treeview_encoder_capture_curves">
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkAlignment"
id="alignment_treeview_encoder_capture_curves">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">4</property>
@@ -15887,16 +15903,53 @@ on current Chronojump version.</property>
</child>
</widget>
</child>
- </widget>
- <packing>
+ </widget>
+ <packing>
<property name="resize">True</property>
<property name="shrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label128">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Show
graph</property>
+ </widget>
+ <packing>
+ <property name="tab_fill">False</property>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkVBox"
id="vbox_treeview_encoder_at_second_page">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <placeholder/>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label131">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Show
table</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>
+ <property name="resize">False</property>
+ <property name="shrink">True</property>
</packing>
</child>
<child>
@@ -21787,6 +21840,9 @@ by you</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
</child>
</widget>
@@ -22747,6 +22803,9 @@ by you</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
</child>
</widget>
@@ -24199,6 +24258,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>
@@ -24708,6 +24770,9 @@ by you</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">True</property>
@@ -36370,6 +36435,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>
@@ -38173,6 +38256,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>
@@ -39513,9 +39608,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>
@@ -40475,6 +40567,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>
@@ -44222,6 +44317,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>
@@ -44846,6 +44944,9 @@ It starts before and arrives there with some speed.</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
</child>
</widget>
@@ -45485,6 +45586,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 d92c418..2e7cb10 100644
--- a/src/gui/encoder.cs
+++ b/src/gui/encoder.cs
@@ -81,6 +81,7 @@ public partial class ChronoJumpWindow
[Widget] Gtk.Label label_encoder_curve_action;
[Widget] Gtk.Button button_encoder_delete_signal;
+ [Widget] Gtk.VPaned vpaned_encoder_main;
[Widget] Gtk.VPaned vpaned_encoder_capture_video_and_set_graph;
//encoder video
diff --git a/src/gui/networks.cs b/src/gui/networks.cs
index 2ce75ab..07e35d9 100644
--- a/src/gui/networks.cs
+++ b/src/gui/networks.cs
@@ -44,6 +44,10 @@ public partial class ChronoJumpWindow
[Widget] Gtk.Box hbox_encoder_person;
[Widget] Gtk.Label label_encoder_person_name;
[Widget] Gtk.Button button_encoder_person_change;
+
+ //config.EncoderCaptureShowOnlyBars
+ [Widget] Gtk.Notebook notebook_encoder_capture_main;
+ [Widget] Gtk.VBox vbox_treeview_encoder_at_second_page;
//shown when menu is hidden
[Widget] Gtk.Button button_preferences_not_menu;
@@ -63,6 +67,14 @@ public partial class ChronoJumpWindow
Config config = new Config();
config.Read();
LogB.Information("Config:\n" + config.ToString());
+
+ /*
+ * TODO: do an else to any option
+ * is good to do the else here because user can import a configuration at any time
+ * and things need to be restored to default position in glade
+ *
+ * But note this has to be executed only if it has changed!!
+ */
if(config.Maximized)
app1.Maximize();
@@ -92,7 +104,22 @@ public partial class ChronoJumpWindow
if(config.EncoderCaptureShowOnlyBars) {
vpaned_encoder_capture_video_and_set_graph.Visible = false;
- alignment_treeview_encoder_capture_curves.Visible = false;
+
+ vpaned_encoder_main.Remove(alignment_treeview_encoder_capture_curves);
+
vbox_treeview_encoder_at_second_page.PackStart(alignment_treeview_encoder_capture_curves);
+ notebook_encoder_capture_main.ShowTabs = true;
+ } else {
+ /*
+ * is good to do the else here because user can import a configuration at any time
+ * and things need to be restored to default position in glade
+ *
+ * But note this has to be executed only if it has changed!!
+ */
+ /*
+ notebook_encoder_capture_main.ShowTabs = false;
+
vbox_treeview_encoder_at_second_page.Remove(alignment_treeview_encoder_capture_curves);
+ vpaned_encoder_main.PackStart(alignment_treeview_encoder_capture_curves);
+ */
}
if(config.PersonWinHide) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]