All 'select line' for use with shortcut

Select entire line from a shortcut.

Patch by Christian Couder chriscool@tuxfamily.org

BUG: 327395
FIXED-IN: 2.13
(cherry picked from commit 7cf548bea8)
This commit is contained in:
Kurt Hindenburg
2014-02-12 14:22:35 -05:00
parent 801d4d4b8c
commit 0f84f38c0a
4 changed files with 20 additions and 0 deletions

View File

@@ -368,11 +368,13 @@ void SessionController::setupPrimaryScreenSpecificActions(bool use)
QAction* clearAction = collection->action("clear-history");
QAction* resetAction = collection->action("clear-history-and-reset");
QAction* selectAllAction = collection->action("select-all");
QAction* selectLineAction = collection->action("select-line");
// these actions are meaningful only when primary screen is used.
clearAction->setEnabled(use);
resetAction->setEnabled(use);
selectAllAction->setEnabled(use);
selectLineAction->setEnabled(use);
}
void SessionController::selectionChanged(const QString& selectedText)
@@ -601,6 +603,9 @@ void SessionController::setupCommonActions()
action->setText(i18n("&Select All"));
action->setIcon(KIcon("edit-select-all"));
action = collection->addAction("select-line", this, SLOT(selectLine()));
action->setText(i18n("Select &Line"));
action = KStandardAction::saveAs(this, SLOT(saveHistory()), collection);
action->setText(i18n("Save Output &As..."));
@@ -954,6 +959,10 @@ void SessionController::selectAll()
screenWindow->setSelectionByLineRange(0, _session->emulation()->lineCount());
_view->copyToX11Selection();
}
void SessionController::selectLine()
{
_view->selectCurrentLine();
}
static const KXmlGuiWindow* findWindow(const QObject* object)
{
// Walk up the QObject hierarchy to find a KXmlGuiWindow.