summaryrefslogtreecommitdiff
path: root/src/bookmarks/bookmarksmanager.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2010-04-15 23:57:22 +0200
committerAndrea Diamantini <adjam7@gmail.com>2010-04-15 23:57:22 +0200
commitd81fcde14089fee3a1c64fc647f4cc77c9efd7af (patch)
tree16a6d09cc778d553b0b5f90bff83c6e3bad532b9 /src/bookmarks/bookmarksmanager.cpp
parentMouse move autoscroll implementation (diff)
parentFix highlightAll() indentation :) (diff)
downloadrekonq-d81fcde14089fee3a1c64fc647f4cc77c9efd7af.tar.xz
Merge commit 'refs/merge-requests/124' of git://gitorious.org/rekonq/mainline into m124
Diffstat (limited to 'src/bookmarks/bookmarksmanager.cpp')
-rw-r--r--src/bookmarks/bookmarksmanager.cpp34
1 files changed, 30 insertions, 4 deletions
diff --git a/src/bookmarks/bookmarksmanager.cpp b/src/bookmarks/bookmarksmanager.cpp
index d54abb3c..7e933599 100644
--- a/src/bookmarks/bookmarksmanager.cpp
+++ b/src/bookmarks/bookmarksmanager.cpp
@@ -35,6 +35,7 @@
#include "mainwindow.h"
#include "webtab.h"
#include "webview.h"
+#include "mainview.h"
#include "bookmarkcontextmenu.h"
// KDE Includes
@@ -53,7 +54,6 @@
#include <QtGui/QActionGroup>
-
BookmarkOwner::BookmarkOwner(QObject *parent)
: QObject(parent)
, KBookmarkOwner()
@@ -112,6 +112,22 @@ void BookmarkOwner::openFolderinTabs(const KBookmarkGroup &bm)
}
+QList< QPair<QString, QString> > BookmarkOwner::currentBookmarkList() const
+{
+ QList< QPair<QString, QString> > bkList;
+ int tabNumber = Application::instance()->mainWindow()->mainView()->count();
+
+ for(int i = 0; i < tabNumber; i++)
+ {
+ QPair<QString, QString> item;
+ item.first = Application::instance()->mainWindow()->mainView()->webTab(i)->view()->title();
+ item.second = Application::instance()->mainWindow()->mainView()->webTab(i)->url().url();
+ bkList += item;
+ }
+ return bkList;
+}
+
+
// ------------------------------------------------------------------------------------------------------
@@ -405,9 +421,19 @@ void BookmarkActionMenu::addFolderActions()
if(!m_group.first().isNull())
{
- action = new KAction(KIcon("tab-new"), i18n("Open Folder in Tabs"), this);
- connect(action, SIGNAL(triggered(bool)), this, SLOT(openActionInTabs()));
- addAction(action);
+ KBookmark bookmark = m_group.first();
+
+ while(bookmark.isGroup() || bookmark.isSeparator())
+ {
+ bookmark = m_group.next(bookmark);
+ }
+
+ if(!bookmark.isNull())
+ {
+ action = new KAction(KIcon("tab-new"), i18n("Open Folder in Tabs"), this);
+ connect(action, SIGNAL(triggered(bool)), this, SLOT(openActionInTabs()));
+ addAction(action);
+ }
}
action = new KAction(KIcon("bookmark-new"), i18n("Add Bookmark Here"), this);