summaryrefslogtreecommitdiff
path: root/src/urlbar/urlbar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/urlbar/urlbar.cpp')
-rw-r--r--src/urlbar/urlbar.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/urlbar/urlbar.cpp b/src/urlbar/urlbar.cpp
index 4936d18f..1928c0c5 100644
--- a/src/urlbar/urlbar.cpp
+++ b/src/urlbar/urlbar.cpp
@@ -109,7 +109,10 @@ UrlBar::UrlBar(QWidget *parent)
connect(_tab->view(), SIGNAL(loadFinished(bool)), this, SLOT(loadFinished()));
connect(_tab->view(), SIGNAL(loadStarted()), this, SLOT(clearRightIcons()));
+ // bookmark icon
+ _icon->setIcon(KIcon("bookmarks").pixmap(32,32, QIcon::Disabled));
connect(Application::bookmarkProvider()->bookmarkManager(), SIGNAL(changed(const QString &, const QString &)), this, SLOT(onBookmarksChanged()));
+ connect(_icon, SIGNAL(clicked(const QPoint &)), this, SLOT(showBookmarkInfo(const QPoint &)));
// load typed urls
connect(this, SIGNAL(returnPressed(const QString &)), this, SLOT(loadTyped(const QString &)));
@@ -142,7 +145,8 @@ void UrlBar::setQUrl(const QUrl& url)
clearFocus();
KLineEdit::setUrl(url);
setCursorPosition(0);
- _icon->setIcon(Application::icon(url));
+// _icon->setIcon(Application::icon(url));
+// updateIcon();
}
}
@@ -304,6 +308,16 @@ void UrlBar::loadFinished()
return;
}
+ // setting bookmark icon
+ if (Application::bookmarkProvider()->bookmarkForUrl(_tab->url()).isNull())
+ {
+ _icon->setIcon(KIcon("bookmarks").pixmap(32,32, QIcon::Disabled));
+ }
+ else
+ {
+ _icon->setIcon(KIcon("bookmarks"));
+ }
+
// show KGet downloads??
if (ReKonfig::kgetList())
{
@@ -325,10 +339,6 @@ void UrlBar::loadFinished()
connect(bt, SIGNAL(clicked(QPoint)), _tab->page(), SLOT(showSSLInfo(QPoint)));
}
- // show bookmark info
- IconButton *bt = addRightIcon(UrlBar::BK);
- connect(bt, SIGNAL(clicked(const QPoint &)), this, SLOT(showBookmarkInfo(const QPoint &)));
-
// we need to update urlbar after the right icon settings
// removing this code (where setStyleSheet automatically calls update) needs adding again
// an update call
@@ -419,16 +429,6 @@ IconButton *UrlBar::addRightIcon(UrlBar::icon ic)
rightIcon->setIcon(KIcon("object-locked"));
rightIcon->setToolTip(i18n("Show SSL Info"));
break;
- case UrlBar::BK:
- if (Application::bookmarkProvider()->bookmarkForUrl(_tab->url()).isNull())
- {
- rightIcon->setIcon(KIcon("bookmarks").pixmap(32,32, QIcon::Disabled));
- }
- else
- {
- rightIcon->setIcon(KIcon("bookmarks"));
- }
- break;
default:
kDebug() << "ERROR.. default non extant case!!";
break;