Ticket #13234: 20180314_1955_menus_and_bookmark.patch

File 20180314_1955_menus_and_bookmark.patch, 5.2 KB (added by Peter Bennett, 3 years ago)

Menu and bookmark changes

  • mythtv/libs/libmythtv/tv_actions.h

    diff --git a/mythtv/libs/libmythtv/tv_actions.h b/mythtv/libs/libmythtv/tv_actions.h
    index eecf714..ff501ad 100644
    a b  
    3131#define ACTION_VIEWSCHEDULED     "VIEWSCHEDULED"
    3232#define ACTION_PREVRECORDED      "PREVRECORDED"
    3333#define ACTION_SIGNALMON         "SIGNALMON"
     34#define ACTION_BOOKMARK          "BOOKMARK"
    3435
    3536/* Navigation */
    3637#define ACTION_JUMPPREV             "JUMPPREV"
  • mythtv/libs/libmythtv/tv_play.cpp

    diff --git a/mythtv/libs/libmythtv/tv_play.cpp b/mythtv/libs/libmythtv/tv_play.cpp
    index d6fcb27..90af3f1 100644
    a b void TV::InitKeys(void) 
    828828            "Display scheduled recording list"), "");
    829829    REG_KEY("TV Playback", ACTION_PREVRECORDED, QT_TRANSLATE_NOOP("MythControls",
    830830            "Display previously recorded episodes"), "");
     831    REG_KEY("TV Playback", ACTION_BOOKMARK, QT_TRANSLATE_NOOP("MythControls",
     832            "Add or Remove Bookmark"), "Ctrl+K,Space,Return,Enter");
    831833    REG_KEY("TV Playback", ACTION_SIGNALMON, QT_TRANSLATE_NOOP("MythControls",
    832834            "Monitor Signal Quality"), "Alt+F7");
    833835    REG_KEY("TV Playback", ACTION_JUMPTODVDROOTMENU,
    bool TV::ActivePostQHandleAction(PlayerContext *ctx, const QStringList &actions) 
    50435045    bool isdvd  = state == kState_WatchingDVD;
    50445046    bool isdisc = isdvd || state == kState_WatchingBD;
    50455047
    5046     if (has_action(ACTION_SELECT, actions))
     5048    if (has_action(ACTION_BOOKMARK, actions))
    50475049    {
    50485050        if (!islivetv || !CommitQueuedInput(ctx))
    50495051        {
    void TV::OSDDialogEvent(int result, QString text, QString action) 
    1106511067            DoQueueTranscode(actx, "Medium Quality");
    1106611068        else if (action == "QUEUETRANSCODE_LOW")
    1106711069            DoQueueTranscode(actx, "Low Quality");
     11070        else if (action == ACTION_BOOKMARK)
     11071            ActivePostQHandleAction(actx, QStringList(ACTION_BOOKMARK));
     11072        else if (action == ACTION_JUMPBKMRK)
     11073        {
     11074            bool isDVD = actx->buffer && actx->buffer->IsDVD();
     11075            bool isMenuOrStill = actx->buffer && actx->buffer->IsInDiscMenuOrStillFrame();
     11076            ActiveHandleAction(actx, QStringList(ACTION_JUMPBKMRK), isDVD, isMenuOrStill);
     11077        }
    1106811078        else
    1106911079        {
    1107011080            LOG(VB_GENERAL, LOG_ERR, LOC +
  • mythtv/programs/mythfrontend/progdetails.cpp

    diff --git a/mythtv/programs/mythfrontend/progdetails.cpp b/mythtv/programs/mythfrontend/progdetails.cpp
    index 6540cd3..802919b 100644
    a b bool ProgDetails::keyPressEvent(QKeyEvent *event) 
    137137        QString action = actions[i];
    138138        handled = true;
    139139
    140         if (action == "INFO")
     140        if (action == "INFO" || action == "SELECT")
    141141        {
    142142            m_infoList.Toggle();
    143143            updatePage();
  • mythtv/programs/mythfrontend/videodlg.cpp

    diff --git a/mythtv/programs/mythfrontend/videodlg.cpp b/mythtv/programs/mythfrontend/videodlg.cpp
    index 9100a2a..266b4ad 100644
    a b void VideoDialog::VideoMenu() 
    24722472    m_menuPopup = new MythDialogBox(menu, m_popupStack, "videomenupopup");
    24732473
    24742474    if (m_menuPopup->Create())
     2475    {
    24752476        m_popupStack->AddScreen(m_menuPopup);
     2477        connect(m_menuPopup, SIGNAL(Closed(QString,int)), SLOT(popupClosed(QString,int)));
     2478    }
    24762479    else
    24772480        delete m_menuPopup;
    24782481}
    void VideoDialog::DisplayMenu() 
    25362539    m_menuPopup = new MythDialogBox(menu, m_popupStack, "videomenupopup");
    25372540
    25382541    if (m_menuPopup->Create())
     2542    {
    25392543        m_popupStack->AddScreen(m_menuPopup);
     2544        connect(m_menuPopup, SIGNAL(Closed(QString,int)), SLOT(popupClosed(QString,int)));
     2545    }
    25402546    else
    25412547        delete m_menuPopup;
    25422548}
    25432549
     2550// Switch from the display menu to the actions menu on second
     2551// menu press
     2552
     2553void VideoDialog::popupClosed(QString which, int result)
     2554{
     2555    m_menuPopup = NULL;
     2556
     2557    if (result == -2)
     2558    {
     2559        if (which == "display")
     2560            VideoMenu();
     2561    }
     2562}
     2563
    25442564/** \fn VideoDialog::CreateViewMenu()
    25452565 *  \brief Create a  MythMenu for MythVideo Views.
    25462566 *  \return MythMenu.
  • mythtv/programs/mythfrontend/videodlg.h

    diff --git a/mythtv/programs/mythfrontend/videodlg.h b/mythtv/programs/mythfrontend/videodlg.h
    index 9c4f54c..ff996f6 100644
    a b class VideoDialog : public MythScreenType 
    112112    MythMenu* CreateSettingsMenu();
    113113    MythMenu* CreateMetadataBrowseMenu();
    114114
     115    void popupClosed(QString which, int reason);
     116
    115117    void PromptToScan();
    116118
    117119    void ChangeFilter();
  • mythtv/themes/default/menu_playback.xml

    diff --git a/mythtv/themes/default/menu_playback.xml b/mythtv/themes/default/menu_playback.xml
    index 7dc85ad..b87db78 100644
    a b  
    175175  <menu text="Navigate">
    176176    <item action="JUMPFFWD" XXXtext="Jump Ahead" />
    177177    <item action="JUMPRWND" XXXtext="Jump Back" />
     178    <item action="BOOKMARK" XXXtext="Set Bookmark" />
     179    <item action="JUMPBKMRK" XXXtext="Jump to Bookmark" />
    178180    <menu text="Commercial Auto-Skip">
    179181      <itemlist actiongroup="TOGGLECOMMSKIP" current="active" />
    180182      <!-- Alternatively: