X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=src%2FMediaView.cpp;h=10160658c224238c83653f67b877bfbff215d680;hb=2a60b737c72fc6799f78c548328281c257375549;hp=9825010356c1e9813bab978b44f5b1041bfa0184;hpb=13e6b04f54bc595ee7927dc6644b6fac4dcc1447;p=minitube diff --git a/src/MediaView.cpp b/src/MediaView.cpp index 9825010..1016065 100644 --- a/src/MediaView.cpp +++ b/src/MediaView.cpp @@ -19,13 +19,19 @@ MediaView::MediaView(QWidget *parent) : QWidget(parent) { splitter->setChildrenCollapsible(false); sortBar = new THBlackBar(this); - mostRelevantAction = new THAction(tr("Most relevant"), this); + mostRelevantAction = new QAction(tr("Most relevant"), this); + mostRelevantAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_1)); + addAction(mostRelevantAction); connect(mostRelevantAction, SIGNAL(triggered()), this, SLOT(searchMostRelevant()), Qt::QueuedConnection); sortBar->addAction(mostRelevantAction); - mostRecentAction = new THAction(tr("Most recent"), this); + mostRecentAction = new QAction(tr("Most recent"), this); + mostRecentAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_2)); + addAction(mostRecentAction); connect(mostRecentAction, SIGNAL(triggered()), this, SLOT(searchMostRecent()), Qt::QueuedConnection); sortBar->addAction(mostRecentAction); - mostViewedAction = new THAction(tr("Most viewed"), this); + mostViewedAction = new QAction(tr("Most viewed"), this); + mostViewedAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_3)); + addAction(mostViewedAction); connect(mostViewedAction, SIGNAL(triggered()), this, SLOT(searchMostViewed()), Qt::QueuedConnection); sortBar->addAction(mostViewedAction); @@ -129,6 +135,7 @@ void MediaView::stateChanged(Phonon::State newState, Phonon::State /*oldState*/) case Phonon::ErrorState: qDebug() << "Phonon error:" << mediaObject->errorString() << mediaObject->errorType(); + videoAreaWidget->showError(mediaObject->errorString()); // recover from errors by skipping to the next video skip(); break;