Ticket #4499: mythbrowser.diff

File mythbrowser.diff, 2.9 KB (added by amb@…, 12 years ago)

Patch for extra movement keys

  • mythbrowser/mythbrowser/main.cpp

    diff -u mythbrowser/mythbrowser/main.cpp~ mythbrowser/mythbrowser/main.cpp
    old new  
    5252    REG_KEY("Browser", "MOUSELEFT", "Move mouse pointer left", "4");
    5353    REG_KEY("Browser", "MOUSERIGHT", "Move mouse pointer right", "6");
    5454    REG_KEY("Browser", "MOUSELEFTBUTTON", "Mouse Left button click", "5");
     55
     56    REG_KEY("Browser", "PAGEDOWN", "Scroll down half a page", "9");
     57    REG_KEY("Browser", "PAGEUP", "Scroll up half a page", "3");
     58    REG_KEY("Browser", "PAGELEFT", "Scroll left half a page", "7");
     59    REG_KEY("Browser", "PAGERIGHT", "Scroll right half a page", "1");
    5560   
    5661    REG_KEY("Browser", "NEXTLINK", "Move selection to next link", "Z");
    5762    REG_KEY("Browser", "PREVIOUSLINK", "Move selection to previous link", "Q");
  • mythbrowser/mythbrowser/tabview.cpp

    diff -u mythbrowser/mythbrowser/tabview.cpp~ mythbrowser/mythbrowser/tabview.cpp
    old new  
    695695                view->scrollBy(0, view->visibleHeight() / 10);
    696696                return true;
    697697            }
     698            else if (action == "LEFT")
     699            {
     700                KHTMLView *view = ((WebPage*)mytab->currentPage())->browser->view();
     701                view->scrollBy(-view->visibleWidth() / 10, 0);
     702                return true;
     703            }
     704            else if (action == "RIGHT")
     705            {
     706                KHTMLView *view = ((WebPage*)mytab->currentPage())->browser->view();
     707                view->scrollBy(view->visibleWidth() / 10, 0);
     708                return true;
     709            }
    698710            else if (action == "PAGEUP")
    699711            {
    700712                KHTMLView *view = ((WebPage*)mytab->currentPage())->browser->view();
    701                 view->scrollBy(0, -view->visibleHeight());
     713                view->scrollBy(0, -view->visibleHeight()/2);
    702714                return true;
    703715            }
    704716            else if (action == "PAGEDOWN")
    705717            {
    706718                KHTMLView *view = ((WebPage*)mytab->currentPage())->browser->view();
    707                 view->scrollBy(0, view->visibleHeight());
     719                view->scrollBy(0, view->visibleHeight()/2);
     720                return true;
     721            }
     722            else if (action == "PAGELEFT")
     723            {
     724             cout << "keypress 7\n";
     725                KHTMLView *view = ((WebPage*)mytab->currentPage())->browser->view();
     726                view->scrollBy(-view->visibleWidth() / 2, 0);
     727                return true;
     728            }
     729            else if (action == "PAGERIGHT")
     730            {
     731                KHTMLView *view = ((WebPage*)mytab->currentPage())->browser->view();
     732                view->scrollBy(view->visibleWidth() / 2, 0);
    708733                return true;
    709734            }
    710735        }