From 9473bb3593c9ac454f9c4a0cdf84a215fd9f2683 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20Ander=20Pe=C3=B1alba?= Date: Tue, 7 Sep 2010 12:20:54 +0200 Subject: Only show the bookmark widget if the page is already bookmarked. This makes bookmarking with default parameters (the most frecuent use for the bookmark icon) faster. --- src/urlbar/urlbar.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/urlbar') diff --git a/src/urlbar/urlbar.cpp b/src/urlbar/urlbar.cpp index 7206b5e1..c8aa43ff 100644 --- a/src/urlbar/urlbar.cpp +++ b/src/urlbar/urlbar.cpp @@ -112,7 +112,7 @@ UrlBar::UrlBar(QWidget *parent) connect(_tab->view(), SIGNAL(loadFinished(bool)), this, SLOT(loadFinished())); 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(onBookmarksChanged())); @@ -264,7 +264,7 @@ void UrlBar::keyPressEvent(QKeyEvent *event) host += append; url.setHost(host); } - + // now, load it! activated(url); } @@ -360,9 +360,11 @@ void UrlBar::showBookmarkInfo(const QPoint &pos) { bookmark = Application::bookmarkProvider()->bookmarkOwner()->bookmarkCurrentPage(); } - - BookmarkWidget *widget = new BookmarkWidget(bookmark, window()); - widget->showAt(pos); + else + { + BookmarkWidget *widget = new BookmarkWidget(bookmark, window()); + widget->showAt(pos); + } } -- cgit v1.2.1