Ticket #7939: tv_jumppoints_v13.patch

File tv_jumppoints_v13.patch, 3.4 KB (added by Jim Stichnoth <stichnot@…>, 12 years ago)

Synch up to latest version of master

  • mythtv/libs/libmythtv/tv_play.cpp

    diff --git a/mythtv/libs/libmythtv/tv_play.cpp b/mythtv/libs/libmythtv/tv_play.cpp
    index eecda52..f9dfc12 100644
    a b static bool has_action(QString action, const QStringList &actions) 
    35903590
    35913591bool TV::ProcessKeypress(PlayerContext *actx, QKeyEvent *e)
    35923592{
     3593    QStringList actions;
     3594    bool handled = GetMythMainWindow()->
     3595        TranslateKeyPress("TV Playback", e, actions, false);
     3596    if (handled)
     3597        LOG(VB_GENERAL, LOG_DEBUG,
     3598                "ProcessKeypress(): "
     3599                "TranslateKeyPress() unexpectedly returned true");
     3600    bool isJumpingToMain = has_action("ESCAPE", actions) &&
     3601        GetMythMainWindow()->IsExitingToMain();
     3602    unsigned iterations = 0;
     3603    // Set a limit on the number of iterations in case pressing escape
     3604    // repeatedly somehow gets into a loop.
     3605    const unsigned kMaxIterations = 10;
     3606    bool result;
     3607    do {
     3608        result = ProcessKeypressInternal(actx, e, isJumpingToMain);
     3609        ++iterations;
     3610    } while (isJumpingToMain &&
     3611             exitPlayerTimerId == 0 &&
     3612             iterations <= kMaxIterations);
     3613    return result;
     3614}
     3615
     3616bool TV::ProcessKeypressInternal(PlayerContext *actx, QKeyEvent *e,
     3617                                 bool isJumpingToMain)
     3618{
    35933619    bool ignoreKeys = actx->IsPlayerChangingBuffers();
    35943620#if DEBUG_ACTIONS
    35953621    LOG(VB_GENERAL, LOG_DEBUG, LOC + QString("ProcessKeypress() ignoreKeys: %1")
    bool TV::ProcessKeypress(PlayerContext *actx, QKeyEvent *e) 
    36253651    OSD *osd = GetOSDLock(actx);
    36263652    if (osd && osd->DialogVisible())
    36273653    {
    3628         osd->DialogHandleKeypress(e);
     3654        if (isJumpingToMain)
     3655            osd->DialogQuit();
     3656        else
     3657            osd->DialogHandleKeypress(e);
    36293658        handled = true;
    36303659    }
    36313660    ReturnOSDLock(actx, osd);
    bool TV::ProcessKeypress(PlayerContext *actx, QKeyEvent *e) 
    36443673            }
    36453674            if (has_action("ESCAPE", actions))
    36463675            {
     3676                if (isJumpingToMain)
     3677                    actx->player->DisableEdit(false);
     3678                else
    36473679                if (!actx->player->IsCutListSaved(actx))
    36483680                    ShowOSDCutpoint(actx, "EXIT_EDIT_MODE");
    36493681                else
  • mythtv/libs/libmythtv/tv_play.h

    diff --git a/mythtv/libs/libmythtv/tv_play.h b/mythtv/libs/libmythtv/tv_play.h
    index f9d3ac8..22dc38d 100644
    a b class MTV_PUBLIC TV : public QObject 
    208208
    209209    // Private event handling
    210210    bool ProcessKeypress(PlayerContext*, QKeyEvent *e);
     211    bool ProcessKeypressInternal(PlayerContext*, QKeyEvent *e,
     212                                 bool isJumpingToMain);
    211213    void ProcessNetworkControlCommand(PlayerContext *, const QString &command);
    212214
    213215    bool HandleTrackAction(PlayerContext*, const QString &action);
  • mythtv/programs/mythfrontend/playbackbox.cpp

    diff --git a/mythtv/programs/mythfrontend/playbackbox.cpp b/mythtv/programs/mythfrontend/playbackbox.cpp
    index 9f61035..0314763 100644
    a b bool PlaybackBox::Play( 
    24202420
    24212421    m_playingSomething = false;
    24222422
    2423     if (inPlaylist && !m_playListPlay.empty())
     2423    if (inPlaylist && !m_playListPlay.empty() &&
     2424        !GetMythMainWindow()->IsExitingToMain())
    24242425    {
    24252426        QCoreApplication::postEvent(
    24262427            this, new MythEvent("PLAY_PLAYLIST"));