summaryrefslogtreecommitdiff
path: root/src/bookmarks/bookmarksmanager.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2010-08-20 19:15:23 +0200
committerAndrea Diamantini <adjam7@gmail.com>2010-08-20 19:15:23 +0200
commit52bf222bf033f6bbcd15cfe2012a51a194d475d8 (patch)
treed2e839ccbdf38c930d145d4d8dd23897bbc43666 /src/bookmarks/bookmarksmanager.cpp
parentKrazy fixes, first bunch (diff)
parent- The bookmark toolbar is now a real toolbar, not an action. (diff)
downloadrekonq-52bf222bf033f6bbcd15cfe2012a51a194d475d8.tar.xz
Merge commit 'refs/merge-requests/181' of git://gitorious.org/rekonq/mainline into m181
Conflicts: src/bookmarks/bookmarkstoolbar.h
Diffstat (limited to 'src/bookmarks/bookmarksmanager.cpp')
-rw-r--r--src/bookmarks/bookmarksmanager.cpp27
1 files changed, 9 insertions, 18 deletions
diff --git a/src/bookmarks/bookmarksmanager.cpp b/src/bookmarks/bookmarksmanager.cpp
index e68751c0..ea7b313d 100644
--- a/src/bookmarks/bookmarksmanager.cpp
+++ b/src/bookmarks/bookmarksmanager.cpp
@@ -95,7 +95,7 @@ BookmarkProvider::~BookmarkProvider()
}
-void BookmarkProvider::setupBookmarkBar(BookmarkToolBar *toolbar)
+void BookmarkProvider::registerBookmarkBar(BookmarkToolBar *toolbar)
{
if (m_bookmarkToolBars.contains(toolbar))
return;
@@ -103,8 +103,8 @@ void BookmarkProvider::setupBookmarkBar(BookmarkToolBar *toolbar)
kDebug() << "new bookmark bar...";
m_bookmarkToolBars.append(toolbar);
- toolbar->setContextMenuPolicy(Qt::CustomContextMenu);
- connect(toolbar, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(contextMenu(const QPoint &)));
+ toolbar->toolBar()->setContextMenuPolicy(Qt::CustomContextMenu);
+ connect(toolbar->toolBar(), SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(contextMenu(const QPoint &)));
kDebug() << "new bookmark bar... DONE!";
}
@@ -125,7 +125,7 @@ void BookmarkProvider::slotBookmarksChanged(const QString &group, const QString
{
if (bookmarkToolBar)
{
- bookmarkToolBar->clear();
+ bookmarkToolBar->toolBar()->clear();
fillBookmarkBar(bookmarkToolBar);
}
}
@@ -146,7 +146,7 @@ void BookmarkProvider::contextMenu(const QPoint &point)
if (m_bookmarkToolBars.isEmpty())
return;
- KToolBar *bookmarkToolBar = m_bookmarkToolBars.at(0);
+ KToolBar *bookmarkToolBar = m_bookmarkToolBars.at(0)->toolBar();
if (!bookmarkToolBar)
return;
@@ -174,16 +174,6 @@ KActionMenu* BookmarkProvider::bookmarkActionMenu(QWidget *parent)
}
-KAction* BookmarkProvider::bookmarkToolBarAction(KToolBar *t)
-{
- KAction *bookmarkToolBarAction = new KAction(this);
- bookmarkToolBarAction->setDefaultWidget(t); // The ownership is transferred to action
- bookmarkToolBarAction->setText(i18n("Bookmarks Bar"));
- bookmarkToolBarAction->setShortcutConfigurable(false);
- return bookmarkToolBarAction;
-}
-
-
void BookmarkProvider::fillBookmarkBar(BookmarkToolBar *toolBar)
{
KBookmarkGroup root = m_manager->toolbar();
@@ -199,12 +189,12 @@ void BookmarkProvider::fillBookmarkBar(BookmarkToolBar *toolBar)
new BookmarkMenu(bookmarkManager(), bookmarkOwner(), menuAction->menu(), bookmark.address());
connect(menuAction->menu(), SIGNAL(aboutToShow()), toolBar, SLOT(menuDisplayed()));
connect(menuAction->menu(), SIGNAL(aboutToHide()), toolBar, SLOT(menuHidden()));
- toolBar->addAction(menuAction);
+ toolBar->toolBar()->addAction(menuAction);
}
else if (bookmark.isSeparator())
{
- toolBar->addSeparator();
+ toolBar->toolBar()->addSeparator();
}
else
@@ -212,7 +202,8 @@ void BookmarkProvider::fillBookmarkBar(BookmarkToolBar *toolBar)
KBookmarkAction* action = new KBookmarkAction(bookmark, m_owner, this);
action->setIconText(action->iconText().replace('&', "&&"));
connect(action, SIGNAL(hovered()), toolBar, SLOT(actionHovered()));
- toolBar->addAction(action);
+ toolBar->toolBar()->addAction(action);
+ toolBar->toolBar()->widgetForAction(action)->installEventFilter(toolBar);
}
}
}