add reset bindings button to key bindings editor
This commit is contained in:
parent
8859ebe56e
commit
d324f67cce
@ -33,6 +33,7 @@
|
||||
|
||||
#include "pbd/strsplit.h"
|
||||
|
||||
#include "ardour/filesystem_paths.h"
|
||||
#include "ardour/profile.h"
|
||||
|
||||
#include "actions.h"
|
||||
@ -75,9 +76,8 @@ KeyEditor::KeyEditor ()
|
||||
scroller.add (view);
|
||||
scroller.set_policy (Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC);
|
||||
|
||||
add (vpacker);
|
||||
|
||||
vpacker.set_spacing (6);
|
||||
vpacker.set_border_width (12);
|
||||
vpacker.pack_start (scroller);
|
||||
|
||||
if (!ARDOUR::Profile->get_sae()) {
|
||||
@ -94,8 +94,18 @@ KeyEditor::KeyEditor ()
|
||||
unbind_button.show ();
|
||||
|
||||
}
|
||||
|
||||
reset_button.add (reset_label);
|
||||
reset_label.set_markup (string_compose ("<span size=\"large\" weight=\"bold\">%1</span>", _("Reset Bindings to Defaults")));
|
||||
|
||||
reset_box.pack_start (reset_button, true, false);
|
||||
reset_box.show ();
|
||||
reset_button.show ();
|
||||
reset_label.show ();
|
||||
reset_button.signal_clicked().connect (sigc::mem_fun (*this, &KeyEditor::reset));
|
||||
vpacker.pack_start (reset_box);
|
||||
|
||||
vpacker.set_border_width (12);
|
||||
add (vpacker);
|
||||
|
||||
view.show ();
|
||||
scroller.show ();
|
||||
@ -295,3 +305,9 @@ KeyEditor::populate ()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
KeyEditor::reset ()
|
||||
{
|
||||
Keyboard::the_keyboard().reset_bindings ();
|
||||
}
|
||||
|
@ -61,6 +61,9 @@ class KeyEditor : public ArdourWindow
|
||||
KeyEditorColumns columns;
|
||||
Gtk::Button unbind_button;
|
||||
Gtk::HButtonBox unbind_box;
|
||||
Gtk::HBox reset_box;
|
||||
Gtk::Button reset_button;
|
||||
Gtk::Label reset_label;
|
||||
|
||||
void unbind ();
|
||||
|
||||
@ -69,6 +72,8 @@ class KeyEditor : public ArdourWindow
|
||||
|
||||
void action_selected ();
|
||||
void populate ();
|
||||
|
||||
void reset ();
|
||||
};
|
||||
|
||||
#endif /* __ardour_gtk_key_editor_h__ */
|
||||
|
Loading…
Reference in New Issue
Block a user