Keep Script-Dialog on top of Script-Manager Window
This commit is contained in:
parent
16030f63a1
commit
ac2ed95677
|
@ -442,7 +442,7 @@ ARDOUR_UI::bind_lua_action_script (GdkEventButton*ev, int i)
|
||||||
if (Gtkmm2ext::Keyboard::modifier_state_equals (ev->state, Gtkmm2ext::Keyboard::TertiaryModifier)) {
|
if (Gtkmm2ext::Keyboard::modifier_state_equals (ev->state, Gtkmm2ext::Keyboard::TertiaryModifier)) {
|
||||||
li->remove_lua_action (i);
|
li->remove_lua_action (i);
|
||||||
} else {
|
} else {
|
||||||
li->interactive_add (LuaScriptInfo::EditorAction, i);
|
li->interactive_add (*editor->current_toplevel (), LuaScriptInfo::EditorAction, i);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -256,7 +256,7 @@ LuaScriptManager::set_action_btn_clicked ()
|
||||||
TreeModel::Row row = *(_a_view.get_selection()->get_selected());
|
TreeModel::Row row = *(_a_view.get_selection()->get_selected());
|
||||||
assert (row);
|
assert (row);
|
||||||
LuaInstance *li = LuaInstance::instance();
|
LuaInstance *li = LuaInstance::instance();
|
||||||
li->interactive_add (LuaScriptInfo::EditorAction, row[_a_model.id]);
|
li->interactive_add (*this, LuaScriptInfo::EditorAction, row[_a_model.id]);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -347,7 +347,7 @@ void
|
||||||
LuaScriptManager::add_callback_btn_clicked ()
|
LuaScriptManager::add_callback_btn_clicked ()
|
||||||
{
|
{
|
||||||
LuaInstance *li = LuaInstance::instance();
|
LuaInstance *li = LuaInstance::instance();
|
||||||
li->interactive_add (LuaScriptInfo::EditorHook, -1);
|
li->interactive_add (*this, LuaScriptInfo::EditorHook, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -431,7 +431,7 @@ LuaScriptManager::add_sess_btn_clicked ()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
LuaInstance *li = LuaInstance::instance();
|
LuaInstance *li = LuaInstance::instance();
|
||||||
li->interactive_add (LuaScriptInfo::Session, -1);
|
li->interactive_add (*this, LuaScriptInfo::Session, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -1532,7 +1532,7 @@ LuaInstance::pre_seed_scripts ()
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
LuaInstance::interactive_add (LuaScriptInfo::ScriptType type, int id)
|
LuaInstance::interactive_add (Gtk::Window& parent, LuaScriptInfo::ScriptType type, int id)
|
||||||
{
|
{
|
||||||
std::string title;
|
std::string title;
|
||||||
std::string param_function = "action_params";
|
std::string param_function = "action_params";
|
||||||
|
@ -1560,7 +1560,7 @@ LuaInstance::interactive_add (LuaScriptInfo::ScriptType type, int id)
|
||||||
}
|
}
|
||||||
|
|
||||||
LuaScriptInfoPtr spi;
|
LuaScriptInfoPtr spi;
|
||||||
ScriptSelector ss (title, type);
|
ScriptSelector ss (parent, title, type);
|
||||||
switch (ss.run ()) {
|
switch (ss.run ()) {
|
||||||
case Gtk::RESPONSE_ACCEPT:
|
case Gtk::RESPONSE_ACCEPT:
|
||||||
spi = ss.script();
|
spi = ss.script();
|
||||||
|
|
|
@ -124,7 +124,7 @@ public:
|
||||||
int load_state ();
|
int load_state ();
|
||||||
int save_state ();
|
int save_state ();
|
||||||
|
|
||||||
bool interactive_add (ARDOUR::LuaScriptInfo::ScriptType, int);
|
bool interactive_add (Gtk::Window&, ARDOUR::LuaScriptInfo::ScriptType, int);
|
||||||
|
|
||||||
/* actions */
|
/* actions */
|
||||||
void call_action (const int);
|
void call_action (const int);
|
||||||
|
|
|
@ -29,8 +29,8 @@ using namespace std;
|
||||||
using namespace Gtk;
|
using namespace Gtk;
|
||||||
using namespace ARDOUR;
|
using namespace ARDOUR;
|
||||||
|
|
||||||
ScriptSelector::ScriptSelector (std::string title, LuaScriptInfo::ScriptType type)
|
ScriptSelector::ScriptSelector (Gtk::Window& parent, std::string title, LuaScriptInfo::ScriptType type)
|
||||||
: ArdourDialog (title)
|
: ArdourDialog (parent, title, true)
|
||||||
, _type_label ("<b>Type:</b>", Gtk::ALIGN_END, Gtk::ALIGN_CENTER)
|
, _type_label ("<b>Type:</b>", Gtk::ALIGN_END, Gtk::ALIGN_CENTER)
|
||||||
, _type ("", Gtk::ALIGN_START, Gtk::ALIGN_CENTER)
|
, _type ("", Gtk::ALIGN_START, Gtk::ALIGN_CENTER)
|
||||||
, _author_label ("<b>Author:</b>", Gtk::ALIGN_END, Gtk::ALIGN_CENTER)
|
, _author_label ("<b>Author:</b>", Gtk::ALIGN_END, Gtk::ALIGN_CENTER)
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
class ScriptSelector : public ArdourDialog
|
class ScriptSelector : public ArdourDialog
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ScriptSelector (std::string title, ARDOUR::LuaScriptInfo::ScriptType t);
|
ScriptSelector (Gtk::Window& parent, std::string title, ARDOUR::LuaScriptInfo::ScriptType t);
|
||||||
ARDOUR::LuaScriptInfoPtr script() const { return _script; }
|
ARDOUR::LuaScriptInfoPtr script() const { return _script; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
Loading…
Reference in New Issue