Closed ColdHeat closed 9 years ago
Yeah, that's been on the desired feature list for a while. My workaround in the meantime is to ⌘-o / ⌃-o and then just drop onto the file picker. It's an extra keystroke, but not too much work.
So I looked into doing this (AKA, cribbed off of @D0ntPanic and the C++ implementation) and it turns out there's a bug in QT 4.8 that blocks us on OS X: https://bugreports.qt.io/browse/QTBUG-40449
Unfortunately, the version of pyside we're using isn't compatible with QT 5.4
I guess we could add OS detection and disable the feature on OS X, but that's kinda annoying. If anyone wants to look into this more, here's a start:
https://gist.github.com/psifertex/a06b260e010c54b623bf
(note that open_file_name
is unimplemented but should be obvious from def open
what it should be)
How do you feel about requiring PyObjC on OSX?
Despite the bug you can directly call into Foundation to get the right path. I'm trying to get the right call through ctypes but it's not fun.
Yeah, I looked in to that, but It's a pretty big dependency. brew install pyobjc
took about 20 minutes to build. If you can do it through ctypes I'd /much/ prefer that.
I'll keep working on it although instead of building you can do something like:
import sys
sys.path.append('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC')
import Foundation
Hmm, it's in a default install? That might be doable.
Thanks for pointing out it was already installed, Tested as working on Windows and OS X, if someone can check linux that'd be helpful.
Works on Linux :+1:
Dragging files onto different windows/tabs to open them would be a very welcome addition to Binja.