mirror of
https://github.com/KDE/konsole.git
synced 2026-05-19 03:57:43 -04:00
Enable copy action only when some text are selected.
FEATURE: 203768 FIXED-IN: 4.8
This commit is contained in:
@@ -92,6 +92,8 @@ ScreenWindow* Emulation::createWindow()
|
||||
|
||||
connect(window , SIGNAL(selectionChanged()),
|
||||
this , SLOT(bufferedUpdate()));
|
||||
connect(window, SIGNAL(selectionChanged()),
|
||||
this, SLOT(checkSelectedText()));
|
||||
|
||||
connect(this , SIGNAL(outputChanged()),
|
||||
window , SLOT(notifyOutputChanged()) );
|
||||
@@ -104,6 +106,12 @@ void Emulation::checkScreenInUse()
|
||||
emit primaryScreenInUse( _currentScreen == _screen[0] );
|
||||
}
|
||||
|
||||
void Emulation::checkSelectedText()
|
||||
{
|
||||
QString text = _currentScreen->selectedText(true);
|
||||
emit selectedText(text);
|
||||
}
|
||||
|
||||
Emulation::~Emulation()
|
||||
{
|
||||
QListIterator<ScreenWindow*> windowIter(_windows);
|
||||
@@ -129,6 +137,7 @@ void Emulation::setScreen(int n)
|
||||
window->setScreen(_currentScreen);
|
||||
|
||||
checkScreenInUse();
|
||||
checkSelectedText();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user