D7647: Two clicks on file/folder to rename
Andreas Krutzler
noreply at phabricator.kde.org
Sun Oct 15 18:34:26 BST 2017
akrutzler added inline comments.
INLINE COMMENTS
> rkflx wrote in dolphinview.cpp:198
> You got what I meant . And I get what you meant regarding the initial activation (my observation was slightly misleading, so I will adapt my suggestion).
>
> There are two cases:
>
> - Item not activated, first click activates and second click (after DCI has implicitly passed) starts renaming: Set interval to 0. (This should also get rid of the annoying delay after the second click. In my testing, this did not impact the DCI of the initial click.)
> - Item already activated: Now we have to wait for at least the DCI. (If less than DCI, "open" was meant.)
>
> To distinguish between both cases, you'll probably need a second timer to wait some amount of time. Maybe something between 1 and 10 seconds (whatever "feels" right), but ideally calculated proportional to the DCI.
>
> Note: I only thought about the double clicking case so far. You should probably also consider how this works together with selecting multiple items and the other cancellation reasons.
I think we should not make that too complicated. I just set the interval from 800ms to the DCI and it works fine for me. Now it always waits the DCI and if no cancellation happened, inline renaming starts. But I have to wait in both of your 2 cases for the DCI.
> markg wrote in dolphinview.cpp:103
> "Most certainly not!" was for the suggestion of initializing the member in the header, the comment from @elvisangelaccio
It think we should stay with the init like in m_selectionChangedTimer to stay consistent. With the next major we could change that kind of stuff.
> elvisangelaccio wrote in dolphinview.cpp:649
> I see, then there should be a comment explaining this logic.
>
> Btw which signals have you tried? What about `KItemListSelectionManager::selectionChanged`?
I found an rather easy solution to solve this problem by aborting twoClicksRenaming in the corresponding slot DolphinView::slotSelectionChanged. (I don't know why I didn't came up with that solution from the beginning).
With that, the DolphinView::renameSelectedItems stays unaffected.
REPOSITORY
R318 Dolphin
REVISION DETAIL
https://phabricator.kde.org/D7647
To: akrutzler, #dolphin, #kde_applications, elvisangelaccio, emmanuelp, ngraham, markg
Cc: rkflx, markg, funkybomber, sars, elvisangelaccio, ngraham, #konqueror
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20171015/a55830ec/attachment.htm>
More information about the kfm-devel
mailing list