Add GUI support for selecting files to collect/upload#238
Open
raverburg wants to merge 4 commits intofox-it:mainfrom
Open
Add GUI support for selecting files to collect/upload#238raverburg wants to merge 4 commits intofox-it:mainfrom
raverburg wants to merge 4 commits intofox-it:mainfrom
Conversation
Miauwkeru
requested changes
Sep 16, 2025
| def choose_folder(self) -> None: | ||
| if self._closed: | ||
| return | ||
|
|
Contributor
There was a problem hiding this comment.
I noticed there is empty space here, most of the style/lint issues can be fixed by running tox run -e fix and then you can check it with tox run -e lint
Comment on lines
+537
to
540
| self.choose_files() | ||
| elif lParam == self.start_button: | ||
| user32.EnableWindow(self.start_button, False) | ||
| user32.EnableWindow(self.choose_folder_button, False) |
Contributor
There was a problem hiding this comment.
Suggested change
| self.choose_files() | |
| elif lParam == self.start_button: | |
| user32.EnableWindow(self.start_button, False) | |
| user32.EnableWindow(self.choose_folder_button, False) | |
| self.choose_files() | |
| elif lParam == self.start_button: | |
| user32.EnableWindow(self.start_button, False) | |
| user32.EnableWindow(self.choose_folder_button, False) | |
| user32.EnableWindow(self.choose_files_button, False) |
| user32.SetWindowTextA(self.choose_files_button, b"Clear file(s)") | ||
| user32.EnableWindow(self.start_button, True) | ||
| else: | ||
| print("User cancelled file selection") |
Contributor
There was a problem hiding this comment.
Technically it could also be because the filename(s) exceeded the 4096 wchar buffer. Is there a way to distinguish between those errors? And then, show it to the user if it isn't a cancelled operation?
| ("lStructSize", w.DWORD), | ||
| ("hwndOwner", w.HWND), | ||
| ("hInstance", w.HINSTANCE), | ||
| ("lpstrFilter", w.LPWSTR), |
Contributor
There was a problem hiding this comment.
Suggested change
| ("lpstrFilter", w.LPWSTR), | |
| ("lpstrFilter", w.LPCWSTR), |
| ("lpstrDefExt", w.LPWSTR), | ||
| ("lCustData", w.LPARAM), | ||
| ("lpfnHook", w.LPVOID), | ||
| ("lpTemplateName", w.LPWSTR), |
Contributor
There was a problem hiding this comment.
Suggested change
| ("lpTemplateName", w.LPWSTR), | |
| ("lpTemplateName", w.LPCSTR), |
Comment on lines
+162
to
+163
| ("lpstrInitialDir", w.LPWSTR), | ||
| ("lpstrTitle", w.LPWSTR), |
Contributor
There was a problem hiding this comment.
Suggested change
| ("lpstrInitialDir", w.LPWSTR), | |
| ("lpstrTitle", w.LPWSTR), | |
| ("lpstrInitialDir", w.LPCWSTR), | |
| ("lpstrTitle", w.LPCWSTR), |
| get_last_error, | ||
| sizeof, | ||
| string_at, | ||
| wstring_at |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This update adds functionality to the GUI that allows users to select specific files for collection and/or upload. Selected files are passed to the existing logic used by acquire, allowing users to either collect them during acquisition or upload them independently.
Notes:
We use a custom version of acquire internally that looks for a config.json file in the same directory instead of using config.py