Ticket #7939: tv_jumppoints_v12.patch

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

Change VERBOSE() to LOG().

  • mythtv/libs/libmythtv/tv_play.cpp

    diff --git a/mythtv/libs/libmythtv/tv_play.cpp b/mythtv/libs/libmythtv/tv_play.cpp
    index bbd5d51..22da98c 100644
    a b static bool has_action(QString action, const QStringList &actions) 
    34123412
    34133413bool TV::ProcessKeypress(PlayerContext *actx, QKeyEvent *e)
    34143414{
     3415    QStringList actions;
     3416    bool handled = GetMythMainWindow()->
     3417        TranslateKeyPress("TV Playback", e, actions, false);
     3418    if (handled)
     3419        LOG(VB_GENERAL, LOG_DEBUG,
     3420                "ProcessKeypress(): "
     3421                "TranslateKeyPress() unexpectedly returned true");
     3422    bool isJumpingToMain = has_action("ESCAPE", actions) &&
     3423        GetMythMainWindow()->IsExitingToMain();
     3424    unsigned iterations = 0;
     3425    // Set a limit on the number of iterations in case pressing escape
     3426    // repeatedly somehow gets into a loop.
     3427    const unsigned kMaxIterations = 10;
     3428    bool result;
     3429    do {
     3430        result = ProcessKeypressInternal(actx, e, isJumpingToMain);
     3431        ++iterations;
     3432    } while (isJumpingToMain &&
     3433             exitPlayerTimerId == 0 &&
     3434             iterations <= kMaxIterations);
     3435    return result;
     3436}
     3437
     3438bool TV::ProcessKeypressInternal(PlayerContext *actx, QKeyEvent *e,
     3439                                 bool isJumpingToMain)
     3440{
    34153441    bool ignoreKeys = actx->IsPlayerChangingBuffers();
    34163442#if DEBUG_ACTIONS
    34173443    LOG(VB_GENERAL, LOG_DEBUG, LOC + QString("ProcessKeypress() ignoreKeys: %1")
    bool TV::ProcessKeypress(PlayerContext *actx, QKeyEvent *e) 
    34473473    OSD *osd = GetOSDLock(actx);
    34483474    if (osd && osd->DialogVisible())
    34493475    {
    3450         osd->DialogHandleKeypress(e);
     3476        if (isJumpingToMain)
     3477            osd->DialogQuit();
     3478        else
     3479            osd->DialogHandleKeypress(e);
    34513480        handled = true;
    34523481    }
    34533482    ReturnOSDLock(actx, osd);
    bool TV::ProcessKeypress(PlayerContext *actx, QKeyEvent *e) 
    34663495            }
    34673496            if (has_action("ESCAPE", actions))
    34683497            {
     3498                if (isJumpingToMain)
     3499                    actx->player->DisableEdit(false);
     3500                else
    34693501                if (!actx->player->IsCutListSaved(actx))
    34703502                    ShowOSDCutpoint(actx, "EXIT_EDIT_MODE");
    34713503                else
  • mythtv/libs/libmythtv/tv_play.h

    diff --git a/mythtv/libs/libmythtv/tv_play.h b/mythtv/libs/libmythtv/tv_play.h
    index 247fb03..3a4db3e 100644
    a b class MPUBLIC TV : public QObject 
    188188
    189189    // User input processing commands
    190190    bool ProcessKeypress(PlayerContext*, QKeyEvent *e);
     191    bool ProcessKeypressInternal(PlayerContext*, QKeyEvent *e,
     192                                 bool isJumpingToMain);
    191193    void ProcessNetworkControlCommand(PlayerContext *, const QString &command);
    192194    void customEvent(QEvent *e);
    193195    bool event(QEvent *e);
  • mythtv/programs/mythfrontend/playbackbox.cpp

    diff --git a/mythtv/programs/mythfrontend/playbackbox.cpp b/mythtv/programs/mythfrontend/playbackbox.cpp
    index 7c6b253..baf8f61 100644
    a b bool PlaybackBox::Play( 
    23462346
    23472347    m_playingSomething = false;
    23482348
    2349     if (inPlaylist && !m_playListPlay.empty())
     2349    if (inPlaylist && !m_playListPlay.empty() &&
     2350        !GetMythMainWindow()->IsExitingToMain())
    23502351    {
    23512352        QCoreApplication::postEvent(
    23522353            this, new MythEvent("PLAY_PLAYLIST"));