luaBridge support const references to class-instance pointers
[ardour.git] / gtk2_ardour / script_selector.cc
index a8a1b6e9578cee45a9062636f69873084b9eaf1d..a80a0af1cc0ba2c325114872e5210b3efc49ee2c 100644 (file)
@@ -19,7 +19,7 @@
 #include "gtkmm2ext/utils.h"
 
 #include "script_selector.h"
-#include "i18n.h"
+#include "pbd/i18n.h"
 
 using namespace std;
 using namespace Gtk;
@@ -42,22 +42,22 @@ ScriptSelector::ScriptSelector (std::string title, LuaScriptInfo::ScriptType typ
 
        l = manage (new Label (_("<b>Type:</b>"), Gtk::ALIGN_END, Gtk::ALIGN_CENTER, false));
        l->set_use_markup ();
-       t->attach (*l, 0, 1, ty, ty+1);
-       t->attach (_type, 1, 2, ty, ty+1);
+       t->attach (*l, 0, 1, ty, ty+1, FILL|EXPAND, SHRINK);
+       t->attach (_type, 1, 2, ty, ty+1, FILL|EXPAND, SHRINK);
        ++ty;
 
        l = manage (new Label (_("<b>Author:</b>"), Gtk::ALIGN_END, Gtk::ALIGN_CENTER, false));
        l->set_use_markup ();
-       t->attach (*l, 0, 1, ty, ty+1);
-       t->attach (_author, 1, 2, ty, ty+1);
+       t->attach (*l, 0, 1, ty, ty+1, FILL|EXPAND, SHRINK);
+       t->attach (_author, 1, 2, ty, ty+1, FILL|EXPAND, SHRINK);
        ++ty;
 
-       l = manage (new Label (_("<b>Description:</b>"), Gtk::ALIGN_END, Gtk::ALIGN_CENTER, false));
-       l->set_use_markup ();
-       t->attach (*l, 0, 1, ty, ty+1);
-       t->attach (_description, 1, 2, ty, ty+1);
+       Frame* f = manage(new Frame (_("Description")));
+       f->add (_description);
+       t->attach (*f, 0, 2, ty, ty+1);
        ++ty;
 
+       _description.set_padding (5, 5);
        _description.set_line_wrap();
 
        get_vbox()->set_spacing (6);
@@ -112,6 +112,8 @@ ScriptSelector::script_combo_changed ()
 void
 ScriptSelector::refresh ()
 {
+       LuaScripting::instance ().refresh ();
+       _script.reset ();
        _scripts = LuaScripting::instance ().scripts (_script_type);
        setup_list ();
 }
@@ -166,10 +168,12 @@ ScriptParameterDialog::ScriptParameterDialog (std::string title,
        t->attach (_name_entry, 1, 2, ty, ty+1);
        ++ty;
 
-       l = manage (new Label (_("<b>Parameters:</b>"), Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER, false));
-       l->set_use_markup ();
-       t->attach (_name_entry, 0, 2, ty, ty+1);
-       ++ty;
+       if (_lsp.size () > 0) {
+               l = manage (new Label (_("<b>Instance Parameters</b>"), Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, false));
+               l->set_use_markup ();
+               t->attach (*l, 0, 2, ty, ty+1);
+               ++ty;
+       }
 
        for (size_t i = 0; i < _lsp.size (); ++i) {
                CheckButton* c = manage (new CheckButton (_lsp[i]->title));