diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2010-10-28 22:19:24 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2010-10-28 22:19:24 +0200 |
commit | cf7662212b6915dc0ea0992e0f9eb6509481b767 (patch) | |
tree | f39c1c51245794be5ca6c22de44e8287e5eabcc4 /src/urlbar/urlbar.cpp | |
parent | Merge branch 'AboutPagesIcon' into NEWMASTER (diff) | |
parent | This commit implements the new private browsign mode for rekonq: (diff) | |
download | rekonq-cf7662212b6915dc0ea0992e0f9eb6509481b767.tar.xz |
Merge branch 'NewPrivateBrowsing' into NEWMASTER
Diffstat (limited to 'src/urlbar/urlbar.cpp')
-rw-r--r-- | src/urlbar/urlbar.cpp | 18 |
1 files changed, 9 insertions, 9 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; } |