update keyeditor when action label changes
This commit is contained in:
parent
fde99e68f7
commit
55fb20f491
|
@ -108,6 +108,7 @@
|
|||
#include "gui_object.h"
|
||||
#include "gui_thread.h"
|
||||
#include "keyboard.h"
|
||||
#include "keyeditor.h"
|
||||
#include "luainstance.h"
|
||||
#include "marker.h"
|
||||
#include "midi_region_view.h"
|
||||
|
@ -5748,6 +5749,7 @@ Editor::set_script_action_name (int i, const std::string& n)
|
|||
} else {
|
||||
act->set_label (n);
|
||||
}
|
||||
KeyEditor::UpdateBindings ();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -53,6 +53,8 @@ using namespace PBD;
|
|||
using Gtkmm2ext::Keyboard;
|
||||
using Gtkmm2ext::Bindings;
|
||||
|
||||
sigc::signal<void> KeyEditor::UpdateBindings;
|
||||
|
||||
void bindings_collision_dialog (Gtk::Window& parent)
|
||||
{
|
||||
ArdourDialog dialog (parent, _("Colliding keybindings"), true);
|
||||
|
@ -108,6 +110,7 @@ KeyEditor::KeyEditor ()
|
|||
add (vpacker);
|
||||
|
||||
unbind_button.set_sensitive (false);
|
||||
UpdateBindings.connect (sigc::mem_fun (*this, &KeyEditor::refresh));
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -121,6 +124,7 @@ KeyEditor::add_tab (string const & name, Bindings& bindings)
|
|||
return;
|
||||
}
|
||||
|
||||
tabs.push_back (t);
|
||||
t->show_all ();
|
||||
notebook.append_page (*t, name);
|
||||
}
|
||||
|
@ -479,7 +483,12 @@ void
|
|||
KeyEditor::reset ()
|
||||
{
|
||||
Keyboard::the_keyboard().reset_bindings ();
|
||||
refresh ();
|
||||
}
|
||||
|
||||
void
|
||||
KeyEditor::refresh ()
|
||||
{
|
||||
for (Tabs::iterator t = tabs.begin(); t != tabs.end(); ++t) {
|
||||
(*t)->view.get_selection()->unselect_all ();
|
||||
(*t)->populate ();
|
||||
|
|
|
@ -43,6 +43,8 @@ class KeyEditor : public ArdourWindow
|
|||
void add_tab (std::string const &name, Gtkmm2ext::Bindings&);
|
||||
void remove_tab (std::string const &name);
|
||||
|
||||
static sigc::signal<void> UpdateBindings;
|
||||
|
||||
private:
|
||||
class Tab : public Gtk::VBox
|
||||
{
|
||||
|
@ -113,6 +115,7 @@ class KeyEditor : public ArdourWindow
|
|||
|
||||
void unbind ();
|
||||
void reset ();
|
||||
void refresh ();
|
||||
void page_change (GtkNotebookPage*, guint);
|
||||
|
||||
unsigned int sort_column;
|
||||
|
|
Loading…
Reference in New Issue
Block a user