use new GtkUI design in ARDOUR_UI
This commit is contained in:
parent
5265ceec51
commit
5d85b5257e
@ -361,9 +361,6 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], const char* localedir)
|
|||||||
|
|
||||||
(void) theme_manager.get (true);
|
(void) theme_manager.get (true);
|
||||||
|
|
||||||
starting.connect (sigc::mem_fun(*this, &ARDOUR_UI::startup));
|
|
||||||
stopping.connect (sigc::mem_fun(*this, &ARDOUR_UI::shutdown));
|
|
||||||
|
|
||||||
_process_thread = new ProcessThread ();
|
_process_thread = new ProcessThread ();
|
||||||
_process_thread->init ();
|
_process_thread->init ();
|
||||||
|
|
||||||
@ -536,6 +533,10 @@ ARDOUR_UI::post_engine ()
|
|||||||
|
|
||||||
ARDOUR_UI::~ARDOUR_UI ()
|
ARDOUR_UI::~ARDOUR_UI ()
|
||||||
{
|
{
|
||||||
|
if (ui_config->dirty()) {
|
||||||
|
ui_config->save_state();
|
||||||
|
}
|
||||||
|
|
||||||
delete keyboard;
|
delete keyboard;
|
||||||
delete editor;
|
delete editor;
|
||||||
delete mixer;
|
delete mixer;
|
||||||
@ -712,8 +713,8 @@ ARDOUR_UI::check_announcements ()
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
int
|
||||||
ARDOUR_UI::startup ()
|
ARDOUR_UI::starting ()
|
||||||
{
|
{
|
||||||
Application* app = Application::instance ();
|
Application* app = Application::instance ();
|
||||||
char *nsm_url;
|
char *nsm_url;
|
||||||
@ -785,7 +786,7 @@ ARDOUR_UI::startup ()
|
|||||||
s.hide ();
|
s.hide ();
|
||||||
switch (s.response ()) {
|
switch (s.response ()) {
|
||||||
case Gtk::RESPONSE_REJECT:
|
case Gtk::RESPONSE_REJECT:
|
||||||
exit (1);
|
return -1;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -799,8 +800,8 @@ ARDOUR_UI::startup ()
|
|||||||
|
|
||||||
/* go get a session */
|
/* go get a session */
|
||||||
|
|
||||||
if (get_session_parameters (true, ARDOUR_COMMAND_LINE::new_session, ARDOUR_COMMAND_LINE::load_template)) {
|
if (get_session_parameters (false, ARDOUR_COMMAND_LINE::new_session, ARDOUR_COMMAND_LINE::load_template)) {
|
||||||
exit (1);
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -816,6 +817,7 @@ ARDOUR_UI::startup ()
|
|||||||
_status_bar_visibility.update ();
|
_status_bar_visibility.update ();
|
||||||
|
|
||||||
BootMessage (string_compose (_("%1 is ready for use"), PROGRAM_NAME));
|
BootMessage (string_compose (_("%1 is ready for use"), PROGRAM_NAME));
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -2618,6 +2620,7 @@ ARDOUR_UI::get_session_parameters (bool quit_on_cancel, bool should_be_new, stri
|
|||||||
should_be_new = false;
|
should_be_new = false;
|
||||||
|
|
||||||
session_name = session_dialog.session_name (likely_new);
|
session_name = session_dialog.session_name (likely_new);
|
||||||
|
session_path = session_dialog.session_folder ();
|
||||||
|
|
||||||
if (nsm) {
|
if (nsm) {
|
||||||
likely_new = true;
|
likely_new = true;
|
||||||
@ -2640,6 +2643,8 @@ ARDOUR_UI::get_session_parameters (bool quit_on_cancel, bool should_be_new, stri
|
|||||||
_session_is_new = true;
|
_session_is_new = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cerr << "SN " << session_name << " SP " << session_path << endl;
|
||||||
|
|
||||||
if (session_name[0] == G_DIR_SEPARATOR ||
|
if (session_name[0] == G_DIR_SEPARATOR ||
|
||||||
(session_name.length() > 2 && session_name[0] == '.' && session_name[1] == G_DIR_SEPARATOR) ||
|
(session_name.length() > 2 && session_name[0] == '.' && session_name[1] == G_DIR_SEPARATOR) ||
|
||||||
(session_name.length() > 3 && session_name[0] == '.' && session_name[1] == '.' && session_name[2] == G_DIR_SEPARATOR)) {
|
(session_name.length() > 3 && session_name[0] == '.' && session_name[1] == '.' && session_name[2] == G_DIR_SEPARATOR)) {
|
||||||
@ -2712,6 +2717,8 @@ ARDOUR_UI::get_session_parameters (bool quit_on_cancel, bool should_be_new, stri
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
cerr << "Loading session with path = " << session_path << " name = " << session_name << " template " << template_name << endl;
|
||||||
|
|
||||||
ret = load_session (session_path, session_name, template_name);
|
ret = load_session (session_path, session_name, template_name);
|
||||||
|
|
||||||
if (ret == -2) {
|
if (ret == -2) {
|
||||||
@ -3771,6 +3778,7 @@ ARDOUR_UI::disconnect_from_engine ()
|
|||||||
/* drop connection to AudioEngine::Halted so that we don't act
|
/* drop connection to AudioEngine::Halted so that we don't act
|
||||||
* as if the engine unexpectedly shut down
|
* as if the engine unexpectedly shut down
|
||||||
*/
|
*/
|
||||||
|
|
||||||
halt_connection.disconnect ();
|
halt_connection.disconnect ();
|
||||||
|
|
||||||
if (AudioEngine::instance()->stop ()) {
|
if (AudioEngine::instance()->stop ()) {
|
||||||
@ -4117,3 +4125,5 @@ ARDOUR_UI::do_audio_midi_setup (uint32_t desired_sample_rate)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -330,8 +330,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
|
|||||||
|
|
||||||
static ARDOUR_UI *theArdourUI;
|
static ARDOUR_UI *theArdourUI;
|
||||||
|
|
||||||
void startup ();
|
int starting ();
|
||||||
void shutdown ();
|
|
||||||
|
|
||||||
int ask_about_saving_session (const std::vector<std::string>& actions);
|
int ask_about_saving_session (const std::vector<std::string>& actions);
|
||||||
|
|
||||||
|
@ -50,14 +50,6 @@ namespace ARDOUR {
|
|||||||
|
|
||||||
using namespace ARDOUR;
|
using namespace ARDOUR;
|
||||||
|
|
||||||
void
|
|
||||||
ARDOUR_UI::shutdown ()
|
|
||||||
{
|
|
||||||
if (ui_config->dirty()) {
|
|
||||||
ui_config->save_state();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
ARDOUR_UI::we_have_dependents ()
|
ARDOUR_UI::we_have_dependents ()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user