X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fkeyeditor.cc;h=88c4682c558c46664f414193bf9bc282b7d76ec8;hb=40e2a6b16b47acf1f19a31f5e6d1cd463c45e1b6;hp=2a72adb5dd2b35119e795640a45a2f0cbb0799bd;hpb=6b19aee3b511eaae2800837175e9b9a931d325e7;p=ardour.git diff --git a/gtk2_ardour/keyeditor.cc b/gtk2_ardour/keyeditor.cc index 2a72adb5dd..88c4682c55 100644 --- a/gtk2_ardour/keyeditor.cc +++ b/gtk2_ardour/keyeditor.cc @@ -1,3 +1,26 @@ +/* + Copyright (C) 2002 Paul Davis + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +*/ + +#ifdef WAF_BUILD +#include "gtk2ardour-config.h" +#endif + #include #include "ardour/profile.h" @@ -202,21 +225,23 @@ KeyEditor::populate () { vector paths; vector labels; + vector tooltips; vector keys; vector bindings; typedef std::map NodeMap; NodeMap nodes; NodeMap::iterator r; - ActionManager::get_all_actions (labels, paths, keys, bindings); + ActionManager::get_all_actions (labels, paths, tooltips, keys, bindings); vector::iterator k; vector::iterator p; + vector::iterator t; vector::iterator l; model->clear (); - for (l = labels.begin(), k = keys.begin(), p = paths.begin(); l != labels.end(); ++k, ++p, ++l) { + for (l = labels.begin(), k = keys.begin(), p = paths.begin(), t = tooltips.begin(); l != labels.end(); ++k, ++p, ++t, ++l) { TreeModel::Row row; vector parts; @@ -251,7 +276,11 @@ KeyEditor::populate () /* add this action */ - row[columns.action] = (*l); + if (l->empty ()) { + row[columns.action] = *t; + } else { + row[columns.action] = *l; + } row[columns.path] = (*p); row[columns.bindable] = true;