Add a session file type icon for OSX, remove unused editor_mixer_button, use a constant offset for verbose time cursor, make tempo lines a bit smoother on OSX (idle? when?)

git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3734 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Nick Mainsbridge 2008-09-16 18:58:26 +00:00
parent 6685f9c6b7
commit 72d53181c9
8 changed files with 30 additions and 33 deletions

View File

@ -1522,8 +1522,6 @@ public:
uint32_t bbt_beat_subdivision;
/* toolbar */
Gtk::ToggleButton editor_mixer_button;
void editor_mixer_button_toggled ();

View File

@ -194,8 +194,8 @@ bool
Editor::track_canvas_motion (GdkEvent *ev)
{
if (verbose_cursor_visible) {
verbose_canvas_cursor->property_x() = clamp_verbose_cursor_x (ev->motion.x + 20);
verbose_canvas_cursor->property_y() = clamp_verbose_cursor_y (ev->motion.y + 20);
verbose_canvas_cursor->property_x() = clamp_verbose_cursor_x (ev->motion.x + 10);
verbose_canvas_cursor->property_y() = clamp_verbose_cursor_y (ev->motion.y + 10);
}
return false;

View File

@ -128,6 +128,12 @@ Editor::show_editor_mixer (bool yn)
}
}
}
#ifdef GTKOSX
/* XXX gtk problem here */
ruler_label_event_box.queue_draw ();
time_button_event_box.queue_draw ();
controls_layout.queue_draw ();
#endif
}
void
@ -241,10 +247,6 @@ Editor::update_current_screen ()
almost_done:
last_update_frame = frame;
#ifdef GTKOSX
/*XXX in a perfect world we would not have to do this. */
track_canvas->update_now();
#endif
if (current_mixer_strip) {
current_mixer_strip->fast_update ();
}
@ -334,10 +336,6 @@ Editor::session_going_away ()
zoom_range_clock.set_session (0);
nudge_clock.set_session (0);
/* put editor/mixer toggle button in off position and disable until a new session is loaded */
editor_mixer_button.set_active(false);
editor_mixer_button.set_sensitive(false);
/* clear tempo/meter rulers */
remove_metric_marks ();
hide_measures ();

View File

@ -1213,8 +1213,8 @@ Editor::enter_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_
at_x = cp->get_x();
at_y = cp->get_y ();
cp->item->i2w (at_x, at_y);
at_x += 20.0;
at_y += 20.0;
at_x += 10.0;
at_y += 10.0;
fraction = 1.0 - (cp->get_y() / cp->line.height());
@ -1241,8 +1241,8 @@ Editor::enter_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_
at_x = cp->get_x();
at_y = cp->get_y ();
cp->item->i2w (at_x, at_y);
at_x += 20.0;
at_y += 20.0;
at_x += 10.0;
at_y += 10.0;
fraction = 1.0 - (cp->get_y() / cp->line.height());
@ -2204,11 +2204,14 @@ Editor::cursor_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
if (adjusted_frame == drag_info.last_pointer_frame) return;
cursor->set_position (adjusted_frame);
UpdateAllTransportClocks (cursor->current_frame);
show_verbose_time_cursor (cursor->current_frame, 10);
#ifdef GTKOSX
track_canvas->update_now ();
#endif
UpdateAllTransportClocks (cursor->current_frame);
drag_info.last_pointer_frame = adjusted_frame;
drag_info.first_move = false;
}
@ -2239,8 +2242,7 @@ Editor::update_marker_drag_item (Location *location)
marker_drag_line_points.front().set_x(x1);
marker_drag_line_points.back().set_x(x1);
marker_drag_line->property_points() = marker_drag_line_points;
}
else {
} else {
range_marker_drag_rect->property_x1() = x1;
range_marker_drag_rect->property_x2() = x2;
}
@ -2396,9 +2398,11 @@ Editor::marker_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
LocationMarkers* lm = find_location_markers (real_location);
lm->set_position (copy_location->start(), copy_location->end());
edit_point_clock.set (copy_location->start());
show_verbose_time_cursor (newframe, 10);
#ifdef GTKOSX
track_canvas->update_now ();
#endif
edit_point_clock.set (copy_location->start());
}
void
@ -2763,7 +2767,7 @@ Editor::start_control_point_grab (ArdourCanvas::Item* item, GdkEvent* event)
float fraction = 1.0 - (control_point->get_y() / control_point->line.height());
set_verbose_canvas_cursor (control_point->line.get_verbose_cursor_string (fraction),
drag_info.current_pointer_x + 20, drag_info.current_pointer_y + 20);
drag_info.current_pointer_x + 10, drag_info.current_pointer_y + 10);
show_verbose_canvas_cursor ();
}
@ -2915,7 +2919,7 @@ Editor::start_line_grab (AutomationLine* line, GdkEvent* event)
line->start_drag (0, drag_info.grab_frame, fraction);
set_verbose_canvas_cursor (line->get_verbose_cursor_string (fraction),
drag_info.current_pointer_x + 20, drag_info.current_pointer_y + 20);
drag_info.current_pointer_x + 10, drag_info.current_pointer_y + 10);
show_verbose_canvas_cursor ();
}

View File

@ -94,8 +94,6 @@ Editor::handle_new_route (Session::RouteList& routes)
if (show_editor_mixer_when_tracks_arrive) {
show_editor_mixer (true);
}
editor_mixer_button.set_sensitive(true);
}
void
@ -152,14 +150,7 @@ Editor::remove_route (TimeAxisView *tv)
* button to inactive and untick the menu option
*/
editor_mixer_button.set_active(false);
ActionManager::uncheck_toggleaction ("<Actions>/Editor/show-editor-mixer");
/* and disable if all tracks and/or routes are gone */
if (track_views.size() == 0) {
editor_mixer_button.set_sensitive(false);
}
}
void

View File

@ -160,7 +160,11 @@ Editor::redisplay_tempo (bool immediate_redraw)
} else {
if (session && current_bbt_points) {
#ifdef GTKOSX
lazy_hide_and_draw_measures ();
#else
Glib::signal_idle().connect (mem_fun (*this, &Editor::lazy_hide_and_draw_measures));
#endif
} else {
hide_measures ();
}

View File

@ -18,6 +18,8 @@
</array>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleTypeIconFile</key>
<string>typeIcon.icns</string>
</dict>
</array>
<key>CFBundleExecutable</key>

Binary file not shown.