Ticket #3642: translate-key-presses_alterante_approach_v4.diff

File translate-key-presses_alterante_approach_v4.diff, 2.2 KB (added by Roo <roo.watt@…>, 17 years ago)

Squashes finder jumppoint when in guide and vice versa

  • 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        QWidget *current = currentWidget();
     733        if (current)
     734        {
     735            QString origin = current->name();
     736
     737            if (origin == "video playback window")
     738            {
     739                // Demote jump point - use local binding
     740                if (destination == "Program Finder")
     741                {
     742                    actions = QString("FINDER");
     743                    return true;
     744                }
     745
     746                // Demote jump point - use local binding
     747                if (destination == "Program Guide")
     748                {
     749                    actions = QString("GUIDE");
     750                    return true;
     751                }
     752            }
     753
     754            if (origin == "guidegrid")
     755            {
     756                // Squash jumpoint - already there
     757                if (destination == "Program Guide")
     758                {
     759                    return false;
     760                }
     761
     762                // Demote jump point - use toggle
     763                if (destination == "Program Finder")
     764                {
     765                    actions = QString("6");
     766                    return true;
     767                }
     768            }
     769
     770            if (origin == "program finder")
     771            {
     772                // Squash jumpoint - already there
     773                if (destination == "Program Finder")
     774                {
     775                    return false;
     776                }
     777
     778                // Demote jump point - use toggle
     779                if (destination == "Program Guide")
     780                {
     781                    actions = QString("4");
     782                    return true;
     783                }
     784            }
     785        }
     786
    729787        d->exitingtomain = true;
    730788        d->exitmenucallback = d->jumpMap[keynum]->callback;
    731789        QApplication::postEvent(this, new ExitToMainMenuEvent());