summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-08-24 10:24:33 +0200
committerAndrea Diamantini <adjam7@gmail.com>2009-08-24 10:24:33 +0200
commit2dc5216c6ac48e638dd6e3e7998f0b9d10773d95 (patch)
treeab55f488ed5673b30771375aa2af11a2a522d6fa
parentMiddle click closes tab (diff)
parentFixed a bit setting_webkit.ui (diff)
downloadrekonq-2dc5216c6ac48e638dd6e3e7998f0b9d10773d95.tar.xz
Merge branch 'userCSS'
-rw-r--r--src/mainwindow.cpp5
-rw-r--r--src/rekonq.kcfg3
-rw-r--r--src/settings_webkit.ui58
3 files changed, 52 insertions, 14 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index d4c555ef..b2c1fed1 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -474,6 +474,11 @@ void MainWindow::slotUpdateConfiguration()
defaultSettings->setAttribute(QWebSettings::OfflineStorageDatabaseEnabled, ReKonfig::offlineStorageDatabaseEnabled());
defaultSettings->setAttribute(QWebSettings::OfflineWebApplicationCacheEnabled, ReKonfig::offlineWebApplicationCacheEnabled());
defaultSettings->setAttribute(QWebSettings::LocalStorageDatabaseEnabled, ReKonfig::localStorageDatabaseEnabled());
+ /**
+ * Applies user defined CSS to all open webpages. If there no longer is a
+ * user defined CSS removes it from all open webpages.
+ */
+ defaultSettings->setUserStyleSheetUrl(ReKonfig::userCSS());
// ====== load Settings on main classes
Application::networkAccessManager()->loadSettings();
diff --git a/src/rekonq.kcfg b/src/rekonq.kcfg
index d9ccd3e0..b27c4fd5 100644
--- a/src/rekonq.kcfg
+++ b/src/rekonq.kcfg
@@ -114,6 +114,9 @@
<entry name="localStorageDatabaseEnabled" type="Bool">
<default>true</default>
</entry>
+ <entry name="userCSS" type="Url">
+ <default></default>
+ </entry>
</group>
</kcfg>
diff --git a/src/settings_webkit.ui b/src/settings_webkit.ui
index a28ce915..129bcf03 100644
--- a/src/settings_webkit.ui
+++ b/src/settings_webkit.ui
@@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
- <width>564</width>
+ <width>622</width>
<height>360</height>
</rect>
</property>
@@ -17,49 +17,49 @@
<string>WebKit Settings</string>
</property>
<layout class="QGridLayout" name="gridLayout">
- <item row="0" column="0">
+ <item row="0" column="0" colspan="2">
<widget class="QCheckBox" name="kcfg_autoLoadImages">
<property name="text">
<string>Autoload images</string>
</property>
</widget>
</item>
- <item row="0" column="1" rowspan="6">
+ <item row="0" column="2" rowspan="6">
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
</widget>
</item>
- <item row="0" column="2">
+ <item row="0" column="3">
<widget class="QCheckBox" name="kcfg_linksIncludedInFocusChain">
<property name="text">
<string>Links included in focus chain</string>
</property>
</widget>
</item>
- <item row="1" column="0">
+ <item row="1" column="0" colspan="2">
<widget class="QCheckBox" name="kcfg_javascriptEnabled">
<property name="text">
<string>JavaScript support</string>
</property>
</widget>
</item>
- <item row="1" column="2">
+ <item row="1" column="3">
<widget class="QCheckBox" name="kcfg_zoomTextOnly">
<property name="text">
<string>Zoom text only</string>
</property>
</widget>
</item>
- <item row="2" column="0">
+ <item row="2" column="0" colspan="2">
<widget class="QCheckBox" name="kcfg_javaEnabled">
<property name="text">
<string>Java support</string>
</property>
</widget>
</item>
- <item row="2" column="2">
+ <item row="2" column="3">
<widget class="QCheckBox" name="kcfg_printElementBackgrounds">
<property name="text">
<string>Print element backgrounds</string>
@@ -73,35 +73,35 @@
</property>
</widget>
</item>
- <item row="3" column="2">
+ <item row="3" column="3">
<widget class="QCheckBox" name="kcfg_offlineStorageDatabaseEnabled">
<property name="text">
<string>Offline storage database</string>
</property>
</widget>
</item>
- <item row="4" column="0">
+ <item row="4" column="0" colspan="2">
<widget class="QCheckBox" name="kcfg_javascriptCanOpenWindows">
<property name="text">
<string>JavaScript can open windows</string>
</property>
</widget>
</item>
- <item row="4" column="2">
+ <item row="4" column="3">
<widget class="QCheckBox" name="kcfg_offlineWebApplicationCacheEnabled">
<property name="text">
<string>Offline web application cache</string>
</property>
</widget>
</item>
- <item row="5" column="0">
+ <item row="5" column="0" colspan="2">
<widget class="QCheckBox" name="kcfg_javascriptCanAccessClipboard">
<property name="text">
<string>JavaScript can access clipboard</string>
</property>
</widget>
</item>
- <item row="5" column="2">
+ <item row="5" column="3">
<widget class="QCheckBox" name="kcfg_localStorageDatabaseEnabled">
<property name="text">
<string>Local storage database</string>
@@ -112,6 +112,29 @@
</widget>
</item>
<item>
+ <widget class="QGroupBox" name="groupBox_2">
+ <property name="title">
+ <string>User Style Sheet</string>
+ </property>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>User CSS path:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="KUrlRequester" name="kcfg_userCSS">
+ <property name="filter">
+ <string>*.css</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
@@ -119,13 +142,20 @@
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
- <height>146</height>
+ <height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
+ <customwidgets>
+ <customwidget>
+ <class>KUrlRequester</class>
+ <extends>QFrame</extends>
+ <header>kurlrequester.h</header>
+ </customwidget>
+ </customwidgets>
<resources/>
<connections/>
</ui>