diff --git a/mythtv/libs/libmythui/mythuiwebbrowser.cpp b/mythtv/libs/libmythui/mythuiwebbrowser.cpp
index 34b448adfe..2f59307c5b 100644
|
a
|
b
|
void MythUIWebBrowser::Finalize(void)
|
| 872 | 872 | */ |
| 873 | 873 | void MythUIWebBrowser::Init(void) |
| 874 | 874 | { |
| | 875 | // only do the initialisation for widgets not being stored in the global object store |
| | 876 | if (parent() == GetGlobalObjectStore()) |
| | 877 | return; |
| | 878 | |
| 875 | 879 | if (m_initialized) |
| 876 | 880 | return; |
| 877 | 881 | |
| … |
… |
void MythUIWebBrowser::SetBackgroundColor(QColor color)
|
| 1127 | 1131 | */ |
| 1128 | 1132 | void MythUIWebBrowser::SetActive(bool active) |
| 1129 | 1133 | { |
| | 1134 | if (!m_browser) |
| | 1135 | return; |
| | 1136 | |
| 1130 | 1137 | if (m_active == active) |
| 1131 | 1138 | return; |
| 1132 | 1139 | |
| … |
… |
QVariant MythUIWebBrowser::evaluateJavaScript(const QString &scriptSource)
|
| 1325 | 1332 | |
| 1326 | 1333 | void MythUIWebBrowser::Scroll(int dx, int dy) |
| 1327 | 1334 | { |
| | 1335 | if (!m_browser) |
| | 1336 | return; |
| | 1337 | |
| 1328 | 1338 | QPoint startPos = m_browser->page()->currentFrame()->scrollPosition(); |
| 1329 | 1339 | QPoint endPos = startPos + QPoint(dx, dy); |
| 1330 | 1340 | |
| … |
… |
bool MythUIWebBrowser::IsOnTopScreen(void)
|
| 1434 | 1444 | |
| 1435 | 1445 | void MythUIWebBrowser::UpdateScrollBars(void) |
| 1436 | 1446 | { |
| | 1447 | if (!m_browser) |
| | 1448 | return; |
| | 1449 | |
| 1437 | 1450 | QPoint position = m_browser->page()->currentFrame()->scrollPosition(); |
| 1438 | 1451 | if (m_verticalScrollbar) |
| 1439 | 1452 | { |
| … |
… |
void MythUIWebBrowser::UpdateBuffer(void)
|
| 1460 | 1473 | { |
| 1461 | 1474 | UpdateScrollBars(); |
| 1462 | 1475 | |
| 1463 | | if (!m_image) |
| | 1476 | if (!m_image || !m_browser) |
| 1464 | 1477 | return; |
| 1465 | 1478 | |
| 1466 | 1479 | if (!m_active || (m_active && !m_browser->hasFocus())) |
| … |
… |
void MythUIWebBrowser::UpdateBuffer(void)
|
| 1479 | 1492 | */ |
| 1480 | 1493 | void MythUIWebBrowser::Pulse(void) |
| 1481 | 1494 | { |
| | 1495 | if (!m_browser) |
| | 1496 | return; |
| | 1497 | |
| 1482 | 1498 | if (m_scrollAnimation.IsActive() && |
| 1483 | 1499 | m_destinationScrollPos != |
| 1484 | 1500 | m_browser->page()->currentFrame()->scrollPosition()) |
| … |
… |
void MythUIWebBrowser::DrawSelf(MythPainter *p, int xoffset, int yoffset,
|
| 1521 | 1537 | */ |
| 1522 | 1538 | bool MythUIWebBrowser::keyPressEvent(QKeyEvent *event) |
| 1523 | 1539 | { |
| | 1540 | if (!m_browser) |
| | 1541 | return false; |
| | 1542 | |
| 1524 | 1543 | QStringList actions; |
| 1525 | 1544 | bool handled = false; |
| 1526 | 1545 | handled = GetMythMainWindow()->TranslateKeyPress("Browser", event, actions); |