Add two profile options for the copy & paste behavior of mouse

* support "automatially copy selected text into clipboard"
  * mouse middle button can be customized to paste from selectio or
    clipboard

The first feature might look like a unnecessary duplicate of the
"synchronize selection and clipboard" feature of Klipper. However, that
klipper feature is generally problematic, while doing it only in Konsole
is generally useful and harmless.

FEATURE: 183490
FIXED-IN: 4.9.0
REVIEW: 103861
DIGEST:
This commit is contained in:
Jekyll Wu
2012-04-25 12:08:40 +08:00
parent 11814cbf94
commit bb818010b4
11 changed files with 341 additions and 141 deletions

View File

@@ -804,9 +804,16 @@ void ViewManager::applyProfileToView(TerminalDisplay* view , const Profile::Ptr
int tripleClickMode = profile->property<int>(Profile::TripleClickMode);
view->setTripleClickMode(Enum::TripleClickModeEnum(tripleClickMode));
view->setAutoCopySelectedText(profile->autoCopySelectedText());
view->setUnderlineLinks(profile->underlineLinksEnabled());
view->setBidiEnabled(profile->bidiRenderingEnabled());
int middleClickPasteMode = profile->property<int>(Profile::MiddleClickPasteMode);
if (middleClickPasteMode == Enum::PasteFromX11Selection)
view->setMiddleClickPasteMode(Enum::PasteFromX11Selection);
else if (middleClickPasteMode == Enum::PasteFromClipboard)
view->setMiddleClickPasteMode(Enum::PasteFromClipboard);
// cursor shape
int cursorShape = profile->property<int>(Profile::CursorShape);