diff options
Diffstat (limited to 'src/urlbar')
-rw-r--r-- | src/urlbar/bookmarkwidget.cpp | 2 | ||||
-rw-r--r-- | src/urlbar/urlbar.cpp | 29 | ||||
-rw-r--r-- | src/urlbar/urlbar.h | 1 |
3 files changed, 16 insertions, 16 deletions
diff --git a/src/urlbar/bookmarkwidget.cpp b/src/urlbar/bookmarkwidget.cpp index 0e05e776..cb711723 100644 --- a/src/urlbar/bookmarkwidget.cpp +++ b/src/urlbar/bookmarkwidget.cpp @@ -144,7 +144,7 @@ void BookmarkWidget::reject() void BookmarkWidget::showAt(const QPoint &pos) { QPoint p; - p.setX(pos.x()); + p.setX(pos.x() - 350); p.setY(pos.y() + 12); move(p); show(); diff --git a/src/urlbar/urlbar.cpp b/src/urlbar/urlbar.cpp index c272d819..b4117601 100644 --- a/src/urlbar/urlbar.cpp +++ b/src/urlbar/urlbar.cpp @@ -112,9 +112,7 @@ UrlBar::UrlBar(QWidget *parent) 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 &))); @@ -147,8 +145,7 @@ void UrlBar::setQUrl(const QUrl& url) clearFocus(); KLineEdit::setUrl(url); setCursorPosition(0); -// _icon->setIcon(Application::icon(url)); -// updateIcon(); + _icon->setIcon(Application::icon(url)); } } @@ -310,17 +307,9 @@ void UrlBar::loadFinished() return; } - // setting bookmark icon - if (Application::bookmarkProvider()->bookmarkForUrl(_tab->url()).isNull()) - { - _icon->setIcon(KIcon("bookmarks").pixmap(32,32, QIcon::Disabled)); - _icon->setToolTip(i18n("Bookmark this page")); - } - else - { - _icon->setIcon(KIcon("bookmarks")); - _icon->setToolTip(i18n("Edit this bookmark")); - } + // show bookmark info + IconButton *bt = addRightIcon(UrlBar::BK); + connect(bt, SIGNAL(clicked(const QPoint &)), this, SLOT(showBookmarkInfo(const QPoint &))); // show KGet downloads?? if (!KStandardDirs::findExe("kget").isNull() && ReKonfig::kgetList()) @@ -434,6 +423,16 @@ 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; diff --git a/src/urlbar/urlbar.h b/src/urlbar/urlbar.h index d0e2b60e..8808661b 100644 --- a/src/urlbar/urlbar.h +++ b/src/urlbar/urlbar.h @@ -83,6 +83,7 @@ public: KGet = 0x00000001, RSS = 0x00000010, SSL = 0x00000100, + BK = 0x00001000 }; explicit UrlBar(QWidget *parent = 0); |