diff options
-rw-r--r-- | src/urlbar/bookmarkwidget.cpp | 2 | ||||
-rw-r--r-- | src/urlbar/bookmarkwidget.h | 5 | ||||
-rw-r--r-- | src/urlbar/urlbar.cpp | 8 |
3 files changed, 11 insertions, 4 deletions
diff --git a/src/urlbar/bookmarkwidget.cpp b/src/urlbar/bookmarkwidget.cpp index 4569bc27..3252d9cc 100644 --- a/src/urlbar/bookmarkwidget.cpp +++ b/src/urlbar/bookmarkwidget.cpp @@ -133,4 +133,6 @@ void BookmarkWidget::removeBookmark() { Application::bookmarkProvider()->bookmarkOwner()->deleteBookmark(*m_bookmark); close(); + + emit updateIcon(); } diff --git a/src/urlbar/bookmarkwidget.h b/src/urlbar/bookmarkwidget.h index e07dac24..62d71afb 100644 --- a/src/urlbar/bookmarkwidget.h +++ b/src/urlbar/bookmarkwidget.h @@ -45,7 +45,10 @@ public: void showAt(const QPoint &pos); -private slots: +Q_SIGNALS: + void updateIcon(); + +private Q_SLOTS: void accept(); void removeBookmark(); diff --git a/src/urlbar/urlbar.cpp b/src/urlbar/urlbar.cpp index c0edc9df..ceecf211 100644 --- a/src/urlbar/urlbar.cpp +++ b/src/urlbar/urlbar.cpp @@ -109,9 +109,6 @@ UrlBar::UrlBar(QWidget *parent) connect(_tab->view(), SIGNAL(loadStarted()), this, SLOT(clearRightIcons())); connect(_tab->view(), SIGNAL(iconChanged()), this, SLOT(refreshFavicon())); - // bookmark icon - connect(Application::bookmarkProvider()->bookmarkManager(), SIGNAL(changed(const QString &, const QString &)), this, SLOT(updateRightIcons())); - // search icon connect(Application::opensearchManager(), SIGNAL(openSearchEngineAdded(const QString &, const QString &, const QString &)), this, SLOT(updateRightIcons())); @@ -368,10 +365,15 @@ void UrlBar::showBookmarkInfo(const QPoint &pos) if (bookmark.isNull()) { bookmark = Application::bookmarkProvider()->bookmarkOwner()->bookmarkCurrentPage(); + + // set bk icon + bt->setIcon(KIcon("bookmarks")); + bt->setToolTip(i18n("Edit this bookmark")); } else { BookmarkWidget *widget = new BookmarkWidget(bookmark, window()); + connect(widget, SIGNAL(updateIcon()), this, SLOT(updateRightIcons())); widget->showAt(pos); } } |