binaryninja-api icon indicating copy to clipboard operation
binaryninja-api copied to clipboard

Form file fields do not utilize the project file picker

Open emesare opened this issue 8 months ago • 1 comments

If you try and create a form with a field such as SaveFileNameField in a project, you will notice that the file picker just uses the regular file picker instead of letting you create a file in the project.

I would attach a video but every time I try and open the file dialog it takes me to a sensitive directory and I am not about to figure out how to blur a video on mac.

https://github.com/Vector35/binaryninja-api/blob/2e74d0a19579c8f5dee38c5b8a7660549746146b/ui/forminputdialog.h#L23-L25

Relevant functions are listed above.

Continuation of https://github.com/Vector35/binaryninja-api/issues/5977

emesare avatar Jun 12 '25 04:06 emesare

Adding to the Helion milestone, WARP uses this for the loading/creating of files.

emesare avatar Jun 17 '25 19:06 emesare

Problem: File and Directory selection was inconsistent with file operations, using basic Qt dialogs instead of the project-aware ProjectFilePicker interface.

FormatInputDialog lives in ui/shared (shared library) while MainWindow and ProjectFilePicker are in the main executable. Shared library cannot directly access executable components due to dependency constraints.

I have implemented multiple callbacks to support ProjectFilePicker interface while maintaining library separation. But I have not tested it and need to double check if openFileName, saveFileName, and directoryName in forminputdialog.h will cause other files that depend on them have any potential issues.

Here are screenshots after the callback implemented and it would be greatly appreciated if anyone can confirm it's the right interface output.

Image Image Image

hongyu-dev avatar Jun 25 '25 03:06 hongyu-dev

The output looks to be correct from the given screenshots 👍

emesare avatar Jun 25 '25 12:06 emesare

@emesare has finished the issue. See https://github.com/Vector35/binaryninja/commit/e734a4fce763f938e942170c2d3c6ba499506431. Thank you!

hongyu-dev avatar Jul 02 '25 14:07 hongyu-dev