Fix missing tempo lines if zooming with unchanged left edge, implement toggling editor/mixer on top.

git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@4017 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Nick Mainsbridge 2008-10-26 20:09:05 +00:00
parent d91e94ea2f
commit fc54f2eab1
8 changed files with 31 additions and 4 deletions

View file

@ -104,7 +104,7 @@
(gtk_accel_path "<Actions>/Editor/normalize-region" "n")
(gtk_accel_path "<Actions>/Main/New" "<%PRIMARY%>n")
(gtk_accel_path "<Actions>/Main/AddTrackBus" "<%PRIMARY%><%TERTIARY%>n")
(gtk_accel_path "<Actions>/Common/goto-mixer" "<%SECONDARY%>m")
(gtk_accel_path "<Actions>/Common/toggle-editor-mixer-on-top" "<%SECONDARY%>m")
(gtk_accel_path "<Actions>/Editor/add-location-from-playhead" "KP_Enter")
(gtk_accel_path "<Actions>/Editor/mute-unmute-region" "m")

View file

@ -229,7 +229,8 @@
; (gtk_accel_path "<Actions>/Editor/SnapMode" "")
(gtk_accel_path "<Actions>/Common/ToggleOptionsEditor" "<%WINDOW%>o")
; (gtk_accel_path "<Actions>/Editor/PullupMinus4" "")
(gtk_accel_path "<Actions>/Common/goto-mixer" "<%WINDOW%>m")
; (gtk_accel_path "<Actions>/Common/goto-mixer" "<%WINDOW%>m")
(gtk_accel_path "<Actions>/Common/toggle-editor-mixer-on-top" "<%WINDOW%>m")
; (gtk_accel_path "<Actions>/RegionList/SortBySourceFileCreationDate" "")
; (gtk_accel_path "<Actions>/redirectmenu/activate" "")
(gtk_accel_path "<Actions>/Editor/extend-range-to-start-of-region" "leftanglebracket")

View file

@ -268,6 +268,7 @@
<menu action="WindowMenu">
<menuitem action='goto-editor'/>
<menuitem action='goto-mixer'/>
<menuitem action='toggle-editor-mixer-on-top'/>
<menuitem action='ToggleLocations'/>
<menuitem action='ToggleKeyEditor'/>
<menuitem action='ToggleThemeManager'/>

View file

@ -199,6 +199,7 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[])
session_loaded = false;
last_speed_displayed = -1.0f;
ignore_dual_punch = false;
_mixer_on_top = false;
last_configure_time= 0;

View file

@ -276,8 +276,10 @@ class ARDOUR_UI : public Gtkmm2ext::UI
Gtk::Tooltips _tooltips;
void goto_editor_window ();
void goto_mixer_window ();
void goto_editor_window ();
void goto_mixer_window ();
void toggle_editor_mixer_on_top ();
bool _mixer_on_top;
GlobalClickBox *online_control_button;
vector<string> online_control_strings;

View file

@ -99,6 +99,7 @@ ARDOUR_UI::goto_editor_window ()
editor->show_window ();
editor->present();
_mixer_on_top = false;
flush_pending ();
}
@ -107,9 +108,22 @@ ARDOUR_UI::goto_mixer_window ()
{
mixer->show_window ();
mixer->present();
_mixer_on_top = true;
flush_pending ();
}
void
ARDOUR_UI::toggle_editor_mixer_on_top ()
{
if (_mixer_on_top) {
goto_editor_window ();
_mixer_on_top = false;
} else {
goto_mixer_window ();
_mixer_on_top = true;
}
}
gint
ARDOUR_UI::exit_on_main_window_close (GdkEventAny *ev)
{

View file

@ -203,6 +203,7 @@ ARDOUR_UI::install_actions ()
ActionManager::register_action (common_actions, X_("goto-editor"), _("Show Editor"), mem_fun(*this, &ARDOUR_UI::goto_editor_window));
ActionManager::register_action (common_actions, X_("goto-mixer"), _("Show Mixer"), mem_fun(*this, &ARDOUR_UI::goto_mixer_window));
ActionManager::register_action (common_actions, X_("toggle-editor-mixer-on-top"), _("Toggle Editor Mixer on Top"), mem_fun(*this, &ARDOUR_UI::toggle_editor_mixer_on_top));
ActionManager::register_toggle_action (common_actions, X_("ToggleOptionsEditor"), _("Preferences"), mem_fun(*this, &ARDOUR_UI::toggle_options_window));
act = ActionManager::register_toggle_action (common_actions, X_("ToggleInspector"), _("Track/Bus Inspector"), mem_fun(*this, &ARDOUR_UI::toggle_route_params_window));
ActionManager::session_sensitive_actions.push_back (act);

View file

@ -4415,7 +4415,14 @@ Editor::idle_visual_changer ()
}
if (p & VisualChange::TimeOrigin) {
double current_time_origin = horizontal_adjustment.get_value();
horizontal_adjustment.set_value (pending_visual_change.time_origin / frames_per_unit);
if (current_time_origin == pending_visual_change.time_origin) {
/* changed signal not emitted */
update_fixed_rulers ();
redisplay_tempo (true);
}
}
//cerr << "Editor::idle_visual_changer () called ha v:l:u:ps:fpu = " << horizontal_adjustment.get_value() << ":" << horizontal_adjustment.get_lower() << ":" << horizontal_adjustment.get_upper() << ":" << horizontal_adjustment.get_page_size() << ":" << frames_per_unit << endl;//DEBUG