1 | |
---|
2 | diff -c -C 2 mythtv/libs/libmythui/libmythui.pro /home/mk/src/rpms/build/mythtv-0.22/mythtv-0.22/libs/libmythui/libmythui.pro |
---|
3 | *** mythtv/libs/libmythui/libmythui.pro 2010-03-03 15:43:08.000000000 +0100 |
---|
4 | --- /home/mk/src/rpms/build/mythtv-0.22/mythtv-0.22/libs/libmythui/libmythui.pro 2010-03-03 13:07:59.000000000 +0100 |
---|
5 | *************** |
---|
6 | *** 6,11 **** |
---|
7 | --- 6,12 ---- |
---|
8 | target.path = $${LIBDIR} |
---|
9 | INSTALLS = target |
---|
10 | |
---|
11 | + |
---|
12 | INCLUDEPATH += ../libmythdb |
---|
13 | INCLUDEPATH += ../.. ../ |
---|
14 | |
---|
15 | *************** |
---|
16 | *** 59,64 **** |
---|
17 | --- 60,70 ---- |
---|
18 | |
---|
19 | INSTALLS += inc |
---|
20 | |
---|
21 | + mythbrowsersupport.path = $${PREFIX}/share/mythtv/ |
---|
22 | + mythbrowsersupport.files = mythbrowser.css |
---|
23 | + INSTALLS += mythbrowsersupport |
---|
24 | + |
---|
25 | + |
---|
26 | # |
---|
27 | # Configuration dependent stuff (depending on what is set in mythtv top |
---|
28 | # level settings.pro) |
---|
29 | |
---|
30 | |
---|
31 | diff -c -C 2 mythtv/libs/libmythui/mythuiwebbrowser.cpp /home/mk/src/rpms/build/mythtv-0.22/mythtv-0.22/libs/libmythui/mythuiwebbrowser.cpp |
---|
32 | *** mythtv/libs/libmythui/mythuiwebbrowser.cpp 2010-03-03 15:43:08.000000000 +0100 |
---|
33 | --- /home/mk/src/rpms/build/mythtv-0.22/mythtv-0.22/libs/libmythui/mythuiwebbrowser.cpp 2010-03-03 13:43:17.000000000 +0100 |
---|
34 | *************** |
---|
35 | *** 30,39 **** |
---|
36 | #include "mythdirs.h" |
---|
37 | #include "mythuihelper.h" |
---|
38 | |
---|
39 | /** |
---|
40 | * @class MythWebView |
---|
41 | * @brief Subclass of QWebView |
---|
42 | ! * \note allows us to intercept keypresses |
---|
43 | */ |
---|
44 | MythWebView::MythWebView(QWidget *parent, MythUIWebBrowser *parentBrowser) |
---|
45 | : QWebView(parent) |
---|
46 | --- 30,42 ---- |
---|
47 | #include "mythdirs.h" |
---|
48 | #include "mythuihelper.h" |
---|
49 | |
---|
50 | + /** CSS code loaded for each and every page. */ |
---|
51 | + static const char* BROWSER_CSS_FILE = "mythbrowser.css"; |
---|
52 | + |
---|
53 | /** |
---|
54 | * @class MythWebView |
---|
55 | * @brief Subclass of QWebView |
---|
56 | ! * \note allows us to intercept keypresses and to use a specific stylesheet. |
---|
57 | */ |
---|
58 | MythWebView::MythWebView(QWidget *parent, MythUIWebBrowser *parentBrowser) |
---|
59 | : QWebView(parent) |
---|
60 | *************** |
---|
61 | *** 44,49 **** |
---|
62 | --- 47,56 ---- |
---|
63 | this, SLOT(handleUnsupportedContent(QNetworkReply *))); |
---|
64 | |
---|
65 | page()->setForwardUnsupportedContent(true); |
---|
66 | + |
---|
67 | + QString cssFile = "file:///" + GetShareDir() + BROWSER_CSS_FILE; |
---|
68 | + this->settings()->setUserStyleSheetUrl(cssFile); |
---|
69 | + |
---|
70 | } |
---|
71 | |
---|
72 | void MythWebView::keyPressEvent(QKeyEvent *event) |
---|
73 | |
---|
74 | |
---|