Use "Locate In Library / Track" (etc) for locate actions in shortcut
setting page
This commit is contained in:
@@ -330,6 +330,13 @@ void MainWindow::init()
|
||||
locateArtistAction = ActionCollection::get()->createAction("locateartist", tr("Artist"));
|
||||
locateAlbumAction = ActionCollection::get()->createAction("locatealbum", tr("Album"));
|
||||
locateTrackAction = ActionCollection::get()->createAction("locatetrack", tr("Track"));
|
||||
locateArtistAction->setToolTip(tr("Locate In Library / Artist"));
|
||||
locateAlbumAction->setToolTip(tr("Locate In Library / Album"));
|
||||
locateTrackAction->setToolTip(tr("Locate In Library / Track"));
|
||||
locateArtistAction->setProperty(Action::constTtForSettings, true);
|
||||
locateAlbumAction->setProperty(Action::constTtForSettings, true);
|
||||
locateTrackAction->setProperty(Action::constTtForSettings, true);
|
||||
addAction(locateAction);
|
||||
|
||||
QMenu *locateMenu=new QMenu();
|
||||
locateMenu->addAction(locateArtistAction);
|
||||
|
||||
@@ -70,8 +70,11 @@ void Action::updateToolTip(QAction *act)
|
||||
}
|
||||
QKeySequence sc=act->shortcut();
|
||||
if (sc.isEmpty()) {
|
||||
act->setToolTip(act->property(constPlainToolTipProperty).toString());
|
||||
act->setProperty(constPlainToolTipProperty, QString());
|
||||
QString tt=act->property(constPlainToolTipProperty).toString();
|
||||
if (!tt.isEmpty()) {
|
||||
act->setToolTip(tt);
|
||||
act->setProperty(constPlainToolTipProperty, QString());
|
||||
}
|
||||
} else {
|
||||
QString tt=act->property(constPlainToolTipProperty).toString();
|
||||
if (tt.isEmpty()) {
|
||||
|
||||
Reference in New Issue
Block a user