#include "ardour/filesystem_paths.h"
+#include "ardour_ui.h"
#include "keyboard.h"
#include "opts.h"
gchar* /*path*/,
guint /*key*/,
GdkModifierType /*mod*/,
- gpointer /*arg*/)
+ gpointer keyboard)
{
+ ArdourKeyboard* me = (ArdourKeyboard*)keyboard;
Keyboard::keybindings_changed ();
+ me->ui.setup_tooltips ();
}
void
/* set up the per-user bindings path */
- strs.push_back (Glib::get_home_dir());
- strs.push_back (".ardour3");
- strs.push_back ("ardour.bindings");
+ sys::path p (user_config_directory ());
+ p /= "ardour.bindings";
- user_keybindings_path = Glib::build_filename (strs);
+ user_keybindings_path = p.to_string ();
if (Glib::file_test (user_keybindings_path, Glib::FILE_TEST_EXISTS)) {
std::pair<string,string> newpair;
if ( ! find_file_in_search_path (spath, keybindings_path, keybindings_file)) {
if (keybindings_path == default_bindings) {
- error << _("Default keybindings not found - Ardour will be hard to use!") << endmsg;
+ error << string_compose (_("Default keybindings not found - %1 will be hard to use!"), PROGRAM_NAME) << endmsg;
return;
} else {
warning << string_compose (_("Key bindings file \"%1\" not found. Default bindings used instead"),
if (!Glib::file_test (keybindings_path, Glib::FILE_TEST_EXISTS)) {
if (keybindings_path == default_bindings) {
- error << _("Default keybindings not found - Ardour will be hard to use!") << endmsg;
+ error << string_compose (_("Default keybindings not found - %1 will be hard to use!"), PROGRAM_NAME) << endmsg;
return;
} else {
warning << string_compose (_("Key bindings file \"%1\" not found. Default bindings used instead"),
/* catch changes */
GtkAccelMap* accelmap = gtk_accel_map_get();
- g_signal_connect (accelmap, "changed", (GCallback) accel_map_changed, 0);
+ g_signal_connect (accelmap, "changed", (GCallback) accel_map_changed, this);
}
Selection::Operation