summaryrefslogtreecommitdiff
path: root/gtk2_ardour/time_info_box.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2017-03-10 20:39:46 +0100
committerRobin Gareus <robin@gareus.org>2017-03-10 20:39:46 +0100
commit2562a5ce3b58f3ebe2be7f8e3f0e875a1d9eafca (patch)
tree6be3ccf7670f0d8243dba4a7aae9fba8144ae75a /gtk2_ardour/time_info_box.cc
parenteac0a2b6ecd6d83c84d72cbc8d2ef55eb89d9ae1 (diff)
Save/Restore TimeInfoBox clock modes
The clocks are not transient, so ARDOUR_UI::store_clock_modes takes care of saving the state and the clock restores itself.
Diffstat (limited to 'gtk2_ardour/time_info_box.cc')
-rw-r--r--gtk2_ardour/time_info_box.cc22
1 files changed, 16 insertions, 6 deletions
diff --git a/gtk2_ardour/time_info_box.cc b/gtk2_ardour/time_info_box.cc
index ceda41e90c..fd573ad4b7 100644
--- a/gtk2_ardour/time_info_box.cc
+++ b/gtk2_ardour/time_info_box.cc
@@ -43,7 +43,7 @@ using namespace ARDOUR;
using std::min;
using std::max;
-TimeInfoBox::TimeInfoBox (bool with_punch)
+TimeInfoBox::TimeInfoBox (std::string state_node_name, bool with_punch)
: table (3, 3)
, punch_start (0)
, punch_end (0)
@@ -53,9 +53,15 @@ TimeInfoBox::TimeInfoBox (bool with_punch)
{
set_name (X_("TimeInfoBox"));
- selection_start = new AudioClock ("selection-start", false, "selection", false, false, false, false);
- selection_end = new AudioClock ("selection-end", false, "selection", false, false, false, false);
- selection_length = new AudioClock ("selection-length", false, "selection", false, false, true, false);
+ selection_start = new AudioClock (
+ string_compose ("%1-selection-start", state_node_name),
+ false, "selection", false, false, false, false);
+ selection_end = new AudioClock (
+ string_compose ("%1-selection-end", state_node_name),
+ false, "selection", false, false, false, false);
+ selection_length = new AudioClock (
+ string_compose ("%1-selection-length", state_node_name),
+ false, "selection", false, false, true, false);
selection_title.set_text (_("Selection"));
@@ -98,8 +104,12 @@ TimeInfoBox::TimeInfoBox (bool with_punch)
table.attach (*selection_length, 1, 2, 3, 4);
if (with_punch_clock) {
- punch_start = new AudioClock ("punch-start", false, "punch", false, false, false, false);
- punch_end = new AudioClock ("punch-end", false, "punch", false, false, false, false);
+ punch_start = new AudioClock (
+ string_compose ("%1-punch-start", state_node_name),
+ false, "punch", false, false, false, false);
+ punch_end = new AudioClock (
+ string_compose ("%1-punch-end", state_node_name),
+ false, "punch", false, false, false, false);
punch_title.set_text (_("Punch"));
punch_title.set_name ("TimeInfoSelectionTitle");