mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-08 15:54:57 +01:00
Merge branch 'master' into cairocanvas
This commit is contained in:
commit
38f2aa51bd
20 changed files with 135 additions and 66 deletions
|
|
@ -153,6 +153,7 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], const char* localedir)
|
|||
/* big clock */
|
||||
|
||||
, big_clock (new AudioClock (X_("bigclock"), false, "big", true, true, false, false))
|
||||
, video_timeline(0)
|
||||
|
||||
/* start of private members */
|
||||
|
||||
|
|
@ -903,6 +904,7 @@ If you still wish to quit, please use the\n\n\
|
|||
}
|
||||
|
||||
delete ARDOUR_UI::instance()->video_timeline;
|
||||
ARDOUR_UI::instance()->video_timeline = NULL;
|
||||
stop_video_server();
|
||||
|
||||
/* Save state before deleting the session, as that causes some
|
||||
|
|
|
|||
|
|
@ -65,14 +65,7 @@ ARDOUR_UI::set_session (Session *s)
|
|||
{
|
||||
SessionHandlePtr::set_session (s);
|
||||
|
||||
if (audio_port_matrix) {
|
||||
audio_port_matrix->set_session (s);
|
||||
}
|
||||
|
||||
if (midi_port_matrix) {
|
||||
midi_port_matrix->set_session (s);
|
||||
}
|
||||
|
||||
WM::Manager::instance().set_session (s);
|
||||
|
||||
if (!_session) {
|
||||
/* Session option editor cannot exist across change-of-session */
|
||||
|
|
@ -95,7 +88,6 @@ ARDOUR_UI::set_session (Session *s)
|
|||
}
|
||||
|
||||
AutomationWatch::instance().set_session (s);
|
||||
WM::Manager::instance().set_session (s);
|
||||
|
||||
if (shuttle_box) {
|
||||
shuttle_box->set_session (s);
|
||||
|
|
@ -106,7 +98,6 @@ ARDOUR_UI::set_session (Session *s)
|
|||
big_clock->set_session (s);
|
||||
time_info_box->set_session (s);
|
||||
video_timeline->set_session (s);
|
||||
location_ui->set_session (s);
|
||||
|
||||
/* sensitize menu bar options that are now valid */
|
||||
|
||||
|
|
@ -222,6 +213,9 @@ ARDOUR_UI::unload_session (bool hide_stuff)
|
|||
editor->hide ();
|
||||
mixer->hide ();
|
||||
theme_manager->hide ();
|
||||
audio_port_matrix->hide();
|
||||
midi_port_matrix->hide();
|
||||
route_params->hide();
|
||||
}
|
||||
|
||||
second_connection.disconnect ();
|
||||
|
|
|
|||
|
|
@ -84,7 +84,6 @@ ArdourWindow::on_unmap ()
|
|||
bool
|
||||
ArdourWindow::on_delete_event (GdkEventAny*)
|
||||
{
|
||||
hide ();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -969,7 +969,7 @@ GainMeter::render_metrics (Gtk::Widget& w, vector<DataType> types)
|
|||
//font = w.get_style()->get_font();
|
||||
|
||||
font.set_weight (Pango::WEIGHT_NORMAL);
|
||||
font.set_size (10.0 * PANGO_SCALE);
|
||||
font.set_size (9.0 * PANGO_SCALE);
|
||||
font_attr = new Pango::AttrFontDesc (Pango::Attribute::create_attr_font_desc (font));
|
||||
audio_font_attributes.change (*font_attr);
|
||||
delete font_attr;
|
||||
|
|
@ -1057,10 +1057,11 @@ GainMeter::render_metrics (Gtk::Widget& w, vector<DataType> types)
|
|||
}
|
||||
|
||||
gint const pos = height - (gint) floor (height * fraction);
|
||||
float const linepos = min((float) height, (float)(pos + .5f));
|
||||
|
||||
cairo_set_line_width (cr, 1.0);
|
||||
cairo_move_to (cr, 0, pos);
|
||||
cairo_line_to (cr, 3.5, pos);
|
||||
cairo_move_to (cr, 0, linepos);
|
||||
cairo_line_to (cr, 3.5, linepos);
|
||||
cairo_stroke (cr);
|
||||
|
||||
snprintf (buf, sizeof (buf), "%2d", abs (*j));
|
||||
|
|
|
|||
|
|
@ -235,8 +235,7 @@ bool
|
|||
IOSelectorWindow::wm_delete (GdkEventAny* /*event*/)
|
||||
{
|
||||
_selector.Finished (IOSelector::Accepted);
|
||||
hide ();
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -307,6 +307,10 @@ LocationEditRow::set_location (Location *loc)
|
|||
end_clock.show();
|
||||
length_clock.show();
|
||||
|
||||
if (location->is_cd_marker()) {
|
||||
show_cd_track_details ();
|
||||
}
|
||||
|
||||
ARDOUR_UI::instance()->set_tip (remove_button, _("Remove this range"));
|
||||
ARDOUR_UI::instance()->set_tip (start_clock, _("Start time - middle click to locate here"));
|
||||
ARDOUR_UI::instance()->set_tip (end_clock, _("End time - middle click to locate here"));
|
||||
|
|
@ -446,6 +450,34 @@ LocationEditRow::clock_changed (LocationPart part)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
LocationEditRow::show_cd_track_details ()
|
||||
{
|
||||
|
||||
if (location->cd_info.find("isrc") != location->cd_info.end()) {
|
||||
isrc_entry.set_text(location->cd_info["isrc"]);
|
||||
}
|
||||
if (location->cd_info.find("performer") != location->cd_info.end()) {
|
||||
performer_entry.set_text(location->cd_info["performer"]);
|
||||
}
|
||||
if (location->cd_info.find("composer") != location->cd_info.end()) {
|
||||
composer_entry.set_text(location->cd_info["composer"]);
|
||||
}
|
||||
if (location->cd_info.find("scms") != location->cd_info.end()) {
|
||||
scms_check_button.set_active(true);
|
||||
}
|
||||
if (location->cd_info.find("preemph") != location->cd_info.end()) {
|
||||
preemph_check_button.set_active(true);
|
||||
}
|
||||
|
||||
|
||||
if (!cd_track_details_hbox.get_parent()) {
|
||||
item_table.attach (cd_track_details_hbox, 0, 7, 1, 2, FILL | EXPAND, FILL, 4, 0);
|
||||
}
|
||||
// item_table.resize(2, 7);
|
||||
cd_track_details_hbox.show_all();
|
||||
}
|
||||
|
||||
void
|
||||
LocationEditRow::cd_toggled ()
|
||||
{
|
||||
|
|
@ -469,27 +501,7 @@ LocationEditRow::cd_toggled ()
|
|||
|
||||
if (location->is_cd_marker() && !(location->is_mark())) {
|
||||
|
||||
if (location->cd_info.find("isrc") != location->cd_info.end()) {
|
||||
isrc_entry.set_text(location->cd_info["isrc"]);
|
||||
}
|
||||
if (location->cd_info.find("performer") != location->cd_info.end()) {
|
||||
performer_entry.set_text(location->cd_info["performer"]);
|
||||
}
|
||||
if (location->cd_info.find("composer") != location->cd_info.end()) {
|
||||
composer_entry.set_text(location->cd_info["composer"]);
|
||||
}
|
||||
if (location->cd_info.find("scms") != location->cd_info.end()) {
|
||||
scms_check_button.set_active(true);
|
||||
}
|
||||
if (location->cd_info.find("preemph") != location->cd_info.end()) {
|
||||
preemph_check_button.set_active(true);
|
||||
}
|
||||
|
||||
if (!cd_track_details_hbox.get_parent()) {
|
||||
item_table.attach (cd_track_details_hbox, 0, 7, 1, 2, FILL | EXPAND, FILL, 4, 0);
|
||||
}
|
||||
// item_table.resize(2, 7);
|
||||
cd_track_details_hbox.show_all();
|
||||
show_cd_track_details ();
|
||||
|
||||
} else if (cd_track_details_hbox.get_parent()){
|
||||
|
||||
|
|
@ -1153,8 +1165,7 @@ LocationUIWindow::on_map ()
|
|||
bool
|
||||
LocationUIWindow::on_delete_event (GdkEventAny*)
|
||||
{
|
||||
hide ();
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -140,6 +140,7 @@ class LocationEditRow : public Gtk::HBox, public ARDOUR::SessionHandlePtr
|
|||
void position_lock_style_changed (ARDOUR::Location *);
|
||||
|
||||
void set_clock_editable_status ();
|
||||
void show_cd_track_details ();
|
||||
|
||||
PBD::ScopedConnectionList connections;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -199,7 +199,7 @@ MidiTimeAxisView::set_route (boost::shared_ptr<Route> rt)
|
|||
v->pack_start (*manage (new Label ("")), true, true);
|
||||
v->show ();
|
||||
h->show ();
|
||||
controls_hbox.pack_start(*v);
|
||||
controls_hbox.pack_start(*v, false, false);
|
||||
|
||||
controls_ebox.set_name ("MidiTrackControlsBaseUnselected");
|
||||
controls_base_selected_name = "MidiTrackControlsBaseSelected";
|
||||
|
|
|
|||
|
|
@ -148,7 +148,6 @@ PluginUIWindow::PluginUIWindow (
|
|||
set_name ("PluginEditor");
|
||||
add_events (Gdk::KEY_PRESS_MASK|Gdk::KEY_RELEASE_MASK|Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK);
|
||||
|
||||
signal_delete_event().connect (sigc::bind (sigc::ptr_fun (just_hide_it), reinterpret_cast<Window*> (this)), false);
|
||||
insert->DropReferences.connect (death_connection, invalidator (*this), boost::bind (&PluginUIWindow::plugin_going_away, this), gui_context());
|
||||
|
||||
gint h = _pluginui->get_preferred_height ();
|
||||
|
|
|
|||
|
|
@ -184,7 +184,7 @@ bool
|
|||
PortInsertWindow::wm_delete (GdkEventAny* /*event*/)
|
||||
{
|
||||
accept ();
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -161,7 +161,6 @@ RegionEditor::RegionEditor (Session* s, boost::shared_ptr<Region> r)
|
|||
set_name ("RegionEditorWindow");
|
||||
add_events (Gdk::KEY_PRESS_MASK|Gdk::KEY_RELEASE_MASK);
|
||||
|
||||
signal_delete_event().connect (sigc::bind (sigc::ptr_fun (just_hide_it), static_cast<Window *> (this)));
|
||||
signal_response().connect (sigc::mem_fun (*this, &RegionEditor::handle_response));
|
||||
|
||||
set_title (string_compose (_("Region '%1'"), _region->name()));
|
||||
|
|
|
|||
|
|
@ -111,7 +111,6 @@ ReturnUIWindow::ReturnUIWindow (boost::shared_ptr<Return> r, ARDOUR::Session* s)
|
|||
set_name ("ReturnUIWindow");
|
||||
|
||||
r->DropReferences.connect (going_away_connection, invalidator (*this), boost::bind (&ReturnUIWindow::return_going_away, this), gui_context());
|
||||
signal_delete_event().connect (sigc::bind (sigc::ptr_fun (just_hide_it), reinterpret_cast<Window *> (this)));
|
||||
}
|
||||
|
||||
ReturnUIWindow::~ReturnUIWindow ()
|
||||
|
|
|
|||
|
|
@ -146,11 +146,6 @@ RouteParams_UI::RouteParams_UI ()
|
|||
add_events (Gdk::KEY_PRESS_MASK|Gdk::KEY_RELEASE_MASK|Gdk::BUTTON_RELEASE_MASK);
|
||||
|
||||
_plugin_selector = new PluginSelector (PluginManager::instance());
|
||||
_plugin_selector->signal_delete_event().connect (sigc::bind (ptr_fun (just_hide_it),
|
||||
static_cast<Window *> (_plugin_selector)));
|
||||
|
||||
|
||||
signal_delete_event().connect(sigc::bind(ptr_fun(just_hide_it), static_cast<Gtk::Window *>(this)));
|
||||
}
|
||||
|
||||
RouteParams_UI::~RouteParams_UI ()
|
||||
|
|
|
|||
|
|
@ -133,10 +133,6 @@ SendUIWindow::SendUIWindow (boost::shared_ptr<Send> s, Session* session)
|
|||
hpacker.show ();
|
||||
|
||||
s->DropReferences.connect (going_away_connection, invalidator (*this), boost::bind (&SendUIWindow::send_going_away, this), gui_context());
|
||||
|
||||
signal_delete_event().connect (sigc::bind (
|
||||
sigc::ptr_fun (just_hide_it),
|
||||
reinterpret_cast<Window *> (this)));
|
||||
}
|
||||
|
||||
SendUIWindow::~SendUIWindow ()
|
||||
|
|
|
|||
|
|
@ -236,7 +236,7 @@ Splash::message (const string& msg)
|
|||
}
|
||||
|
||||
while (!expose_done) {
|
||||
gtk_main_iteration ();
|
||||
if(gtk_main_iteration ()) return; // quit was called
|
||||
}
|
||||
gdk_display_flush (gdk_display_get_default());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ bool
|
|||
StepEditor::step_editor_hidden (GdkEventAny*)
|
||||
{
|
||||
step_editor_hide ();
|
||||
return true;
|
||||
return true; // XXX remember position ?!
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -52,6 +52,10 @@ Manager::Manager ()
|
|||
{
|
||||
}
|
||||
|
||||
Manager::~Manager ()
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
Manager::register_window (ProxyBase* info)
|
||||
{
|
||||
|
|
@ -120,11 +124,9 @@ Manager::add_state (XMLNode& root) const
|
|||
void
|
||||
Manager::set_session (ARDOUR::Session* s)
|
||||
{
|
||||
SessionHandlePtr::set_session (s);
|
||||
for (Windows::const_iterator i = _windows.begin(); i != _windows.end(); ++i) {
|
||||
ARDOUR::SessionHandlePtr* sp = (*i)->session_handle ();
|
||||
if (sp) {
|
||||
sp->set_session (s);
|
||||
}
|
||||
(*i)->set_session(s);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -263,8 +265,27 @@ ProxyBase::toggle()
|
|||
_window->show_all();
|
||||
/* we'd like to just call this and nothing else */
|
||||
_window->present ();
|
||||
|
||||
if (_width != -1 && _height != -1) {
|
||||
_window->set_default_size (_width, _height);
|
||||
}
|
||||
if (_x_off != -1 && _y_off != -1) {
|
||||
_window->move (_x_off, _y_off);
|
||||
}
|
||||
|
||||
} else {
|
||||
if (_window->is_mapped()) {
|
||||
save_pos_and_size();
|
||||
}
|
||||
vistracker->cycle_visibility ();
|
||||
if (_window->is_mapped()) {
|
||||
if (_width != -1 && _height != -1) {
|
||||
_window->set_default_size (_width, _height);
|
||||
}
|
||||
if (_x_off != -1 && _y_off != -1) {
|
||||
_window->move (_x_off, _y_off);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -281,9 +302,11 @@ ProxyBase::get_state () const
|
|||
/* we have a window, so use current state */
|
||||
|
||||
_visible = vistracker->partially_visible ();
|
||||
if (_visible) {
|
||||
_window->get_position (_x_off, _y_off);
|
||||
_window->get_size (_width, _height);
|
||||
}
|
||||
}
|
||||
|
||||
node->add_property (X_("visible"), _visible? X_("yes") : X_("no"));
|
||||
|
||||
|
|
@ -325,6 +348,7 @@ ProxyBase::setup ()
|
|||
assert (_window);
|
||||
|
||||
vistracker = new Gtkmm2ext::VisibilityTracker (*_window);
|
||||
_window->signal_delete_event().connect (sigc::mem_fun (*this, &ProxyBase::handle_win_event));
|
||||
|
||||
if (_width != -1 || _height != -1 || _x_off != -1 || _y_off != -1) {
|
||||
/* cancel any mouse-based positioning */
|
||||
|
|
@ -338,6 +362,7 @@ ProxyBase::setup ()
|
|||
if (_x_off != -1 && _y_off != -1) {
|
||||
_window->move (_x_off, _y_off);
|
||||
}
|
||||
set_session(_session);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -379,10 +404,25 @@ ProxyBase::hide ()
|
|||
{
|
||||
Gtk::Window* win = get (false);
|
||||
if (win) {
|
||||
save_pos_and_size();
|
||||
win->hide ();
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
ProxyBase::handle_win_event (GdkEventAny *ev)
|
||||
{
|
||||
hide();
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
ProxyBase::save_pos_and_size ()
|
||||
{
|
||||
Gtk::Window* win = get (false);
|
||||
win->get_position (_x_off, _y_off);
|
||||
win->get_size (_width, _height);
|
||||
}
|
||||
/*-----------------------*/
|
||||
|
||||
ProxyTemporary::ProxyTemporary (const string& name, Gtk::Window* win)
|
||||
|
|
@ -395,6 +435,7 @@ ProxyTemporary::~ProxyTemporary ()
|
|||
{
|
||||
}
|
||||
|
||||
|
||||
ARDOUR::SessionHandlePtr*
|
||||
ProxyTemporary::session_handle()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ namespace WM {
|
|||
|
||||
class ProxyBase;
|
||||
|
||||
class Manager
|
||||
class Manager : public ARDOUR::SessionHandlePtr
|
||||
{
|
||||
public:
|
||||
static Manager& instance();
|
||||
|
|
@ -75,7 +75,7 @@ class Manager
|
|||
static Manager* _instance;
|
||||
};
|
||||
|
||||
class ProxyBase : public sigc::trackable {
|
||||
class ProxyBase : public ARDOUR::SessionHandlePtr, public sigc::trackable {
|
||||
public:
|
||||
ProxyBase (const std::string& name, const std::string& menu_name);
|
||||
ProxyBase (const std::string& name, const std::string& menu_name, const XMLNode&);
|
||||
|
|
@ -121,6 +121,9 @@ class ProxyBase : public sigc::trackable {
|
|||
mutable int _height; ///< height
|
||||
Gtkmm2ext::VisibilityTracker* vistracker;
|
||||
|
||||
void save_pos_and_size ();
|
||||
bool handle_win_event (GdkEventAny *ev);
|
||||
|
||||
void setup ();
|
||||
};
|
||||
|
||||
|
|
@ -175,6 +178,15 @@ class ProxyWithConstructor: public ProxyBase {
|
|||
return dynamic_cast<T*> (_window);
|
||||
}
|
||||
|
||||
void set_session(ARDOUR::Session *s) {
|
||||
SessionHandlePtr::set_session (s);
|
||||
ARDOUR::SessionHandlePtr* sp = session_handle ();
|
||||
if (sp) {
|
||||
sp->set_session (s);
|
||||
dynamic_cast<T*>(_window)->set_session(s);
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
boost::function<T*()> creator;
|
||||
};
|
||||
|
|
@ -213,6 +225,15 @@ class Proxy : public ProxyBase {
|
|||
return dynamic_cast<T*> (_window);
|
||||
}
|
||||
|
||||
void set_session(ARDOUR::Session *s) {
|
||||
SessionHandlePtr::set_session (s);
|
||||
ARDOUR::SessionHandlePtr* sp = session_handle ();
|
||||
if (sp) {
|
||||
sp->set_session (s);
|
||||
dynamic_cast<T*>(_window)->set_session(s);
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
boost::function<T*()> creator;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -137,6 +137,18 @@ PeakMeter::reflect_inputs (const ChanCount& in)
|
|||
{
|
||||
current_meters = in;
|
||||
|
||||
const size_t limit = min (_peak_power.size(), (size_t) current_meters.n_total ());
|
||||
const size_t n_midi = min (_peak_power.size(), (size_t) current_meters.n_midi());
|
||||
|
||||
for (size_t n = 0; n < limit; ++n) {
|
||||
if (n < n_midi) {
|
||||
_visible_peak_power[n] = 0;
|
||||
} else {
|
||||
_visible_peak_power[n] = -INFINITY;
|
||||
}
|
||||
}
|
||||
reset_max();
|
||||
|
||||
ConfigurationChanged (in, in); /* EMIT SIGNAL */
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -945,6 +945,6 @@ Track::set_monitoring (MonitorChoice mc)
|
|||
MeterState
|
||||
Track::metering_state () const
|
||||
{
|
||||
return _diskstream->record_enabled() ? MeteringInput : MeteringRoute;
|
||||
return (_diskstream->record_enabled() || _meter_point == MeterInput) ? MeteringInput : MeteringRoute;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue