mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-21 06:06:25 +01:00
prevent wierd GTK main loop situation when quitting from NSD at startup
git-svn-id: svn://localhost/ardour2/trunk@1610 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
e6481db654
commit
f9d23955b5
4 changed files with 13 additions and 8 deletions
|
|
@ -1717,7 +1717,7 @@ ARDOUR_UI::save_template ()
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
bool
|
||||
ARDOUR_UI::new_session (std::string predetermined_path)
|
||||
{
|
||||
string session_name;
|
||||
|
|
@ -1726,7 +1726,7 @@ ARDOUR_UI::new_session (std::string predetermined_path)
|
|||
if (!engine->connected()) {
|
||||
MessageDialog msg (_("Ardour is not connected to JACK at this time. Creating new sessions is not possible."));
|
||||
msg.run ();
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
int response = Gtk::RESPONSE_NONE;
|
||||
|
|
@ -1743,7 +1743,7 @@ ARDOUR_UI::new_session (std::string predetermined_path)
|
|||
new_session_dialog->hide ();
|
||||
MessageDialog msg (_("Ardour is not connected to JACK at this time. Creating new sessions is not possible."));
|
||||
msg.run ();
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
_session_is_new = false;
|
||||
|
|
@ -1754,7 +1754,7 @@ ARDOUR_UI::new_session (std::string predetermined_path)
|
|||
quit();
|
||||
}
|
||||
new_session_dialog->hide ();
|
||||
return;
|
||||
return false;
|
||||
|
||||
} else if (response == Gtk::RESPONSE_NONE) {
|
||||
|
||||
|
|
@ -1929,6 +1929,7 @@ ARDOUR_UI::new_session (std::string predetermined_path)
|
|||
show();
|
||||
new_session_dialog->get_window()->set_cursor();
|
||||
new_session_dialog->hide();
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI
|
|||
_will_create_new_session_automatically = yn;
|
||||
}
|
||||
|
||||
void new_session(std::string path = string());
|
||||
bool new_session(std::string path = string());
|
||||
gint cmdline_new_session (string path);
|
||||
int unload_session ();
|
||||
void close_session();
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ ARDOUR_UI::install_actions ()
|
|||
|
||||
/* the real actions */
|
||||
|
||||
act = ActionManager::register_action (main_actions, X_("New"), _("New"), bind (mem_fun(*this, &ARDOUR_UI::new_session), string ()));
|
||||
act = ActionManager::register_action (main_actions, X_("New"), _("New"), hide_return (bind (mem_fun(*this, &ARDOUR_UI::new_session), string ())));
|
||||
|
||||
ActionManager::register_action (main_actions, X_("Open"), _("Open"), mem_fun(*this, &ARDOUR_UI::open_session));
|
||||
ActionManager::register_action (main_actions, X_("Recent"), _("Recent"), mem_fun(*this, &ARDOUR_UI::open_recent_session));
|
||||
|
|
|
|||
|
|
@ -127,7 +127,9 @@ maybe_load_session ()
|
|||
if (!session_name.length()) {
|
||||
ui->hide_splash ();
|
||||
if (!Config->get_no_new_session_dialog()) {
|
||||
ui->new_session ();
|
||||
if (!ui->new_session ()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
@ -168,7 +170,9 @@ maybe_load_session ()
|
|||
/* Show the NSD */
|
||||
ui->hide_splash ();
|
||||
if (!Config->get_no_new_session_dialog()) {
|
||||
ui->new_session ();
|
||||
if (!ui->new_session ()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue