summaryrefslogtreecommitdiff
path: root/src/bookmarks.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-09-03 14:11:09 +0200
committerAndrea Diamantini <adjam7@gmail.com>2009-09-03 14:11:09 +0200
commitd9e66d12af59efea52b3cca77ea4fdb7c7016d81 (patch)
tree7663bca5ebbfbb9e1c0fcb59d74a9b3da97180b3 /src/bookmarks.cpp
parent- Removed HistoryMenu (no more used) (diff)
downloadrekonq-d9e66d12af59efea52b3cca77ea4fdb7c7016d81.tar.xz
Fix compilation and improved a (little) bit
Bookmarks Manager
Diffstat (limited to 'src/bookmarks.cpp')
-rw-r--r--src/bookmarks.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/bookmarks.cpp b/src/bookmarks.cpp
index d8298478..69f6c945 100644
--- a/src/bookmarks.cpp
+++ b/src/bookmarks.cpp
@@ -65,9 +65,13 @@ void BookmarkOwner::openBookmark(const KBookmark & bookmark,
Qt::KeyboardModifiers keyboardModifiers)
{
if (keyboardModifiers & Qt::ControlModifier || mouseButtons == Qt::MidButton)
+ {
emit openUrl(bookmark.url(), Rekonq::SettingOpenTab);
+ }
else
+ {
emit openUrl(bookmark.url(), Rekonq::CurrentTab);
+ }
}
@@ -150,11 +154,10 @@ void BookmarkMenu::slotAddBookmark()
// ------------------------------------------------------------------------------------------------------
-BookmarkProvider::BookmarkProvider(QWidget *parent)
+BookmarkProvider::BookmarkProvider(QObject *parent)
: QObject(parent)
, m_manager(0)
, m_owner(0)
- , m_menu(new KMenu(parent))
, m_actionCollection(new KActionCollection(this))
, m_bookmarkMenu(0)
, m_bookmarkToolBar(0)
@@ -183,7 +186,6 @@ BookmarkProvider::BookmarkProvider(QWidget *parent)
// setup menu
m_owner = new BookmarkOwner(this);
connect(m_owner, SIGNAL(openUrl(const KUrl&, const Rekonq::OpenType &)), this, SIGNAL(openUrl(const KUrl&, const Rekonq::OpenType &)));
- m_bookmarkMenu = new BookmarkMenu(m_manager, m_owner, m_menu, m_actionCollection);
}
@@ -191,7 +193,6 @@ BookmarkProvider::~BookmarkProvider()
{
delete m_bookmarkMenu;
delete m_actionCollection;
- delete m_menu;
delete m_owner;
delete m_manager;
}
@@ -256,10 +257,12 @@ void BookmarkProvider::contextMenu(const QPoint &point)
}
-KActionMenu* BookmarkProvider::bookmarkActionMenu()
+KActionMenu* BookmarkProvider::bookmarkActionMenu(QWidget *parent)
{
- KActionMenu *bookmarkActionMenu = new KActionMenu(this);
- bookmarkActionMenu->setMenu(m_menu);
+ KMenu *menu = new KMenu(parent);
+ m_bookmarkMenu = new BookmarkMenu(m_manager, m_owner, menu, m_actionCollection);
+ KActionMenu *bookmarkActionMenu = new KActionMenu(parent);
+ bookmarkActionMenu->setMenu(menu);
bookmarkActionMenu->setText(i18n("&Bookmarks"));
return bookmarkActionMenu;
}