13
0

Fit tracks fix from 2.0, don't crash if some env vars aren't set, remove some conflicts from mnemonic-us.bindings.in.

git-svn-id: svn://localhost/ardour2/branches/3.0@3943 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Nick Mainsbridge 2008-10-13 01:56:42 +00:00
parent 2c4a08bc57
commit 2f4a7917de
3 changed files with 22 additions and 13 deletions

View File

@ -6105,7 +6105,7 @@ Editor::fit_tracks ()
child_heights += ((*t)->effective_height - (*t)->current_height());
}
uint32_t h = (uint32_t) floor ((canvas_height - child_heights)/selection->tracks.size());
uint32_t h = (uint32_t) floor ((canvas_height - child_heights - canvas_timebars_vsize)/selection->tracks.size());
double first_y_pos = DBL_MAX;
undo_visual_stack.push_back (current_visual_state());
@ -6114,7 +6114,11 @@ Editor::fit_tracks ()
(*t)->set_height (h);
first_y_pos = std::min ((*t)->y_position, first_y_pos);
}
/*
set the controls_layout height now, because waiting for its size
request signal handler will cause the vertical adjustment setting to fail
*/
controls_layout.property_height () = full_canvas_height - canvas_timebars_vsize;
vertical_adjustment.set_value (first_y_pos);
redo_visual_stack.push_back (current_visual_state());

View File

@ -93,20 +93,12 @@
;; HOME ROW
<<<<<<< .working
(gtk_accel_path "<Actions>/Editor/zoom-to-region" "<%SECONDARY%>z")
=======
(gtk_accel_path "<Actions>/Editor/zoom-to-region" "<%PRIMARY%><%SECONDARY%>z")
(gtk_accel_path "<Actions>/Editor/zoom-to-region-both-axes" "<%SECONDARY%>z")
>>>>>>> .merge-right.r3622
(gtk_accel_path "<Actions>/Editor/undo" "<%PRIMARY%>z")
(gtk_accel_path "<Actions>/Editor/toggle-zoom" "<%TERTIARY%>z")
<<<<<<< .working
(gtk_accel_path "<Actions>/MouseMode/set-mouse-mode-zoom" "z")
(gtk_accel_path "<Actions>/MouseMode/set-mouse-mode-note" "n")
=======
(gtk_accel_path "<Actions>/MouseMode/set-mouse-mode-zoom" "z")
>>>>>>> .merge-right.r3622
(gtk_accel_path "<Actions>/Editor/editor-cut" "<%PRIMARY%>x")
(gtk_accel_path "<Actions>/Editor/editor-copy" "<%PRIMARY%>c")
(gtk_accel_path "<Actions>/Common/ToggleColorManager" "<%WINDOW%>c")

View File

@ -252,7 +252,11 @@ RotatedLabelSet::RotatedLabelSet (PortGroupList& g)
: Glib::ObjectBase ("RotatedLabelSet"), Widget (), _port_group_list (g), _base_width (128)
{
set_flags (NO_WINDOW);
set_angle (atoi (getenv ("AD_ANGLE")));
if (getenv ("AD_ANGLE") != 0) {
set_angle (atoi (getenv ("AD_ANGLE")));
} else {
set_angle (45);
}
}
RotatedLabelSet::~RotatedLabelSet ()
@ -415,8 +419,17 @@ RotatedLabelSet::on_expose_event (GdkEventExpose* event)
if ((*i)->visible) {
for (uint32_t j = 0; j < (*i)->ports.size(); ++j) {
std::pair<int, int> const d = setup_layout ((*i)->ports[j]);
int x = atoi (getenv ("AD_X_SHIFT"));
int y = atoi (getenv ("AD_Y_SHIFT"));
int x, y;
if (getenv ("AD_X_SHIFT") != 0) {
x = atoi (getenv ("AD_X_SHIFT"));
} else {
x = 0;
}
if (getenv ("AD_Y_SHIFT") != 0) {
y = atoi (getenv ("AD_Y_SHIFT"));
} else {
y = 0;
}
get_window()->draw_layout (_gc, int ((n + 0.25) * spacing) + x, height - d.second + y, _pango_layout, _fg_colour, _bg_colour);
++n;
}