diff options
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r-- | src/mainwindow.cpp | 13 |
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()) |