summaryrefslogtreecommitdiff
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
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
-rw-r--r--src/bookmarks/bookmarksmanager.cpp34
-rw-r--r--src/bookmarks/bookmarksmanager.h2
-rw-r--r--src/mainwindow.cpp4
3 files changed, 34 insertions, 6 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);
diff --git a/src/bookmarks/bookmarksmanager.h b/src/bookmarks/bookmarksmanager.h
index c8264633..7fb02970 100644
--- a/src/bookmarks/bookmarksmanager.h
+++ b/src/bookmarks/bookmarksmanager.h
@@ -115,6 +115,8 @@ public:
*/
virtual void openFolderinTabs(const KBookmarkGroup &bm);
+ virtual QList< QPair<QString, QString> > currentBookmarkList() const;
+
signals:
/**
* This signal is emitted when an url has to be loaded
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index abee13d5..898aa842 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -845,8 +845,8 @@ void MainWindow::highlightAll()
if(m_findBar->highlightAllState() && !m_findBar->isHidden())
{
- if (m_findBar->matchCase())
- options |= QWebPage::FindCaseSensitively;
+ if (m_findBar->matchCase())
+ options |= QWebPage::FindCaseSensitively;
currentTab()->view()->findText(m_lastSearch, options);
}