diff options
author | Mateusz Łukasik <mati75@linuxmint.pl> | 2016-04-08 10:03:05 +0200 |
---|---|---|
committer | Mateusz Łukasik <mati75@linuxmint.pl> | 2016-04-08 10:03:05 +0200 |
commit | 1a2f0c9c1087899a00298db8fa70518d3c1e69f8 (patch) | |
tree | 7efa117e122fbe21eb6a832540007aeeef377fcb /src/prefinput.cpp | |
parent | ba0162e8cb8a12c90ef9775f5a20a6da095a0b35 (diff) |
Imported Upstream version 16.4.0~ds0
Diffstat (limited to 'src/prefinput.cpp')
-rw-r--r-- | src/prefinput.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/prefinput.cpp b/src/prefinput.cpp index 991dc5b..a848aac 100644 --- a/src/prefinput.cpp +++ b/src/prefinput.cpp @@ -153,6 +153,15 @@ void PrefInput::retranslateStrings() { wheel_function_volume->setText( tr("&Volume control") ); wheel_function_speed->setText( tr("&Change speed") ); + int drag_function = drag_function_combo->currentIndex(); + drag_function_combo->clear(); + drag_function_combo->addItem( tr("None"), Preferences::DragDisabled); + drag_function_combo->addItem( tr("Move window"), Preferences::MoveWindow); +#ifdef MOUSE_GESTURES + drag_function_combo->addItem( tr("Seek and volume"), Preferences::Gestures); +#endif + drag_function_combo->setCurrentIndex(drag_function); + #if !USE_SHORTCUTGETTER actioneditor_desc->setText( tr("Here you can change any key shortcut. To do it double click or " @@ -175,6 +184,8 @@ void PrefInput::setData(Preferences * pref) { setWheelFunctionCycle(pref->wheel_function_cycle); setWheelFunctionSeekingReverse(pref->wheel_function_seeking_reverse); delay_left_check->setChecked(pref->delay_left_click); + + setDragFunction(pref->drag_function); } void PrefInput::getData(Preferences * pref) { @@ -190,6 +201,8 @@ void PrefInput::getData(Preferences * pref) { pref->wheel_function_cycle = wheelFunctionCycle(); pref->wheel_function_seeking_reverse = wheelFunctionSeekingReverse(); pref->delay_left_click = delay_left_check->isChecked(); + + pref->drag_function = dragFunction(); } /* @@ -305,6 +318,16 @@ bool PrefInput::wheelFunctionSeekingReverse() { return wheel_function_seeking_reverse_check->isChecked(); } +void PrefInput::setDragFunction(int function) { + int d = drag_function_combo->findData(function); + if (d < 0) d = 0; + drag_function_combo->setCurrentIndex( d ); +} + +int PrefInput::dragFunction() { + return drag_function_combo->itemData(drag_function_combo->currentIndex()).toInt(); +} + void PrefInput::createHelp() { clearHelp(); @@ -341,6 +364,15 @@ void PrefInput::createHelp() { setWhatsThis(wheel_function_combo, tr("Wheel function"), tr("Select the action for the mouse wheel.") ); + setWhatsThis(drag_function_combo, tr("Drag function"), + tr("This option controls what to do when the mouse is moved while pressing the left button.") + "<br>" + + "<b>" + tr("Move window") + "</b>:" + tr("the main window is moved") + "<br>" +#ifdef MOUSE_GESTURES + + "<b>" + tr("Seek and volume") + "</b>:" + + tr("a horizontal movement changes the time position while a vertical movement changes the volume") +#endif + ); + setWhatsThis(delay_left_check, tr("Don't trigger the left click function with a double click"), tr("If this option is enabled when you double click on the " "video area only the double click function will be triggered. " |