Set transient parent for missing-* dialogs at start
This commit is contained in:
parent
95bf443735
commit
005bd4f76f
@ -476,7 +476,7 @@ ARDOUR_UI::load_session_stage_two (const std::string& path, const std::string& s
|
|||||||
{
|
{
|
||||||
list<string> const u = new_session->missing_filesources (DataType::MIDI);
|
list<string> const u = new_session->missing_filesources (DataType::MIDI);
|
||||||
if (!u.empty()) {
|
if (!u.empty()) {
|
||||||
MissingFileSourceDialog d (_session, u, DataType::MIDI);
|
MissingFileSourceDialog d (_main_window, _session, u, DataType::MIDI);
|
||||||
d.run ();
|
d.run ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -484,7 +484,7 @@ ARDOUR_UI::load_session_stage_two (const std::string& path, const std::string& s
|
|||||||
list<string> const u = new_session->unknown_processors ();
|
list<string> const u = new_session->unknown_processors ();
|
||||||
bool scan_now = false;
|
bool scan_now = false;
|
||||||
if (!u.empty()) {
|
if (!u.empty()) {
|
||||||
MissingPluginDialog d (_session, u, PluginManager::instance ().cache_valid ());
|
MissingPluginDialog d (_main_window, _session, u, PluginManager::instance ().cache_valid ());
|
||||||
if (d.run () == RESPONSE_YES) {
|
if (d.run () == RESPONSE_YES) {
|
||||||
scan_now = true;
|
scan_now = true;
|
||||||
}
|
}
|
||||||
|
@ -125,7 +125,7 @@ ARDOUR_UI::setup_profile ()
|
|||||||
int
|
int
|
||||||
ARDOUR_UI::missing_file (Session*s, std::string str, DataType type)
|
ARDOUR_UI::missing_file (Session*s, std::string str, DataType type)
|
||||||
{
|
{
|
||||||
MissingFileDialog dialog (s, str, type);
|
MissingFileDialog dialog (_main_window, s, str, type);
|
||||||
|
|
||||||
dialog.show ();
|
dialog.show ();
|
||||||
dialog.present ();
|
dialog.present ();
|
||||||
|
@ -36,8 +36,8 @@ using namespace std;
|
|||||||
using namespace ARDOUR;
|
using namespace ARDOUR;
|
||||||
using namespace PBD;
|
using namespace PBD;
|
||||||
|
|
||||||
MissingFileDialog::MissingFileDialog (Session* s, const std::string& path, DataType type)
|
MissingFileDialog::MissingFileDialog (Gtk::Window& parent, Session* s, const std::string& path, DataType type)
|
||||||
: ArdourDialog (_("Missing File"), true, false)
|
: ArdourDialog (parent, _("Missing File"), true, false)
|
||||||
, filetype (type)
|
, filetype (type)
|
||||||
, is_absolute_path (Glib::path_is_absolute (path))
|
, is_absolute_path (Glib::path_is_absolute (path))
|
||||||
, chooser (_("Select a folder to search"), FILE_CHOOSER_ACTION_SELECT_FOLDER)
|
, chooser (_("Select a folder to search"), FILE_CHOOSER_ACTION_SELECT_FOLDER)
|
||||||
|
@ -36,7 +36,7 @@ namespace ARDOUR {
|
|||||||
class MissingFileDialog : public ArdourDialog
|
class MissingFileDialog : public ArdourDialog
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MissingFileDialog (ARDOUR::Session*, const std::string& path, ARDOUR::DataType type);
|
MissingFileDialog (Gtk::Window&, ARDOUR::Session*, const std::string& path, ARDOUR::DataType type);
|
||||||
|
|
||||||
int get_action();
|
int get_action();
|
||||||
|
|
||||||
|
@ -29,8 +29,8 @@ using namespace std;
|
|||||||
using namespace ARDOUR;
|
using namespace ARDOUR;
|
||||||
using namespace PBD;
|
using namespace PBD;
|
||||||
|
|
||||||
MissingFileSourceDialog::MissingFileSourceDialog (Session * s, list<string> const& files, DataType dt)
|
MissingFileSourceDialog::MissingFileSourceDialog (Gtk::Window& parent, Session* s, list<string> const& files, DataType dt)
|
||||||
: ArdourDialog (_("Missing Source Files"), true, false)
|
: ArdourDialog (parent, _("Missing Source Files"), true, false)
|
||||||
{
|
{
|
||||||
/* This dialog is always shown programatically. Center the window.*/
|
/* This dialog is always shown programatically. Center the window.*/
|
||||||
set_position (Gtk::WIN_POS_CENTER);
|
set_position (Gtk::WIN_POS_CENTER);
|
||||||
|
@ -34,7 +34,7 @@ namespace ARDOUR {
|
|||||||
class MissingFileSourceDialog : public ArdourDialog
|
class MissingFileSourceDialog : public ArdourDialog
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MissingFileSourceDialog (ARDOUR::Session *, std::list<std::string> const &, ARDOUR::DataType);
|
MissingFileSourceDialog (Gtk::Window&, ARDOUR::Session*, std::list<std::string> const &, ARDOUR::DataType);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -31,8 +31,8 @@ using namespace std;
|
|||||||
using namespace ARDOUR;
|
using namespace ARDOUR;
|
||||||
using namespace PBD;
|
using namespace PBD;
|
||||||
|
|
||||||
MissingPluginDialog::MissingPluginDialog (Session* s, list<string> const & plugins, bool cache_valid)
|
MissingPluginDialog::MissingPluginDialog (Gtk::Window& parent, Session* s, list<string> const & plugins, bool cache_valid)
|
||||||
: ArdourDialog (_("Missing Plugins"), true, false)
|
: ArdourDialog (parent, _("Missing Plugins"), true, false)
|
||||||
{
|
{
|
||||||
/* This dialog is always shown programatically. Center the window.*/
|
/* This dialog is always shown programatically. Center the window.*/
|
||||||
set_position (Gtk::WIN_POS_CENTER);
|
set_position (Gtk::WIN_POS_CENTER);
|
||||||
|
@ -30,7 +30,7 @@ namespace ARDOUR {
|
|||||||
class MissingPluginDialog : public ArdourDialog
|
class MissingPluginDialog : public ArdourDialog
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MissingPluginDialog (ARDOUR::Session*, std::list<std::string> const &, bool);
|
MissingPluginDialog (Gtk::Window&, ARDOUR::Session*, std::list<std::string> const &, bool);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* __gtk_ardour_missing_plugin_dialog_h__ */
|
#endif /* __gtk_ardour_missing_plugin_dialog_h__ */
|
||||||
|
@ -159,7 +159,9 @@ Splash::pop_back_for (Gtk::Window& win)
|
|||||||
hide ();
|
hide ();
|
||||||
} else if (is_mapped()) {
|
} else if (is_mapped()) {
|
||||||
get_window()->restack (win.get_window(), false);
|
get_window()->restack (win.get_window(), false);
|
||||||
win.set_transient_for (*this);
|
if (0 == win.get_transient_for ()) {
|
||||||
|
win.set_transient_for (*this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
_window_stack.insert (&win);
|
_window_stack.insert (&win);
|
||||||
|
Loading…
Reference in New Issue
Block a user