Commit 9574fbb6 authored by Nate Graham's avatar Nate Graham
Browse files

[folder view] Allow disabling click-to-rename when using double-click

a911982e added a "Click on the label to
initiate renaming when using double-click" feature, mimicking the one
that Dolphin has. However Dolphin also has an option to turn it off,
while Folder View thus far does not.

This commit implements a simple setting to turn it off, placed in the
same place in Folder View's config window as the equivalent Dolphin
option. Ths option is not visible and has no effect when using the
default single-click mode.

BUG: 434827
FIXED-IN: 5.22
parent 5ac5cf99
......@@ -82,6 +82,10 @@
<label>Whether to show selection markers when hovering Folder View icons.</label>
<default>true</default>
</entry>
<entry name="renameInline" type="Bool">
<label>Whether to initiate inline renaming when clicking on the text of an already-selected item, while using the systemwide double-click mode.</label>
<default>true</default>
</entry>
<entry name="popups" type="Bool">
<label>Whether to show a popup preview window for Folder View icons for folders.</label>
<default>true</default>
......
......@@ -48,6 +48,7 @@ Item {
property alias cfg_sortDirsFirst: sortDirsFirst.checked
property alias cfg_toolTips: toolTips.checked
property alias cfg_selectionMarkers: selectionMarkers.checked
property alias cfg_renameInline: renameInline.checked
property alias cfg_popups: popups.checked
property alias cfg_previews: previews.checked
property alias cfg_previewPlugins: previewPluginsDialog.previewPlugins
......@@ -302,6 +303,13 @@ Item {
text: i18n("Selection markers")
}
CheckBox {
id: renameInline
visible: !selectionMarkers.visible
text: i18n("Rename inline by clicking selected item's text")
}
CheckBox {
id: popups
visible: !isPopup
......
......@@ -417,6 +417,7 @@ FocusScope {
&& previouslySelectedItemIndex == gridView.currentIndex
&& gridView.currentIndex != -1
&& !Qt.styleHints.singleClickActivation
&& plasmoid.configuration.renameInline
&& !doubleClickInProgress
) {
rename();
......
Supports Markdown
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