minor keyboard binding improvements and build fixes
authorPaul Davis <paul@linuxaudiosystems.com>
Thu, 14 Feb 2008 02:31:32 +0000 (02:31 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Thu, 14 Feb 2008 02:31:32 +0000 (02:31 +0000)
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3056 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/SConscript
gtk2_ardour/keyboard.cc

index 969a8169fa0bdfa9515e77affc5572789420fed8..5f8ba63bb29f5fe8b6ae434f3037bc41bde01bb2 100644 (file)
@@ -417,13 +417,10 @@ else:
        keybindings_dict['%LEVEL4%'] = 'Mod2'
        keybindings_dict['%WINDOW%'] = 'Alt'
 
-bindings = { }
-
-for b in [ 'SAE-de', 'SAE-us', 'mnemonic-us', 'ergonomic-us' ]:
+for b in [ 'SAE-de', 'mnemonic-us', 'ergonomic-us' ]:
        target_file = b + '.bindings'
        src_file = target_file + '.in'
-       bindings[b] = env.SubstInFile (target_file, src_file, SUBST_DICT = keybindings_dict);
-       Default (bindings[b])
+       Default (env.SubstInFile (target_file, src_file, SUBST_DICT = keybindings_dict))
 
 my_subst_dict['%INSTALL_PREFIX%'] = final_prefix
 my_subst_dict['%LIBDIR%'] = env['LIBDIR']
index 75c6dc1e1df58debc1f80520511add366a42025f..e416839474971b02f1f5d6812a1ef8431d9d5202 100644 (file)
@@ -405,6 +405,8 @@ Keyboard::setup_keybindings ()
        std::string path;
        vector<string> strs;
 
+       binding_files.clear ();
+
        ARDOUR::find_bindings_files (binding_files);
 
        /* set up the per-user bindings path */
@@ -415,6 +417,13 @@ Keyboard::setup_keybindings ()
 
        user_keybindings_path = Glib::build_filename (strs);
 
+       if (Glib::file_test (user_keybindings_path, Glib::FILE_TEST_EXISTS)) {
+               std::pair<string,string> newpair;
+               newpair.first = _("your own");
+               newpair.second = user_keybindings_path;
+               binding_files.insert (newpair);
+       }
+
        /* check to see if they gave a style name ("SAE", "ergonomic") or
           an actual filename (*.bindings)
        */