mirror of
https://github.com/KDE/konsole.git
synced 2026-06-12 16:05:45 -04:00
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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user