Fixed random track background problem
Cleaned up StreamView initialization (cause of above problem) Fixed other StreamView colour issues (incomplete port from GTK1 by the looks of it) Added new narrower playback (top) toolbar (under 1024 now? maybe?) Cleaned up status-in-menubar stuff (to be a bit narrower/nicer) git-svn-id: svn://localhost/ardour2/trunk@743 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
@@ -506,11 +506,11 @@ ARDOUR_UI::update_sample_rate (jack_nframes_t ignored)
|
||||
jack_nframes_t rate = engine->frame_rate();
|
||||
|
||||
if (fmod (rate, 1000.0) != 0.0) {
|
||||
snprintf (buf, sizeof (buf), _("SR: %.1f kHz / %4.1f msecs"),
|
||||
snprintf (buf, sizeof (buf), _("%.1f kHz / %4.1f msecs"),
|
||||
(float) rate/1000.0f,
|
||||
(engine->frames_per_cycle() / (float) rate) * 1000.0f);
|
||||
} else {
|
||||
snprintf (buf, sizeof (buf), _("SR: %u kHz / %4.1f msecs"),
|
||||
snprintf (buf, sizeof (buf), _("%u kHz / %4.1f msecs"),
|
||||
rate/1000,
|
||||
(engine->frames_per_cycle() / (float) rate) * 1000.0f);
|
||||
}
|
||||
@@ -523,7 +523,7 @@ void
|
||||
ARDOUR_UI::update_cpu_load ()
|
||||
{
|
||||
char buf[32];
|
||||
snprintf (buf, sizeof (buf), _("DSP Load: %.1f%%"), engine->get_cpu_load());
|
||||
snprintf (buf, sizeof (buf), _("DSP: %.1f%%"), engine->get_cpu_load());
|
||||
cpu_load_label.set_text (buf);
|
||||
}
|
||||
|
||||
@@ -561,7 +561,7 @@ ARDOUR_UI::update_disk_space()
|
||||
char buf[64];
|
||||
|
||||
if (frames == max_frames) {
|
||||
strcpy (buf, _("space: 24hrs+"));
|
||||
strcpy (buf, _("Disk: 24hrs+"));
|
||||
} else {
|
||||
int hrs;
|
||||
int mins;
|
||||
@@ -591,7 +591,7 @@ ARDOUR_UI::update_disk_space()
|
||||
frames -= mins * fr * 60;
|
||||
secs = frames / fr;
|
||||
|
||||
snprintf (buf, sizeof(buf), _("space: %02dh:%02dm:%02ds"), hrs, mins, secs);
|
||||
snprintf (buf, sizeof(buf), _("Disk: %02dh:%02dm:%02ds"), hrs, mins, secs);
|
||||
}
|
||||
|
||||
disk_space_label.set_text (buf);
|
||||
|
||||
@@ -359,10 +359,10 @@ ARDOUR_UI::setup_transport ()
|
||||
auditioning_alert_button.set_name ("TransportAuditioningAlert");
|
||||
auditioning_alert_button.signal_pressed().connect (mem_fun(*this,&ARDOUR_UI::audition_alert_toggle));
|
||||
|
||||
alert_box.pack_start (solo_alert_button);
|
||||
alert_box.pack_start (auditioning_alert_button);
|
||||
alert_box.pack_start (solo_alert_button, false, false);
|
||||
alert_box.pack_start (auditioning_alert_button, false, false);
|
||||
|
||||
transport_tearoff_hbox.set_border_width (5);
|
||||
transport_tearoff_hbox.set_border_width (3);
|
||||
|
||||
transport_tearoff_hbox.pack_start (goto_start_button, false, false);
|
||||
transport_tearoff_hbox.pack_start (goto_end_button, false, false);
|
||||
@@ -398,6 +398,7 @@ ARDOUR_UI::setup_transport ()
|
||||
mtc_port_changed ();
|
||||
sync_option_combo.set_active_text (positional_sync_strings.front());
|
||||
sync_option_combo.signal_changed().connect (mem_fun (*this, &ARDOUR_UI::sync_option_changed));
|
||||
Gtkmm2ext::set_size_request_to_display_given_text (sync_option_combo, "Internal", 22, 10);
|
||||
|
||||
shbox->pack_start (*sdframe, false, false);
|
||||
shbox->pack_start (shuttle_units_button, true, true);
|
||||
@@ -406,37 +407,52 @@ ARDOUR_UI::setup_transport ()
|
||||
svbox->pack_start (*sframe, false, false);
|
||||
svbox->pack_start (*shbox, false, false);
|
||||
|
||||
transport_tearoff_hbox.pack_start (*svbox, false, false, 5);
|
||||
transport_tearoff_hbox.pack_start (*svbox, false, false, 3);
|
||||
|
||||
transport_tearoff_hbox.pack_start (auto_loop_button, false, false);
|
||||
transport_tearoff_hbox.pack_start (play_selection_button, false, false);
|
||||
transport_tearoff_hbox.pack_start (roll_button, false, false);
|
||||
transport_tearoff_hbox.pack_start (stop_button, false, false);
|
||||
transport_tearoff_hbox.pack_start (rec_button, false, false, 10);
|
||||
transport_tearoff_hbox.pack_start (rec_button, false, false, 6);
|
||||
|
||||
transport_tearoff_hbox.pack_start (primary_clock, false, false, 5);
|
||||
transport_tearoff_hbox.pack_start (secondary_clock, false, false, 5);
|
||||
HBox* clock_box = manage (new HBox);
|
||||
clock_box->pack_start (primary_clock, false, false);
|
||||
clock_box->pack_start (secondary_clock, false, false);
|
||||
VBox* time_controls_box = manage (new VBox);
|
||||
time_controls_box->pack_start (sync_option_combo, false, false);
|
||||
time_controls_box->pack_start (time_master_button, false, false);
|
||||
clock_box->pack_start (*time_controls_box, false, false, 1);
|
||||
transport_tearoff_hbox.pack_start (*clock_box, false, false, 0);
|
||||
|
||||
HBox* toggle_box = manage(new HBox);
|
||||
|
||||
VBox* punch_box = manage (new VBox);
|
||||
punch_box->pack_start (punch_in_button, false, false);
|
||||
punch_box->pack_start (punch_out_button, false, false);
|
||||
toggle_box->pack_start (*punch_box, false, false);
|
||||
|
||||
transport_tearoff_hbox.pack_start (sync_option_combo, false, false);
|
||||
transport_tearoff_hbox.pack_start (time_master_button, false, false);
|
||||
transport_tearoff_hbox.pack_start (punch_in_button, false, false);
|
||||
transport_tearoff_hbox.pack_start (punch_out_button, false, false);
|
||||
transport_tearoff_hbox.pack_start (auto_input_button, false, false);
|
||||
transport_tearoff_hbox.pack_start (auto_return_button, false, false);
|
||||
transport_tearoff_hbox.pack_start (auto_play_button, false, false);
|
||||
transport_tearoff_hbox.pack_start (click_button, false, false);
|
||||
VBox* auto_box = manage (new VBox);
|
||||
auto_box->pack_start (auto_play_button, false, false);
|
||||
auto_box->pack_start (auto_return_button, false, false);
|
||||
toggle_box->pack_start (*auto_box, false, false);
|
||||
|
||||
VBox* io_box = manage (new VBox);
|
||||
io_box->pack_start (auto_input_button, false, false);
|
||||
io_box->pack_start (click_button, false, false);
|
||||
toggle_box->pack_start (*io_box, false, false);
|
||||
|
||||
/* desensitize */
|
||||
|
||||
set_transport_sensitivity (false);
|
||||
|
||||
// transport_tearoff_hbox.pack_start (preroll_button, false, false);
|
||||
// transport_tearoff_hbox.pack_start (preroll_clock, false, false);
|
||||
// toggle_box->pack_start (preroll_button, false, false);
|
||||
// toggle_box->pack_start (preroll_clock, false, false);
|
||||
|
||||
// transport_tearoff_hbox.pack_start (postroll_button, false, false);
|
||||
// transport_tearoff_hbox.pack_start (postroll_clock, false, false);
|
||||
// toggle_box->pack_start (postroll_button, false, false);
|
||||
// toggle_box->pack_start (postroll_clock, false, false);
|
||||
|
||||
transport_tearoff_hbox.pack_start (alert_box, false, false, 5);
|
||||
transport_tearoff_hbox.pack_start (*toggle_box, false, false, 4);
|
||||
transport_tearoff_hbox.pack_start (alert_box, false, false);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -820,7 +836,7 @@ ARDOUR_UI::set_shuttle_units (ShuttleUnits u)
|
||||
shuttle_units_button.set_label("% ");
|
||||
break;
|
||||
case Semitones:
|
||||
shuttle_units_button.set_label(_("st"));
|
||||
shuttle_units_button.set_label(_("ST"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -864,7 +880,7 @@ ARDOUR_UI::update_speed_display ()
|
||||
{
|
||||
if (!session) {
|
||||
if (last_speed_displayed != 0) {
|
||||
speed_display_label.set_text (_("stopped"));
|
||||
speed_display_label.set_text (_("stop"));
|
||||
last_speed_displayed = 0;
|
||||
}
|
||||
return;
|
||||
@@ -877,7 +893,7 @@ ARDOUR_UI::update_speed_display ()
|
||||
|
||||
if (x != 0) {
|
||||
if (shuttle_units == Percentage) {
|
||||
snprintf (buf, sizeof (buf), "%.4f", x);
|
||||
snprintf (buf, sizeof (buf), "%.2f", x);
|
||||
} else {
|
||||
if (x < 0) {
|
||||
snprintf (buf, sizeof (buf), "< %.1f", 12.0 * fast_log2 (-x));
|
||||
@@ -887,7 +903,7 @@ ARDOUR_UI::update_speed_display ()
|
||||
}
|
||||
speed_display_label.set_text (buf);
|
||||
} else {
|
||||
speed_display_label.set_text (_("stopped"));
|
||||
speed_display_label.set_text (_("stop"));
|
||||
}
|
||||
|
||||
last_speed_displayed = x;
|
||||
@@ -904,7 +920,7 @@ ARDOUR_UI::set_transport_sensitivity (bool yn)
|
||||
void
|
||||
ARDOUR_UI::editor_realized ()
|
||||
{
|
||||
set_size_request_to_display_given_text (speed_display_box, _("stopped"), 2, 2);
|
||||
set_size_request_to_display_given_text (speed_display_box, _("-0.55"), 2, 2);
|
||||
/* XXX: this should really be saved in instant.xml or something similar and restored from there */
|
||||
shuttle_style_button.set_active_text (_("sprung"));
|
||||
const guint32 FUDGE = 20; // Combo's are stupid - they steal space from the entry for the button
|
||||
|
||||
@@ -264,31 +264,26 @@ ARDOUR_UI::install_actions ()
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::transport_sensitive_actions.push_back (act);
|
||||
|
||||
/* XXX the newline in the displayed names of these action is really wrong, but its because we want the button
|
||||
that proxies for these action to be more compact. It would be nice to find a way to override the action
|
||||
name appearance on the buttons.
|
||||
*/
|
||||
|
||||
act = ActionManager::register_toggle_action (transport_actions, X_("TogglePunchIn"), _("Punch\nin"), mem_fun(*this, &ARDOUR_UI::toggle_punch_in));
|
||||
act = ActionManager::register_toggle_action (transport_actions, X_("TogglePunchIn"), _("Punch In"), mem_fun(*this, &ARDOUR_UI::toggle_punch_in));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::transport_sensitive_actions.push_back (act);
|
||||
act = ActionManager::register_toggle_action (transport_actions, X_("TogglePunchOut"), _("Punch\nout"), mem_fun(*this, &ARDOUR_UI::toggle_punch_out));
|
||||
act = ActionManager::register_toggle_action (transport_actions, X_("TogglePunchOut"), _("Punch Out"), mem_fun(*this, &ARDOUR_UI::toggle_punch_out));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::transport_sensitive_actions.push_back (act);
|
||||
act = ActionManager::register_toggle_action (transport_actions, X_("ToggleClick"), _("Click"), mem_fun(*this, &ARDOUR_UI::toggle_click));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::transport_sensitive_actions.push_back (act);
|
||||
act = ActionManager::register_toggle_action (transport_actions, X_("ToggleAutoInput"), _("Auto\ninput"), mem_fun(*this, &ARDOUR_UI::toggle_auto_input));
|
||||
act = ActionManager::register_toggle_action (transport_actions, X_("ToggleAutoInput"), _("Auto Input"), mem_fun(*this, &ARDOUR_UI::toggle_auto_input));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::transport_sensitive_actions.push_back (act);
|
||||
act = ActionManager::register_toggle_action (transport_actions, X_("ToggleAutoPlay"), _("Auto\nplay"), mem_fun(*this, &ARDOUR_UI::toggle_auto_play));
|
||||
act = ActionManager::register_toggle_action (transport_actions, X_("ToggleAutoPlay"), _("Auto Play"), mem_fun(*this, &ARDOUR_UI::toggle_auto_play));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::transport_sensitive_actions.push_back (act);
|
||||
act = ActionManager::register_toggle_action (transport_actions, X_("ToggleAutoReturn"), _("Auto\nreturn"), mem_fun(*this, &ARDOUR_UI::toggle_auto_return));
|
||||
act = ActionManager::register_toggle_action (transport_actions, X_("ToggleAutoReturn"), _("Auto Return"), mem_fun(*this, &ARDOUR_UI::toggle_auto_return));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::transport_sensitive_actions.push_back (act);
|
||||
|
||||
act = ActionManager::register_toggle_action (transport_actions, X_("ToggleTimeMaster"), _("Time\nmaster"), mem_fun(*this, &ARDOUR_UI::toggle_time_master));
|
||||
act = ActionManager::register_toggle_action (transport_actions, X_("ToggleTimeMaster"), _("Master"), mem_fun(*this, &ARDOUR_UI::toggle_time_master));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
|
||||
act = ActionManager::register_action (common_actions, X_("ToggleRecordEnableTrack1"), _("Toggle Record Enable Track1"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 0U));
|
||||
|
||||
@@ -60,7 +60,8 @@ AudioStreamView::AudioStreamView (AudioTimeAxisView& tv)
|
||||
stream_base_color = color_map[cAudioTrackBase];
|
||||
else
|
||||
stream_base_color = color_map[cAudioBusBase];
|
||||
|
||||
|
||||
canvas_rect->property_fill_color_rgba() = stream_base_color;
|
||||
canvas_rect->property_outline_color_rgba() = color_map[cAudioTrackOutline];
|
||||
|
||||
_amplitude_above_axis = 1.0;
|
||||
@@ -679,12 +680,12 @@ AudioStreamView::color_handler (ColorID id, uint32_t val)
|
||||
{
|
||||
switch (id) {
|
||||
case cAudioTrackBase:
|
||||
if (_trackview.is_audio_track()) {
|
||||
if (_trackview.is_track()) {
|
||||
canvas_rect->property_fill_color_rgba() = val;
|
||||
}
|
||||
break;
|
||||
case cAudioBusBase:
|
||||
if (!_trackview.is_audio_track()) {
|
||||
if (!_trackview.is_track()) {
|
||||
canvas_rect->property_fill_color_rgba() = val;
|
||||
}
|
||||
break;
|
||||
@@ -696,3 +697,4 @@ AudioStreamView::color_handler (ColorID id, uint32_t val)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -48,25 +48,27 @@ using namespace Editing;
|
||||
|
||||
StreamView::StreamView (RouteTimeAxisView& tv)
|
||||
: _trackview (tv)
|
||||
, canvas_group(new ArdourCanvas::Group(*_trackview.canvas_display))
|
||||
, canvas_rect(new ArdourCanvas::SimpleRect (*canvas_group))
|
||||
, _samples_per_unit(_trackview.editor.get_current_zoom())
|
||||
, rec_updating(false)
|
||||
, rec_active(false)
|
||||
, use_rec_regions(tv.editor.show_waveforms_recording())
|
||||
, region_color(_trackview.color())
|
||||
, stream_base_color(0xFFFFFFFF)
|
||||
{
|
||||
region_color = _trackview.color();
|
||||
|
||||
/* set_position() will position the group */
|
||||
|
||||
canvas_group = new ArdourCanvas::Group(*_trackview.canvas_display);
|
||||
|
||||
canvas_rect = new ArdourCanvas::SimpleRect (*canvas_group);
|
||||
canvas_rect->property_x1() = 0.0;
|
||||
canvas_rect->property_y1() = 0.0;
|
||||
canvas_rect->property_x2() = 1000000.0;
|
||||
canvas_rect->property_y2() = (double) tv.height;
|
||||
canvas_rect->property_outline_what() = (guint32) (0x1|0x2|0x8); // outline ends and bottom
|
||||
canvas_rect->property_fill_color_rgba() = stream_base_color;
|
||||
// (Fill/Outline colours set in derived classes)
|
||||
|
||||
canvas_rect->signal_event().connect (bind (mem_fun (_trackview.editor, &PublicEditor::canvas_stream_view_event), canvas_rect, &_trackview));
|
||||
|
||||
_samples_per_unit = _trackview.editor.get_current_zoom();
|
||||
|
||||
if (_trackview.is_track()) {
|
||||
_trackview.track()->DiskstreamChanged.connect (mem_fun (*this, &StreamView::diskstream_changed));
|
||||
_trackview.session().TransportStateChange.connect (mem_fun (*this, &StreamView::transport_changed));
|
||||
@@ -74,10 +76,6 @@ StreamView::StreamView (RouteTimeAxisView& tv)
|
||||
_trackview.session().RecordStateChanged.connect (mem_fun (*this, &StreamView::sess_rec_enable_changed));
|
||||
}
|
||||
|
||||
rec_updating = false;
|
||||
rec_active = false;
|
||||
use_rec_regions = tv.editor.show_waveforms_recording ();
|
||||
|
||||
ColorChanged.connect (mem_fun (*this, &StreamView::color_handler));
|
||||
}
|
||||
|
||||
@@ -285,13 +283,12 @@ StreamView::apply_color (Gdk::Color& color, ColorTarget target)
|
||||
for (i = region_views.begin(); i != region_views.end(); ++i) {
|
||||
(*i)->set_color (region_color);
|
||||
}
|
||||
// stream_base_color = RGBA_TO_UINT (color.red/256, color.green/256, color.blue/256, 255);
|
||||
// gnome_canvas_item_set (canvas_rect, "fill_color_rgba", stream_base_color, NULL);
|
||||
break;
|
||||
|
||||
case StreamBaseColor:
|
||||
// stream_base_color = RGBA_TO_UINT (color.red/256, color.green/256, color.blue/256, 255);
|
||||
// gnome_canvas_item_set (canvas_rect, "fill_color_rgba", stream_base_color, NULL);
|
||||
stream_base_color = RGBA_TO_UINT (
|
||||
color.get_red_p(), color.get_green_p(), color.get_blue_p(), 255);
|
||||
canvas_rect->property_fill_color_rgba() = stream_base_color;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -139,9 +139,8 @@ protected:
|
||||
bool rec_active;
|
||||
bool use_rec_regions;
|
||||
|
||||
/* XXX why are these different? */
|
||||
Gdk::Color region_color;
|
||||
uint32_t stream_base_color;
|
||||
Gdk::Color region_color; ///< Contained region color
|
||||
uint32_t stream_base_color; ///< Background color
|
||||
|
||||
vector<sigc::connection> playlist_connections;
|
||||
sigc::connection playlist_change_connection;
|
||||
|
||||
@@ -57,4 +57,5 @@ typedef boost::shared_ptr<AUPluginInfo> AUPluginInfoPtr;
|
||||
|
||||
} // namespace ARDOUR
|
||||
|
||||
#endif // __ardour_audio_unit_h__
|
||||
#endif // __ardour_audio_unit_h__
|
||||
|
||||
|
||||
Reference in New Issue
Block a user