diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2010-08-06 11:23:49 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2010-08-14 19:39:47 +0200 |
commit | de9abc72504370f9246fd5230b9fb778dacfccb1 (patch) | |
tree | a60a387717cc724b790ea50ee02d0b853918c7d5 | |
parent | Manually importing Yoann merge 2260 (diff) | |
download | rekonq-de9abc72504370f9246fd5230b9fb778dacfccb1.tar.xz |
Moving bookmark icon on the left
-rw-r--r-- | src/urlbar/bookmarkwidget.cpp | 4 | ||||
-rw-r--r-- | src/urlbar/urlbar.cpp | 30 | ||||
-rw-r--r-- | src/urlbar/urlbar.h | 1 |
3 files changed, 17 insertions, 18 deletions
diff --git a/src/urlbar/bookmarkwidget.cpp b/src/urlbar/bookmarkwidget.cpp index f9ef5cd6..3380ec57 100644 --- a/src/urlbar/bookmarkwidget.cpp +++ b/src/urlbar/bookmarkwidget.cpp @@ -143,8 +143,8 @@ void BookmarkWidget::reject() void BookmarkWidget::showAt(const QPoint &pos) { QPoint p; - p.setX(pos.x() - 350); - p.setY(pos.y() + 10); + p.setX(pos.x()); + p.setY(pos.y() + 12); move(p); show(); } 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; diff --git a/src/urlbar/urlbar.h b/src/urlbar/urlbar.h index 8808661b..d0e2b60e 100644 --- a/src/urlbar/urlbar.h +++ b/src/urlbar/urlbar.h @@ -83,7 +83,6 @@ public: KGet = 0x00000001, RSS = 0x00000010, SSL = 0x00000100, - BK = 0x00001000 }; explicit UrlBar(QWidget *parent = 0); |