1
0
mirror of https://github.com/clementine-player/Clementine synced 2024-12-16 03:09:57 +01:00

Show shortcut key tooltips on the next/previous buttons in the edit tag dialog. Fixes issue 2550

This commit is contained in:
David Sansome 2012-01-29 19:32:36 +00:00
parent 7166f0d922
commit 101195d1a2

View File

@ -169,6 +169,16 @@ EditTagDialog::EditTagDialog(CoverProviders* cover_providers, QWidget* parent)
new QShortcut(QKeySequence::Forward, next_button_, SLOT(click()));
new QShortcut(QKeySequence::MoveToPreviousPage, previous_button_, SLOT(click()));
new QShortcut(QKeySequence::MoveToNextPage, next_button_, SLOT(click()));
// Show the shortcuts as tooltips
previous_button_->setToolTip(QString("%1 (%2 / %3)").arg(
previous_button_->text(),
QKeySequence(QKeySequence::Back).toString(QKeySequence::NativeText),
QKeySequence(QKeySequence::MoveToPreviousPage).toString(QKeySequence::NativeText)));
next_button_->setToolTip(QString("%1 (%2 / %3)").arg(
next_button_->text(),
QKeySequence(QKeySequence::Forward).toString(QKeySequence::NativeText),
QKeySequence(QKeySequence::MoveToNextPage).toString(QKeySequence::NativeText)));
}
EditTagDialog::~EditTagDialog() {