D7647: Two clicks on file/folder to rename

Kåre Särs noreply at phabricator.kde.org
Sat Oct 21 23:47:23 BST 2017


sars added a comment.


  Hi,
  
  I just tried the patch and I don't think the cancellation works as intended. The cancellation only works for double-click or selection change during the double-click period. The focus lost-abort triggers abortTwoClicksRenaming() before the second click. That means that changing focus window does not cancel the rename.
  
  I have an addition to this patch that adds an other QTimer that is started in slotSelectionChanged() and checked/started in slotSelectedItemTextPressed(). If the timer is not running/active when slotSelectedItemTextPressed() is executed, the renaming is not started but the timer is tarted for the next try.
  
  This removes a _lot_ of mistakenly started renames, but does make it a bit harder to trigger the rename. I set the time to 3xDCT for now.
  
  (How) do you want me to provide the update?

INLINE COMMENTS

> dolphinview.cpp:1166
> +    if ((currentCount == 1 && current.first() != m_twoClicksRenamingItemIndex) || currentCount > 1) {
> +        abortTwoClicksRenaming();
> +    }

This aborts the rename only during the double-click delay timeout and not if we select the item, focus another window and then click the item again.

REPOSITORY
  R318 Dolphin

REVISION DETAIL
  https://phabricator.kde.org/D7647

To: akrutzler, #dolphin, #kde_applications, elvisangelaccio, emmanuelp, ngraham, markg, rkflx
Cc: rkflx, markg, funkybomber, sars, elvisangelaccio, ngraham
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20171021/deaab854/attachment.htm>


More information about the kfm-devel mailing list