13
0

ArdourUI HAS-A BasicUI

The idea is to allow some reduction in code duplication
This commit is contained in:
Paul Davis 2022-11-16 10:48:50 -07:00
parent f7149d5ec9
commit 5330d73c35
3 changed files with 10 additions and 0 deletions

View File

@ -289,6 +289,7 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], const char* localedir)
, _was_dirty (false)
, _mixer_on_top (false)
, _shared_popup_menu (0)
, _basic_ui (0)
, startup_fsm (0)
, secondary_clock_spacer (0)
, latency_disable_button (ArdourButton::led_default_elements)

View File

@ -175,6 +175,7 @@ class MidiTracer;
class NSM_Client;
class LevelMeterHBox;
class GUIObjectState;
class BasicUI;
namespace ARDOUR {
class ControlProtocolInfo;
@ -436,6 +437,7 @@ private:
Gtk::Menu* _shared_popup_menu;
BasicUI* _basic_ui;
void hide_tabbable (ArdourWidgets::Tabbable*);
void detach_tabbable (ArdourWidgets::Tabbable*);
void attach_tabbable (ArdourWidgets::Tabbable*);

View File

@ -44,6 +44,7 @@
#include "ardour/session.h"
#include "control_protocol/control_protocol.h"
#include "control_protocol/basic_ui.h"
#include "gtkmm2ext/keyboard.h"
#include "gtkmm2ext/utils.h"
@ -103,6 +104,12 @@ ARDOUR_UI::set_session (Session *s)
{
SessionHandlePtr::set_session (s);
if (_basic_ui) {
delete _basic_ui;
}
_basic_ui = new BasicUI (*s);
/* adjust sensitivity of menu bar options to reflect presence/absence
* of session
*/