New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When using Move to.../Copy to... set the 3rd pane object to the parent directory of the file to be moved/copied #665
Conversation
…t directory of the file to be moved/copied
By the way, I love this change. I always saw the weirdest folders pop up in the third pane. |
If I try to move something out of
Also, did you notice if you set a breakpoint in this method, it gets run twice? Completely unrelated to this pull request, but it sounds like a good opportunity for a speed-up somewhere. |
:) I like how you're improving on this! I'll make the changes when I get home. (OK, I'm now home and making the changes. Completely forgot about this - work was too fun! :P)
I've seen that in hundreds and hundred of places with Quicksilver. If we can stop it, then Quicksilver will definitely be much, much faster! |
This commit: * Obtains the list of objects more cleanly (using mutableCopy) * Ensures a new file object for the folder isn't created if it already exists * Performs a more robust check for bundles (using NSWorkspace's `isFilePackageAtPath`) * Creates one instance of NSFileManager as opposed to thousands (for each run of the for loop) Thanks to @skurfer for tips
Take a look and see what you think :) P.S. - you may have just omitted it in your line note, but a |
Yeah, but usually something runs 3 times (once per pane, I assume) or some multiple of 3. Probably pretty tricky to find and fix those. But this is twice, which makes me think it’s probably just a silly mistake somewhere. As for how the folder object gets created, I looked at |
Yeah looking at |
FWIW: I still saw the 'semi' transparent problem with your fix, but it was pretty random. Removing your (redundant) check makes no difference for me. And... the 'running twice' business is: The method is run however many times you type a letter. e.g. if you type 'm' for 'Move To...' the method is run once. |
This is already done in `fileObjectWithPath
searchArray is an NSMutableArray, yet these methods refer to NSArrays. Code has been checked for all occurrences of `setSearchArray` and they all set an NSMutableArray
Ah, this could be a result of having the “Wait before searching” preferences set to 0.0. I’ll bet if I up that, the method will only have to run once. |
Hopefully fixes quicksilver#630
OK you have many, many commits to look at now! I thought this was going to be an easy one... So the fix for the 'running twice' part was to check the actual objects as opposed to the ranked objects (which obviously aren't the same as you alter your search) The commits also:
|
1 similar comment
OK you have many, many commits to look at now! I thought this was going to be an easy one... So the fix for the 'running twice' part was to check the actual objects as opposed to the ranked objects (which obviously aren't the same as you alter your search) The commits also:
|
Increasing the time before searching did fix the double call, but your fix is still necessary because as I type, the action isn’t changing and so there should be no need to re-validate. Good catch.
Maybe this is pre-mature optimization, but it doesn’t need to be mutable, right? There doesn’t seem to be an |
Great! I got 'Scripts archive iPhoto' in pane 3. On relaunch it became 'Public', and now it's 'Example materials and photos'… |
I guess not, but is it worth us changing it? I think it may be a bit premature considering the optimisation gains would be minimal, but the consequences if anything every does try to alter the array would be catastrophic. |
Nah, leave it. |
Is there anything more that needs to be done on this? I know the changes here grew to a bit more than just the move to.../copy to... action, so I guess it might take a bit more time to test. |
No, I’ll probably merge this and a couple of your others this afternoon. |
Cool, thanks :) On 31 January 2012 18:25, Rob McBroom <
|
When using Move to.../Copy to... set the 3rd pane object to the parent directory of the file to be moved/copied
Does exactly what it says on the tin.
Short of a better place to start, I think the 'current' folder is typically quite near where you want to move things to. I found myself doing this a lot lately, so thought I'd implement it.
It's certainly better than a completely random folder