Properly update main window-title.
authorRobin Gareus <robin@gareus.org>
Thu, 16 Feb 2017 15:07:59 +0000 (16:07 +0100)
committerRobin Gareus <robin@gareus.org>
Thu, 16 Feb 2017 15:07:59 +0000 (16:07 +0100)
This fixes an issue with Session > Snapshot & switch, not updating
the widow title to the new snapshot (and probably some other edge cases
where it was possible for a detached editor and main window to
have different titles).

The main UI now updates the window-title like the Editor on StateSaved.
(it may lead to dup updates with DirtyChanged, c'est la vie)

gtk2_ardour/ardour_ui_dialogs.cc

index 561fac9c158c6b458e10eca69b39640e9ab73690..78f6d1471499eac98d29f2aec357e5a55e54921d 100644 (file)
@@ -159,6 +159,7 @@ ARDOUR_UI::set_session (Session *s)
        blink_connection = Timers::blink_connect (sigc::mem_fun(*this, &ARDOUR_UI::blink_handler));
 
        _session->SaveSessionRequested.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::save_session_at_its_request, this, _1), gui_context());
+       _session->StateSaved.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::update_title, this), gui_context());
        _session->RecordStateChanged.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::record_state_changed, this), gui_context());
        _session->StepEditStatusChange.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::step_edit_status_change, this, _1), gui_context());
        _session->TransportStateChange.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::map_transport_state, this), gui_context());