summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2010-08-23 00:19:36 +0200
committerAndrea Diamantini <adjam7@gmail.com>2010-08-23 00:19:36 +0200
commit851011df3b2e59403808e9c0baf83224be12fd18 (patch)
tree087430726fd9a2d5f41febb801cddf6d955dd2c1 /src/mainwindow.cpp
parentMerge commit 'refs/merge-requests/188' of git://gitorious.org/rekonq/mainline (diff)
parentUse the selected text as the default search string of the FindBar (diff)
downloadrekonq-851011df3b2e59403808e9c0baf83224be12fd18.tar.xz
Merge commit 'refs/merge-requests/189' of git://gitorious.org/rekonq/mainline into m189
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 4f9d6dab..44cc6d59 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -365,11 +365,11 @@ void MainWindow::setupActions()
KStandardAction::print(this, SLOT(printRequested()), actionCollection());
KStandardAction::quit(this , SLOT(close()), actionCollection());
- a = KStandardAction::find(m_findBar, SLOT(toggleVisibility()), actionCollection());
+ a = KStandardAction::find(m_findBar, SLOT(show()), actionCollection());
KShortcut findShortcut = KStandardShortcut::find();
findShortcut.setAlternate(Qt::Key_Slash);
a->setShortcut(findShortcut);
- a->setCheckable(true);
+ a->setChecked(m_findBar->isVisible());
connect(m_findBar, SIGNAL(visibilityChanged(bool)), a, SLOT(setChecked(bool)));
KStandardAction::findNext(this, SLOT(findNext()) , actionCollection());
@@ -907,6 +907,15 @@ void MainWindow::setWidgetsVisible(bool makeVisible)
}
+QString MainWindow::selectedText() const
+{
+ if (!currentTab())
+ return QString();
+
+ return currentTab()->view()->selectedText();
+}
+
+
void MainWindow::viewPageSource()
{
if (!currentTab())