Ticket #5920: trailerplayback.diff
File trailerplayback.diff, 2.0 KB (added by , 15 years ago) |
---|
-
mythvideo/mythvideo/videodlg.h
56 56 void SetCurrentNode(MythGenericTree *); 57 57 58 58 void playVideo(); 59 void playTrailer(); 59 60 60 61 void SwitchTree(); 61 62 void SwitchGallery(); -
mythvideo/mythvideo/videodlg.cpp
21 21 #include <mythtv/libmythui/mythuistatetype.h> 22 22 #include <mythtv/libmythui/mythdialogbox.h> 23 23 #include <mythtv/libmythui/mythgenerictree.h> 24 #include "mythtv/libmythui/mythmainwindow.h" 24 25 25 26 #include "videodlg.h" 26 27 #include "videoscan.h" … … 1357 1358 if (node && node->getInt() >= 0) 1358 1359 { 1359 1360 m_menuPopup->AddButton(tr("Watch This Video"), SLOT(playVideo())); 1361 m_menuPopup->AddButton(tr("Watch Trailer"), SLOT(playTrailer())); 1360 1362 m_menuPopup->AddButton(tr("Video Info"), SLOT(InfoMenu())); 1361 1363 m_menuPopup->AddButton(tr("Manage Video"), SLOT(ManageMenu())); 1362 1364 } … … 1554 1556 gContext->GetMainWindow()->currentWidget()->setFocus(); 1555 1557 } 1556 1558 1559 void VideoDialog::playTrailer() 1560 { 1561 QString trailerFile; 1562 QString command_string = "Internal"; 1563 1564 Metadata *metadata = GetMetadata(GetItemCurrent()); 1565 1566 trailerFile = QString("%1.trailer").arg(metadata->Filename()); 1567 1568 VERBOSE(VB_IMPORTANT, QString("Playing Trailer '%1'") 1569 .arg(trailerFile)); 1570 1571 gContext->GetMainWindow()->HandleMedia(command_string, trailerFile); 1572 gContext->GetMainWindow()->raise(); 1573 gContext->GetMainWindow()->activateWindow(); 1574 if (gContext->GetMainWindow()->currentWidget()) 1575 gContext->GetMainWindow()->currentWidget()->setFocus(); 1576 } 1577 1557 1578 void VideoDialog::setParentalLevel(const ParentalLevel::Level &level) 1558 1579 { 1559 1580 m_private->m_parentalLevel.SetLevel(level);