summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mainwindow.cpp24
-rw-r--r--src/mainwindow.h2
-rw-r--r--src/rekonq.kcfg6
-rw-r--r--src/settings.cpp2
-rw-r--r--src/settings_webkit.ui42
5 files changed, 27 insertions, 49 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index d58208ba..54d632d2 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -217,11 +217,6 @@ void MainWindow::setupActions()
actionCollection()->addAction(QLatin1String("open_location"), a);
connect(a, SIGNAL(triggered(bool)) , this, SLOT(slotOpenLocation()));
- a = new KAction(KIcon("view-media-artist"), i18n("Private &Browsing"), this);
- a->setCheckable(true);
- actionCollection()->addAction(QLatin1String("private_browsing"), a);
- connect(a, SIGNAL(triggered(bool)) , this, SLOT(slotPrivateBrowsing()));
-
a = new KAction(KIcon("zoom-in"), i18n("&Enlarge Font"), this);
a->setShortcut(KShortcut(Qt::CTRL | Qt::Key_Plus));
actionCollection()->addAction(QLatin1String("bigger_font"), a);
@@ -241,11 +236,17 @@ void MainWindow::setupActions()
actionCollection()->addAction(QLatin1String("page_source"), a);
connect(a, SIGNAL(triggered(bool)), this, SLOT(slotViewPageSource()));
+ // ================ Tools (WebKit) Actions
a = new KAction(KIcon("tools-report-bug"), i18n("Web &Inspector"), this);
a->setCheckable(true);
actionCollection()->addAction(QLatin1String("web_inspector"), a);
connect(a, SIGNAL(triggered(bool)), this, SLOT(slotToggleInspector(bool)));
+ a = new KAction(KIcon("view-media-artist"), i18n("Private &Browsing"), this);
+ a->setCheckable(true);
+ actionCollection()->addAction(QLatin1String("private_browsing"), a);
+ connect(a, SIGNAL(triggered(bool)) , this, SLOT(slotPrivateBrowsing(bool)));
+
// ================ history related actions
m_historyBackAction = new KAction(KIcon("go-previous"), i18n("Back"), this);
m_historyBackMenu = new KMenu(this);
@@ -344,10 +345,8 @@ void MainWindow::slotUpdateConfiguration()
defaultSettings->setAttribute(QWebSettings::JavascriptEnabled, ReKonfig::javascriptEnabled());
defaultSettings->setAttribute(QWebSettings::JavaEnabled, ReKonfig::javaEnabled());
defaultSettings->setAttribute(QWebSettings::PluginsEnabled, ReKonfig::pluginsEnabled());
- defaultSettings->setAttribute(QWebSettings::PrivateBrowsingEnabled, ReKonfig::privateBrowsingEnabled());
defaultSettings->setAttribute(QWebSettings::JavascriptCanOpenWindows, ReKonfig::javascriptCanOpenWindows());
defaultSettings->setAttribute(QWebSettings::JavascriptCanAccessClipboard, ReKonfig::javascriptCanAccessClipboard());
- defaultSettings->setAttribute(QWebSettings::DeveloperExtrasEnabled, ReKonfig::developerExtrasEnabled());
defaultSettings->setAttribute(QWebSettings::LinksIncludedInFocusChain, ReKonfig::linksIncludedInFocusChain());
defaultSettings->setAttribute(QWebSettings::ZoomTextOnly, ReKonfig::zoomTextOnly());
defaultSettings->setAttribute(QWebSettings::PrintElementBackgrounds, ReKonfig::printElementBackgrounds());
@@ -359,7 +358,6 @@ void MainWindow::slotUpdateConfiguration()
Application::networkAccessManager()->loadSettings();
Application::cookieJar()->loadSettings();
Application::historyManager()->loadSettings();
-
}
@@ -545,16 +543,14 @@ void MainWindow::printRequested(QWebFrame *frame)
}
-void MainWindow::slotPrivateBrowsing()
+void MainWindow::slotPrivateBrowsing(bool enable)
{
QWebSettings *settings = QWebSettings::globalSettings();
- bool pb = settings->testAttribute(QWebSettings::PrivateBrowsingEnabled);
- if (!pb)
+ if (enable)
{
QString title = i18n("Are you sure you want to turn on private browsing?");
QString text = "<b>" + title + i18n("</b><br><br>When private browsing in turned on,"
" webpages are not added to the history,"
- " items are automatically removed from the Downloads window," \
" new cookies are not stored, current cookies can't be accessed," \
" site icons wont be stored, session wont be saved, " \
" and searches are not addded to the pop-up menu in the Google search box." \
@@ -566,6 +562,10 @@ void MainWindow::slotPrivateBrowsing()
{
settings->setAttribute(QWebSettings::PrivateBrowsingEnabled, true);
}
+ else
+ {
+ actionCollection()->action("private_browsing")->setChecked(false);
+ }
}
else
{
diff --git a/src/mainwindow.h b/src/mainwindow.h
index dc01d990..c062e86b 100644
--- a/src/mainwindow.h
+++ b/src/mainwindow.h
@@ -91,7 +91,7 @@ private slots:
void slotFileOpen();
void slotFilePrintPreview();
void slotFilePrint();
- void slotPrivateBrowsing();
+ void slotPrivateBrowsing(bool);
void slotFileSaveAs();
void printRequested(QWebFrame *frame);
diff --git a/src/rekonq.kcfg b/src/rekonq.kcfg
index 6b74f47e..a7b7f848 100644
--- a/src/rekonq.kcfg
+++ b/src/rekonq.kcfg
@@ -81,18 +81,12 @@
<entry name="pluginsEnabled" type="Bool">
<default>true</default>
</entry>
- <entry name="privateBrowsingEnabled" type="Bool">
- <default>false</default>
- </entry>
<entry name="javascriptCanOpenWindows" type="Bool">
<default>true</default>
</entry>
<entry name="javascriptCanAccessClipboard" type="Bool">
<default>false</default>
</entry>
- <entry name="developerExtrasEnabled" type="Bool">
- <default>false</default>
- </entry>
<entry name="linksIncludedInFocusChain" type="Bool">
<default>true</default>
</entry>
diff --git a/src/settings.cpp b/src/settings.cpp
index 7dc01d83..5922d786 100644
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -140,10 +140,8 @@ void SettingsDialog::setWebSettingsToolTips()
d->webkitUi.kcfg_javascriptEnabled->setToolTip(i18n("Enables the running of JavaScript programs.") );
d->webkitUi.kcfg_javaEnabled->setToolTip(i18n("Enables Java applets.") );
d->webkitUi.kcfg_pluginsEnabled->setToolTip(i18n("Enables plugins in web pages.") );
- d->webkitUi.kcfg_privateBrowsingEnabled->setToolTip(i18n("Prevents WebKit from recording visited pages in the history.") );
d->webkitUi.kcfg_javascriptCanOpenWindows->setToolTip(i18n("Allows JavaScript programs to opening new windows.") );
d->webkitUi.kcfg_javascriptCanAccessClipboard->setToolTip(i18n("Allows JavaScript programs to reading/writing to the clipboard.") );
- d->webkitUi.kcfg_developerExtrasEnabled->setToolTip(i18n("Enables extra tools for Web developers") );
d->webkitUi.kcfg_linksIncludedInFocusChain->setToolTip(i18n("Includes hyperlinks in the keyboard focus chain.") );
d->webkitUi.kcfg_zoomTextOnly->setToolTip(i18n("Applies the zoom factor on a frame to only the text or all content.") );
d->webkitUi.kcfg_printElementBackgrounds->setToolTip(i18n("Draws also background color and images when the page is printed.") );
diff --git a/src/settings_webkit.ui b/src/settings_webkit.ui
index 0452ec8a..362e392a 100644
--- a/src/settings_webkit.ui
+++ b/src/settings_webkit.ui
@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>559</width>
- <height>400</height>
+ <width>564</width>
+ <height>360</height>
</rect>
</property>
<property name="windowTitle">
@@ -27,7 +27,7 @@
</property>
</widget>
</item>
- <item row="0" column="1" rowspan="7">
+ <item row="0" column="1" rowspan="6">
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Vertical</enum>
@@ -35,9 +35,9 @@
</widget>
</item>
<item row="0" column="2">
- <widget class="QCheckBox" name="kcfg_developerExtrasEnabled">
+ <widget class="QCheckBox" name="kcfg_linksIncludedInFocusChain">
<property name="text">
- <string>Developer Extras</string>
+ <string>Links included in focus chain</string>
</property>
</widget>
</item>
@@ -49,9 +49,9 @@
</widget>
</item>
<item row="1" column="2">
- <widget class="QCheckBox" name="kcfg_linksIncludedInFocusChain">
+ <widget class="QCheckBox" name="kcfg_zoomTextOnly">
<property name="text">
- <string>Links included in focus chain</string>
+ <string>Zoom Text Only</string>
</property>
</widget>
</item>
@@ -63,9 +63,9 @@
</widget>
</item>
<item row="2" column="2">
- <widget class="QCheckBox" name="kcfg_zoomTextOnly">
+ <widget class="QCheckBox" name="kcfg_printElementBackgrounds">
<property name="text">
- <string>Zoom Text Only</string>
+ <string>Print element Backgrounds</string>
</property>
</widget>
</item>
@@ -77,48 +77,34 @@
</widget>
</item>
<item row="3" column="2">
- <widget class="QCheckBox" name="kcfg_printElementBackgrounds">
- <property name="text">
- <string>Print element Backgrounds</string>
- </property>
- </widget>
- </item>
- <item row="4" column="0">
- <widget class="QCheckBox" name="kcfg_privateBrowsingEnabled">
- <property name="text">
- <string>Private Browsing</string>
- </property>
- </widget>
- </item>
- <item row="4" column="2">
<widget class="QCheckBox" name="kcfg_offlineStorageDatabaseEnabled">
<property name="text">
<string>Offline storage Database</string>
</property>
</widget>
</item>
- <item row="5" column="0">
+ <item row="4" column="0">
<widget class="QCheckBox" name="kcfg_javascriptCanOpenWindows">
<property name="text">
<string>Javascript can open windows</string>
</property>
</widget>
</item>
- <item row="5" column="2">
+ <item row="4" column="2">
<widget class="QCheckBox" name="kcfg_offlineWebApplicationCacheEnabled">
<property name="text">
<string>Offline Web Application Cache </string>
</property>
</widget>
</item>
- <item row="6" column="0">
+ <item row="5" column="0">
<widget class="QCheckBox" name="kcfg_javascriptCanAccessClipboard">
<property name="text">
<string>Javascript can access clipboard</string>
</property>
</widget>
</item>
- <item row="6" column="2">
+ <item row="5" column="2">
<widget class="QCheckBox" name="kcfg_localStorageDatabaseEnabled">
<property name="text">
<string>Local storage database</string>
@@ -136,7 +122,7 @@
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
- <height>159</height>
+ <height>146</height>
</size>
</property>
</spacer>