Ticket #8140: patch3

File patch3, 3.3 KB (added by Alec Leamas <leamas.alec@…>, 10 years ago)
Line 
1Only in mythtv-0.22/mythtv-0.22/libs/libmythui: libmythui.pro.orig
2Only in mythtv-0.22/mythtv-0.22/libs/libmythui: libmythui.pro.rej
3diff -U 2 -x '*.o' -x '*.so' -x '*22.so.0*' -x Makefile -x 'moc_*.cpp' -x '*.a' -r mythtv-0.22.org/mythtv-0.22/libs/libmythui/mythuiwebbrowser.cpp mythtv-0.22/mythtv-0.22/libs/libmythui/mythuiwebbrowser.cpp
4--- mythtv-0.22.org/mythtv-0.22/libs/libmythui/mythuiwebbrowser.cpp     2010-03-07 14:25:17.000000000 +0100
5+++ mythtv-0.22/mythtv-0.22/libs/libmythui/mythuiwebbrowser.cpp 2010-03-07 15:14:35.000000000 +0100
6@@ -664,10 +664,4 @@
7             ZoomOut();
8         }
9-        else if (action == "MOUSEUP" || action == "MOUSEDOWN" ||
10-                 action == "MOUSELEFT" || action == "MOUSERIGHT" ||
11-                 action == "MOUSELEFTBUTTON")
12-        {
13-            HandleMouseAction(action);
14-        }
15         else if (action == "PAGELEFT")
16         {
17@@ -731,64 +725,4 @@
18 }
19 
20-void MythUIWebBrowser::HandleMouseAction(const QString &action)
21-{
22-    int step = 5;
23-
24-    // speed up mouse movement if the same key is held down
25-    if (action == m_lastMouseAction &&
26-           m_lastMouseActionTime.msecsTo(QTime::currentTime()) < 500)
27-    {
28-        m_lastMouseActionTime = QTime::currentTime();
29-        m_mouseKeyCount++;
30-        if (m_mouseKeyCount > 5)
31-            step = 25;
32-    }
33-    else
34-    {
35-        m_lastMouseAction = action;
36-        m_lastMouseActionTime = QTime::currentTime();
37-        m_mouseKeyCount = 1;
38-    }
39-
40-    if (action == "MOUSEUP")
41-    {
42-        QPoint curPos = QCursor::pos();
43-        QCursor::setPos(curPos.x(), curPos.y() - step);
44-    }
45-    else if (action == "MOUSELEFT")
46-    {
47-        QPoint curPos = QCursor::pos();
48-        QCursor::setPos(curPos.x() - step, curPos.y());
49-    }
50-    else if (action == "MOUSERIGHT")
51-    {
52-        QPoint curPos = QCursor::pos();
53-        QCursor::setPos(curPos.x() + step, curPos.y());
54-    }
55-    else if (action == "MOUSEDOWN")
56-    {
57-        QPoint curPos = QCursor::pos();
58-        QCursor::setPos(curPos.x(), curPos.y() + step);
59-    }
60-    else if (action == "MOUSELEFTBUTTON")
61-    {
62-        QPoint curPos = QCursor::pos();
63-        QWidget *widget = QApplication::widgetAt(curPos);
64-
65-        if (widget)
66-        {
67-            curPos = widget->mapFromGlobal(curPos);
68-
69-            QMouseEvent *me = new QMouseEvent(QEvent::MouseButtonPress, curPos,
70-                                Qt::LeftButton, Qt::LeftButton, Qt::NoModifier);
71-            QApplication::postEvent(widget, me);
72-
73-            me = new QMouseEvent(QEvent::MouseButtonRelease, curPos,
74-                                Qt::LeftButton, Qt::NoButton, Qt::NoModifier);
75-            QApplication::postEvent(widget, me);
76-        }
77-    }
78-}
79-
80 bool MythUIWebBrowser::ParseElement(QDomElement &element)
81 {
82diff -U 2 -x '*.o' -x '*.so' -x '*22.so.0*' -x Makefile -x 'moc_*.cpp' -x '*.a' -r mythtv-0.22.org/mythtv-0.22/libs/libmythui/mythuiwebbrowser.h mythtv-0.22/mythtv-0.22/libs/libmythui/mythuiwebbrowser.h
83--- mythtv-0.22.org/mythtv-0.22/libs/libmythui/mythuiwebbrowser.h       2010-03-07 14:25:21.000000000 +0100
84+++ mythtv-0.22/mythtv-0.22/libs/libmythui/mythuiwebbrowser.h   2010-03-07 15:14:39.000000000 +0100
85@@ -88,5 +88,4 @@
86     void Finalize(void);
87     void UpdateBuffer(void);
88-    void HandleMouseAction(const QString &action);
89     void SetBackgroundColor(QColor color);
90