diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2010-10-22 00:04:47 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2010-10-22 00:10:28 +0200 |
commit | 7c981aa978bea7551aec99bc3c68a23cd6c8df00 (patch) | |
tree | 4db8b374676927afe7915a0cc034b477beeb3ebf /src/urlbar | |
parent | This commit fixes icons handling for "rekonq pages" (eg: about urls). (diff) | |
download | rekonq-7c981aa978bea7551aec99bc3c68a23cd6c8df00.tar.xz |
This commit implements the new private browsign mode for rekonq:
- it implements a new KAaction in the Application class to trace changes on
- stops session management and save it, restoring last visited sites on restoring mormal mode
- implements necessary changes to iconmanager, urlbar & application
Please, note that the private browsing mode will definitely work just on KDE SC 4.6, cause of
the needed changes in kdewebkit to eg handle cookies and so on..
.
Hope you like it :)
Diffstat (limited to 'src/urlbar')
-rw-r--r-- | src/urlbar/urlbar.cpp | 18 | ||||
-rw-r--r-- | src/urlbar/urlbar.h | 2 |
2 files changed, 9 insertions, 11 deletions
diff --git a/src/urlbar/urlbar.cpp b/src/urlbar/urlbar.cpp index 3ec0b2fa..1f4a0367 100644 --- a/src/urlbar/urlbar.cpp +++ b/src/urlbar/urlbar.cpp @@ -79,7 +79,6 @@ void IconButton::mouseReleaseEvent(QMouseEvent* event) UrlBar::UrlBar(QWidget *parent) : KLineEdit(parent) , _tab(0) - , _privateMode(false) , _icon(new IconButton(this)) , _suggestionTimer(new QTimer(this)) { @@ -159,7 +158,7 @@ void UrlBar::paintEvent(QPaintEvent *event) QColor backgroundColor; QColor foregroundColor; - if (_privateMode) + if (QWebSettings::globalSettings()->testAttribute(QWebSettings::PrivateBrowsingEnabled)) { backgroundColor = QColor(220, 220, 220); // light gray foregroundColor = Qt::black; @@ -289,12 +288,6 @@ void UrlBar::focusInEvent(QFocusEvent *event) } -void UrlBar::setPrivateMode(bool on) -{ - _privateMode = on; -} - - void UrlBar::dropEvent(QDropEvent *event) { KLineEdit::dropEvent(event); @@ -505,8 +498,15 @@ void UrlBar::suggest() void UrlBar::refreshFavicon() { + if(QWebSettings::globalSettings()->testAttribute(QWebSettings::PrivateBrowsingEnabled)) + { + _icon->setIcon(KIcon("view-media-artist")); + return; + } + KUrl u = _tab->url(); - if(u.scheme() == QL1S("about")) { + if(u.scheme() == QL1S("about")) + { _icon->setIcon(KIcon("arrow-right")); return; } diff --git a/src/urlbar/urlbar.h b/src/urlbar/urlbar.h index dcd0ba5b..4cdd9d9c 100644 --- a/src/urlbar/urlbar.h +++ b/src/urlbar/urlbar.h @@ -89,7 +89,6 @@ public: explicit UrlBar(QWidget *parent = 0); ~UrlBar(); - void setPrivateMode(bool on); void activateSuggestions(bool); public slots: @@ -124,7 +123,6 @@ private: QWeakPointer<CompletionWidget> _box; WebTab *_tab; - bool _privateMode; IconButton *_icon; IconButtonPointerList _rightIconsList; |