Add shortcut in the tool-tip of ToolBar.

This commit is contained in:
David Capello 2011-02-15 09:55:44 -03:00
parent 82931688ad
commit 9e687d84b0

View File

@ -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";