Make summary display optional.

git-svn-id: svn://localhost/ardour2/branches/3.0@5191 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2009-06-14 18:54:38 +00:00
parent 57f6ec6d9a
commit b23c445db9
5 changed files with 38 additions and 2 deletions

View File

@ -392,6 +392,7 @@
<menuitem action='show-editor-list'/>
<menuitem action='ToggleMeasureVisibility'/>
<menuitem action='ToggleWaveformsWhileRecording'/>
<menuitem action='ToggleSummary'/>
</menu>
<menu name='JACK' action='JACK'>
<menuitem action='JACKDisconnect'/>

View File

@ -933,8 +933,11 @@ Editor::show_window ()
if (! is_visible ()) {
show_all ();
/* re-hide editor list if necessary */
editor_list_button_toggled ();
/* re-hide editor list if necessary */
editor_list_button_toggled ();
/* re-hide summary widget if necessary */
parameter_changed ("show-summary");
/* now reset all audio_time_axis heights, because widgets might need
to be re-hidden
@ -1317,6 +1320,7 @@ Editor::connect_to_session (Session *t)
}
Config->map_parameters (mem_fun (*this, &Editor::parameter_changed));
session->config.map_parameters (mem_fun (*this, &Editor::parameter_changed));
session->StateSaved.connect (mem_fun(*this, &Editor::session_state_saved));

View File

@ -341,6 +341,7 @@ class Editor : public PublicEditor
void toggle_zero_line_visibility ();
void toggle_waveforms_while_recording ();
void set_summary ();
void toggle_measure_visibility ();
void toggle_logo_visibility ();

View File

@ -806,6 +806,9 @@ Editor::register_actions ()
ActionManager::register_action (editor_actions, X_("importFromSession"), _("Import From Session"), mem_fun(*this, &Editor::session_import_dialog));
ActionManager::register_toggle_action (editor_actions, X_("ToggleWaveformsWhileRecording"), _("Show Waveforms While Recording"), mem_fun (*this, &Editor::toggle_waveforms_while_recording));
ActionManager::register_toggle_action (editor_actions, X_("ToggleSummary"), _("Show Summary"), mem_fun (*this, &Editor::set_summary));
ActionManager::register_toggle_action (editor_actions, X_("ToggleMeasureVisibility"), _("Show Measures"), mem_fun (*this, &Editor::toggle_measure_visibility));
/* if there is a logo in the editor canvas, its always visible at startup */
@ -882,6 +885,16 @@ Editor::toggle_waveforms_while_recording ()
}
}
void
Editor::set_summary ()
{
Glib::RefPtr<Action> act = ActionManager::get_action (X_("Editor"), X_("ToggleSummary"));
if (act) {
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic (act);
session->config.set_show_summary (tact->get_active ());
}
}
void
Editor::toggle_measure_visibility ()
{
@ -1260,6 +1273,22 @@ Editor::parameter_changed (std::string p)
update_just_smpte ();
} else if (p == "show-track-meters") {
toggle_meter_updating();
} else if (p == "show-summary") {
bool const s = session->config.get_show_summary ();
if (s) {
_summary->show ();
} else {
_summary->hide ();
}
Glib::RefPtr<Action> act = ActionManager::get_action (X_("Editor"), X_("ToggleSummary"));
if (act) {
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic (act);
if (tact->get_active () != s) {
tact->set_active (s);
}
}
}
}

View File

@ -45,3 +45,4 @@ CONFIG_VARIABLE (bool, timecode_source_is_synced, "timecode-source-is-synced", t
CONFIG_VARIABLE (bool, jack_time_master, "jack-time-master", true)
CONFIG_VARIABLE (bool, use_video_sync, "use-video-sync", false)
CONFIG_VARIABLE (float, video_pullup, "video-pullup", 0.0f)
CONFIG_VARIABLE (bool, show_summary, "show-summary", true)