Transfer from ardour_ui (pack ARDOUR_UIs clocks)
This commit is contained in:
parent
efbb222277
commit
1641be9f7a
@ -117,6 +117,7 @@ ApplicationBar::ApplicationBar ()
|
|||||||
, _latency_disable_button (ArdourButton::led_default_elements)
|
, _latency_disable_button (ArdourButton::led_default_elements)
|
||||||
, _auto_return_button (ArdourButton::led_default_elements)
|
, _auto_return_button (ArdourButton::led_default_elements)
|
||||||
, _follow_edits_button (ArdourButton::led_default_elements)
|
, _follow_edits_button (ArdourButton::led_default_elements)
|
||||||
|
, _secondary_clock_spacer (0)
|
||||||
{
|
{
|
||||||
_record_mode_strings = I18N (_record_mode_strings_);
|
_record_mode_strings = I18N (_record_mode_strings_);
|
||||||
}
|
}
|
||||||
@ -226,6 +227,28 @@ ApplicationBar::on_parent_changed (Gtk::Widget*)
|
|||||||
_table.attach (*(manage (new ArdourVSpacer ())), TCOL, 0, 2 , SHRINK, EXPAND|FILL, 3, 0);
|
_table.attach (*(manage (new ArdourVSpacer ())), TCOL, 0, 2 , SHRINK, EXPAND|FILL, 3, 0);
|
||||||
++col;
|
++col;
|
||||||
|
|
||||||
|
_table.attach (*(ARDOUR_UI::instance()->primary_clock), col, col + 2, 0, 1 , FILL, SHRINK, hpadding, 0);
|
||||||
|
_table.attach (*(ARDOUR_UI::instance()->primary_clock)->left_btn(), col, col + 1, 1, 2 , FILL, SHRINK, hpadding, 0);
|
||||||
|
_table.attach (*(ARDOUR_UI::instance()->primary_clock)->right_btn(), col + 1, col + 2, 1, 2 , FILL, SHRINK, hpadding, 0);
|
||||||
|
col += 2;
|
||||||
|
|
||||||
|
_table.attach (*(manage (new ArdourVSpacer ())), TCOL, 0, 2 , SHRINK, EXPAND|FILL, 3, 0);
|
||||||
|
++col;
|
||||||
|
|
||||||
|
if (!ARDOUR::Profile->get_small_screen()) {
|
||||||
|
_table.attach (*(ARDOUR_UI::instance()->secondary_clock), col, col + 2, 0, 1 , FILL, SHRINK, hpadding, 0);
|
||||||
|
_table.attach (*(ARDOUR_UI::instance()->secondary_clock)->left_btn(), col, col + 1, 1, 2 , FILL, SHRINK, hpadding, 0);
|
||||||
|
_table.attach (*(ARDOUR_UI::instance()->secondary_clock)->right_btn(), col + 1, col + 2, 1, 2 , FILL, SHRINK, hpadding, 0);
|
||||||
|
(ARDOUR_UI::instance()->secondary_clock)->set_no_show_all (true);
|
||||||
|
(ARDOUR_UI::instance()->secondary_clock)->left_btn()->set_no_show_all (true);
|
||||||
|
(ARDOUR_UI::instance()->secondary_clock)->right_btn()->set_no_show_all (true);
|
||||||
|
col += 2;
|
||||||
|
|
||||||
|
_secondary_clock_spacer = manage (new ArdourVSpacer ());
|
||||||
|
_table.attach (*_secondary_clock_spacer, TCOL, 0, 2 , SHRINK, EXPAND|FILL, 3, 0);
|
||||||
|
++col;
|
||||||
|
}
|
||||||
|
|
||||||
_table.set_spacings (0);
|
_table.set_spacings (0);
|
||||||
_table.set_row_spacings (4);
|
_table.set_row_spacings (4);
|
||||||
_table.set_border_width (1);
|
_table.set_border_width (1);
|
||||||
@ -269,6 +292,7 @@ ApplicationBar::on_parent_changed (Gtk::Widget*)
|
|||||||
ARDOUR::Latent::DisableSwitchChanged.connect (_forever_connections, MISSING_INVALIDATOR, std::bind (&ApplicationBar::latency_switch_changed, this), gui_context ());
|
ARDOUR::Latent::DisableSwitchChanged.connect (_forever_connections, MISSING_INVALIDATOR, std::bind (&ApplicationBar::latency_switch_changed, this), gui_context ());
|
||||||
|
|
||||||
/* initialize */
|
/* initialize */
|
||||||
|
update_clock_visibility ();
|
||||||
set_transport_sensitivity (false);
|
set_transport_sensitivity (false);
|
||||||
latency_switch_changed ();
|
latency_switch_changed ();
|
||||||
session_latency_updated (true);
|
session_latency_updated (true);
|
||||||
@ -437,6 +461,24 @@ ApplicationBar::latency_switch_changed ()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
ApplicationBar::update_clock_visibility ()
|
||||||
|
{
|
||||||
|
if (ARDOUR::Profile->get_small_screen()) {
|
||||||
|
_secondary_clock_spacer->hide();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (UIConfiguration::instance().get_show_secondary_clock ()) {
|
||||||
|
if (_secondary_clock_spacer) {
|
||||||
|
_secondary_clock_spacer->show();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (_secondary_clock_spacer) {
|
||||||
|
_secondary_clock_spacer->hide();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ApplicationBar::session_latency_updated (bool for_playback)
|
ApplicationBar::session_latency_updated (bool for_playback)
|
||||||
{
|
{
|
||||||
@ -536,7 +578,7 @@ ApplicationBar::parameter_changed (std::string p)
|
|||||||
} else if (p == "show-editor-meter") {
|
} else if (p == "show-editor-meter") {
|
||||||
repack_transport_hbox ();
|
repack_transport_hbox ();
|
||||||
} else if (p == "show-secondary-clock") {
|
} else if (p == "show-secondary-clock") {
|
||||||
// update_clock_visibility ();
|
update_clock_visibility ();
|
||||||
} else if (p == "action-table-columns") {
|
} else if (p == "action-table-columns") {
|
||||||
/* const uint32_t cols = UIConfiguration::instance().get_action_table_columns ();
|
/* const uint32_t cols = UIConfiguration::instance().get_action_table_columns ();
|
||||||
for (int i = 0; i < MAX_LUA_ACTION_BUTTONS; ++i) {
|
for (int i = 0; i < MAX_LUA_ACTION_BUTTONS; ++i) {
|
||||||
|
@ -78,6 +78,8 @@ private:
|
|||||||
void latency_switch_changed ();
|
void latency_switch_changed ();
|
||||||
void session_latency_updated (bool);
|
void session_latency_updated (bool);
|
||||||
|
|
||||||
|
void update_clock_visibility ();
|
||||||
|
|
||||||
/* blinking alerts */
|
/* blinking alerts */
|
||||||
void sync_blink (bool);
|
void sync_blink (bool);
|
||||||
void blink_handler (bool);
|
void blink_handler (bool);
|
||||||
@ -102,6 +104,7 @@ private:
|
|||||||
Gtk::Label _io_latency_value;
|
Gtk::Label _io_latency_value;
|
||||||
ArdourWidgets::ArdourButton _auto_return_button;
|
ArdourWidgets::ArdourButton _auto_return_button;
|
||||||
ArdourWidgets::ArdourButton _follow_edits_button;
|
ArdourWidgets::ArdourButton _follow_edits_button;
|
||||||
|
ArdourWidgets::ArdourVSpacer* _secondary_clock_spacer;
|
||||||
|
|
||||||
std::vector<std::string> _record_mode_strings;
|
std::vector<std::string> _record_mode_strings;
|
||||||
|
|
||||||
|
@ -298,7 +298,6 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], const char* localedir)
|
|||||||
, _shared_popup_menu (0)
|
, _shared_popup_menu (0)
|
||||||
, _basic_ui (0)
|
, _basic_ui (0)
|
||||||
, startup_fsm (0)
|
, startup_fsm (0)
|
||||||
, secondary_clock_spacer (0)
|
|
||||||
, _cue_rec_enable (_("Rec Cues"), ArdourButton::led_default_elements)
|
, _cue_rec_enable (_("Rec Cues"), ArdourButton::led_default_elements)
|
||||||
, _cue_play_enable (_("Play Cues"), ArdourButton::led_default_elements)
|
, _cue_play_enable (_("Play Cues"), ArdourButton::led_default_elements)
|
||||||
, time_info_box (0)
|
, time_info_box (0)
|
||||||
|
@ -521,7 +521,6 @@ private:
|
|||||||
Gtk::Frame transport_frame;
|
Gtk::Frame transport_frame;
|
||||||
Gtk::HBox transport_hbox;
|
Gtk::HBox transport_hbox;
|
||||||
|
|
||||||
ArdourWidgets::ArdourVSpacer* secondary_clock_spacer;
|
|
||||||
void update_clock_visibility ();
|
void update_clock_visibility ();
|
||||||
void toggle_follow_edits ();
|
void toggle_follow_edits ();
|
||||||
|
|
||||||
|
@ -201,16 +201,10 @@ ARDOUR_UI::update_clock_visibility ()
|
|||||||
secondary_clock->show();
|
secondary_clock->show();
|
||||||
secondary_clock->left_btn()->show();
|
secondary_clock->left_btn()->show();
|
||||||
secondary_clock->right_btn()->show();
|
secondary_clock->right_btn()->show();
|
||||||
if (secondary_clock_spacer) {
|
|
||||||
secondary_clock_spacer->show();
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
secondary_clock->hide();
|
secondary_clock->hide();
|
||||||
secondary_clock->left_btn()->hide();
|
secondary_clock->left_btn()->hide();
|
||||||
secondary_clock->right_btn()->hide();
|
secondary_clock->right_btn()->hide();
|
||||||
if (secondary_clock_spacer) {
|
|
||||||
secondary_clock_spacer->hide();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -422,28 +416,6 @@ ARDOUR_UI::setup_transport ()
|
|||||||
transport_table.attach (*application_bar, TCOL, 0, 2 , EXPAND|FILL, EXPAND|FILL, 3, 0);
|
transport_table.attach (*application_bar, TCOL, 0, 2 , EXPAND|FILL, EXPAND|FILL, 3, 0);
|
||||||
++col;
|
++col;
|
||||||
|
|
||||||
transport_table.attach (*primary_clock, col, col + 2, 0, 1 , FILL, SHRINK, hpadding, 0);
|
|
||||||
transport_table.attach (*primary_clock->left_btn(), col, col + 1, 1, 2 , FILL, SHRINK, hpadding, 0);
|
|
||||||
transport_table.attach (*primary_clock->right_btn(), col + 1, col + 2, 1, 2 , FILL, SHRINK, hpadding, 0);
|
|
||||||
col += 2;
|
|
||||||
|
|
||||||
transport_table.attach (*(manage (new ArdourVSpacer ())), TCOL, 0, 2 , SHRINK, EXPAND|FILL, 3, 0);
|
|
||||||
++col;
|
|
||||||
|
|
||||||
if (!ARDOUR::Profile->get_small_screen()) {
|
|
||||||
transport_table.attach (*secondary_clock, col, col + 2, 0, 1 , FILL, SHRINK, hpadding, 0);
|
|
||||||
transport_table.attach (*secondary_clock->left_btn(), col, col + 1, 1, 2 , FILL, SHRINK, hpadding, 0);
|
|
||||||
transport_table.attach (*secondary_clock->right_btn(), col + 1, col + 2, 1, 2 , FILL, SHRINK, hpadding, 0);
|
|
||||||
secondary_clock->set_no_show_all (true);
|
|
||||||
secondary_clock->left_btn()->set_no_show_all (true);
|
|
||||||
secondary_clock->right_btn()->set_no_show_all (true);
|
|
||||||
col += 2;
|
|
||||||
|
|
||||||
secondary_clock_spacer = manage (new ArdourVSpacer ());
|
|
||||||
transport_table.attach (*secondary_clock_spacer, TCOL, 0, 2 , SHRINK, EXPAND|FILL, 3, 0);
|
|
||||||
++col;
|
|
||||||
}
|
|
||||||
|
|
||||||
transport_table.attach (*alert_box, TCOL, 0, 2, SHRINK, EXPAND|FILL, hpadding, 0);
|
transport_table.attach (*alert_box, TCOL, 0, 2, SHRINK, EXPAND|FILL, hpadding, 0);
|
||||||
++col;
|
++col;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user