Commit ba1dfb10 authored by Kurt Hindenburg's avatar Kurt Hindenburg

Allow option for triple-click to select from current word to end of line.

FEATURE: 164680

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=1005970
parent 1288f72d
......@@ -975,6 +975,8 @@ void EditProfileDialog::setupAdvancedPage(const Profile::Ptr profile)
SLOT(toggleResizeWindow(bool)) },
{ _ui->enableBlinkingCursorButton , Profile::BlinkingCursorEnabled ,
SLOT(toggleBlinkingCursor(bool)) },
{ _ui->tripleClickMode , Profile::TripleClickMode ,
SLOT(toggleTripleClickMode(bool)) },
{ _ui->enableBidiRenderingButton , Profile::BidiRenderingEnabled ,
SLOT(togglebidiRendering(bool)) },
{ 0 , 0 , 0 }
......@@ -1051,6 +1053,10 @@ void EditProfileDialog::toggleBlinkingCursor(bool enable)
{
_tempProfile->setProperty(Profile::BlinkingCursorEnabled,enable);
}
void EditProfileDialog::toggleTripleClickMode(bool enable)
{
_tempProfile->setProperty(Profile::TripleClickMode,enable);
}
void EditProfileDialog::toggleBlinkingText(bool enable)
{
_tempProfile->setProperty(Profile::BlinkingTextEnabled,enable);
......
......@@ -161,6 +161,7 @@ private slots:
void toggleResizeWindow(bool);
void togglebidiRendering(bool);
void toggleBlinkingCursor(bool);
void toggleTripleClickMode(bool);
void setCursorShape(int);
void autoCursorColor();
......
......@@ -972,6 +972,16 @@
</item>
</layout>
</item>
<item>
<widget class="QCheckBox" name="tripleClickMode" >
<property name="text" >
<string>Triple click selects from current word forward</string>
</property>
<property name="toolTip" >
<string>All characters from the current word to the end of line will be selected.</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
......
......@@ -110,6 +110,7 @@ const Profile::PropertyInfo Profile::DefaultPropertyNames[] =
// Interaction
, { WordCharacters , "WordCharacters" , INTERACTION_GROUP , QVariant::String }
, { TripleClickMode , "TripleClickSelectsFromCursor" , INTERACTION_GROUP , QVariant::Bool }
// Encoding
, { DefaultEncoding , "DefaultEncoding" , ENCODING_GROUP , QVariant::String }
......
......@@ -174,6 +174,10 @@ public:
WordCharacters,
/** (TabBarPositionEnum) Position of the tab-bar relative to the terminal displays. */
TabBarPosition,
/** (bool) If true, the triple click selects from current word onwards. Otherwise
* selects whole line.
*/
TripleClickMode,
/** (String) Default text codec */
DefaultEncoding,
/** (bool) Whether fonts should be aliased or not */
......
......@@ -825,6 +825,9 @@ void ViewManager::applyProfile(TerminalDisplay* view , const Profile::Ptr info,
bool blinkingText = info->property<bool>(Profile::BlinkingTextEnabled);
view->setBlinkingTextEnabled(blinkingText);
bool tripleClickMode = info->property<bool>(Profile::TripleClickMode);
view->setTripleClickMode(tripleClickMode ? TerminalDisplay::SelectForwardsFromCursor : TerminalDisplay::SelectWholeLine);
bool bidiEnabled = info->property<bool>(Profile::BidiRenderingEnabled);
view->setBidiEnabled(bidiEnabled);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment