Ticket #9615: mainmenu_jumppoint_reset.patch

File mainmenu_jumppoint_reset.patch, 1.1 KB (added by Jim Stichnoth <stichnot@…>, 13 years ago)
  • mythtv/libs/libmythui/mythmainwindow.cpp

    diff --git a/mythtv/libs/libmythui/mythmainwindow.cpp b/mythtv/libs/libmythui/mythmainwindow.cpp
    index 7ecb158..d94e12b 100644
    a b using namespace std; 
    7171#include "mythgesture.h"
    7272#include "mythuihelper.h"
    7373#include "mythdialogbox.h"
     74#include "myththemedmenu.h"
    7475
    7576#ifdef USING_VDPAU
    7677#include "mythpainter_vdpau.h"
    bool MythMainWindow::TranslateKeyPress(const QString &context, 
    14861487        d->exitmenucallback = d->jumpMap[keynum]->callback;
    14871488        QCoreApplication::postEvent(
    14881489            this, new QEvent(MythEvent::kExitToMainMenuEventType));
     1490
     1491        // This code has the effect of resetting the selected button
     1492        // to the first item when executing the "Main Menu" jump point
     1493        // from the top-level main menu.
     1494        MythThemedMenuState *menu = dynamic_cast<MythThemedMenuState *>
     1495            (GetMainStack()->GetTopScreen());
     1496        if (menu)
     1497            menu->m_buttonList->SetItemCurrent(0);
     1498
    14891499        return true;
    14901500    }
    14911501