Ticket #3642: translate-key-presses_alterante_approach_v3.diff

File translate-key-presses_alterante_approach_v3.diff, 1.8 KB (added by Roo, 17 years ago)

Alternative approach to problem

  • mythtv/libs/libmythui/mythmainwindow.cpp

     
    726726    if (allowJumps &&
    727727        d->jumpMap.count(keynum) > 0 && d->exitmenucallback == NULL)
    728728    {
     729        JumpData *jd = d->jumpMap[keynum];
     730        QString destination = jd->destination;
     731
     732        // Override specified jumppoints
     733        QWidget *current = currentWidget();
     734        if (current && current->name() == QString("video playback window"))
     735        {
     736            if (destination == "Program Finder")
     737            {
     738                actions = QString("FINDER");
     739                return true;
     740            }
     741            else if (destination == "Program Guide")
     742            {
     743                actions = QString("GUIDE");
     744                return true;
     745            }
     746        }
     747
     748        // Override specified jumppoints
     749        MythScreenStack *toplevel = GetMainStack();
     750        if (toplevel && d->popwindows)
     751        {
     752            MythScreenType *screen = toplevel->GetTopScreen();
     753            if (screen && screen->name() == QString("video playback window"))
     754            {
     755                if (destination == "Program Finder")
     756                {
     757                    actions = QString("FINDER");
     758                    return true;
     759                }
     760                else if (destination == "Program Guide")
     761                {
     762                    actions = QString("GUIDE");
     763                    return true;
     764                }
     765            }
     766        }
     767
    729768        d->exitingtomain = true;
    730769        d->exitmenucallback = d->jumpMap[keynum]->callback;
    731770        QApplication::postEvent(this, new ExitToMainMenuEvent());