From 9e687d84b0500952118c14d94eccd7d794a9046b Mon Sep 17 00:00:00 2001 From: David Capello Date: Tue, 15 Feb 2011 09:55:44 -0300 Subject: [PATCH] Add shortcut in the tool-tip of ToolBar. --- src/widgets/toolbar.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/widgets/toolbar.cpp b/src/widgets/toolbar.cpp index c67dda23b..92eb946b8 100644 --- a/src/widgets/toolbar.cpp +++ b/src/widgets/toolbar.cpp @@ -505,6 +505,15 @@ void ToolBar::openTipWindow(int group_index, Tool* tool) tooltip += ":\n"; tooltip += tool->getTips(); } + + // Tool shortcut + JAccel accel = get_accel_to_change_tool(tool); + if (accel) { + char buf[512]; // TODO possible buffer overflow + jaccel_to_string(accel, buf); + tooltip += "\n\nShortcut: "; + tooltip += buf; + } } else { tooltip = "Configure Tool";