Ticket #5309: keypad_mythlistbutton.diff

File keypad_mythlistbutton.diff, 924 bytes (added by xavier dot hervy at bluebottle dot com, 16 years ago)

add keypad binding for mythlistbutton as it will be used for themed menu

  • libs/libmythui/mythlistbutton.cpp

     
    767767                emit itemClicked(item);
    768768            }
    769769        }
     770        else if (action == "1" || action == "2" || action == "3" ||
     771                 action == "4" || action == "5" || action == "6" ||
     772                 action == "7" || action == "8" || action == "9" ||
     773                 action == "0")
     774        {
     775            int pos = action.toInt()-1;
     776            if (pos==-1) pos=9;
     777            SetItemCurrent(pos);
     778            MythListButtonItem *item = GetItemCurrent();
     779            if (item)
     780            {
     781                emit itemSelected(item);
     782                emit itemClicked(item);
     783            }
     784        }
     785
    770786        else
    771787            handled = false;
    772788    }