lua action details (button sensitivity, text ellipsis)
authorRobin Gareus <robin@gareus.org>
Mon, 25 Apr 2016 10:56:21 +0000 (12:56 +0200)
committerRobin Gareus <robin@gareus.org>
Mon, 25 Apr 2016 10:56:21 +0000 (12:56 +0200)
gtk2_ardour/editor.cc
gtk2_ardour/editor_actions.cc
gtk2_ardour/lua_script_manager.cc

index 959cdd4e5c2d3b5c70c3e3b47373111a4742dc2b..b267eae67014a0c117283c74ca29045597fc57d3 100644 (file)
@@ -5747,9 +5747,11 @@ Editor::set_script_action_name (int i, const std::string& n)
        if (n.empty ()) {
                act->set_label (string_compose (_("Unset #%1"), i + 1));
                act->set_tooltip (_("(no action bound"));
+               act->set_sensitive (false);
        } else {
                act->set_label (n);
                act->set_tooltip (n);
+               act->set_sensitive (true);
        }
        KeyEditor::UpdateBindings ();
 }
index d79e382f9f8373d8a8692302e64a323bfa081eee..85719043a38380a57d9627439a723a6165395215 100644 (file)
@@ -483,6 +483,7 @@ Editor::register_actions ()
                string const n = string_compose (_("Unset #%1"), i);
                act = reg_sens (editor_actions, a.c_str(), n.c_str(), sigc::bind (sigc::mem_fun (*this, &Editor::trigger_script), i - 1));
                act->set_tooltip (_("(no action bound"));
+               act->set_sensitive (false);
        }
 
        Glib::RefPtr<ActionGroup> mouse_mode_actions = myactions.create_action_group (X_("MouseMode"));
index 1917a7e4c71757c747a2761179df2f6f47fe859a..6d0b1d9c072d388881a40ccc39445b08916890ca 100644 (file)
@@ -42,6 +42,8 @@ LuaScriptManager::LuaScriptManager ()
        _a_view.append_column (_("Name"), _a_model.name);
        _a_view.get_column(0)->set_resizable (true);
        _a_view.get_column(0)->set_expand (true);
+       _c_view.get_column(1)->set_resizable (true);
+       _c_view.get_column(1)->set_expand (true);
 
        Gtk::HBox* edit_box = manage (new Gtk::HBox);
        edit_box->set_spacing(3);
@@ -72,9 +74,13 @@ LuaScriptManager::LuaScriptManager ()
        _c_store = ListStore::create (_c_model);
        _c_view.set_model (_c_store);
        _c_view.append_column (_("Name"), _c_model.name);
+       _c_view.append_column (_("Signal(s)"), _c_model.signals);
        _c_view.get_column(0)->set_resizable (true);
        _c_view.get_column(0)->set_expand (true);
-       _c_view.append_column (_("Signal(s)"), _c_model.signals);
+       _c_view.get_column(1)->set_resizable (true);
+       _c_view.get_column(1)->set_expand (true);
+       Gtk::CellRendererText* r = dynamic_cast<Gtk::CellRendererText*>(_c_view.get_column_cell_renderer (1));
+       r->property_ellipsize () = Pango::ELLIPSIZE_MIDDLE;
 
        edit_box = manage (new Gtk::HBox);
        edit_box->set_spacing(3);