-
Notifications
You must be signed in to change notification settings - Fork 609
Implement file_chooser for Windows #651
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
Implement file_chooser for Windows #651
Conversation
|
||
// Sets the filter for allowed file types to select. | ||
void SetAllowedExtensions(const EncodableList &extensions) { | ||
const std::wstring name_delimiter = L", "; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to have a comment explaining what the final structure looks like.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
} | ||
} | ||
|
||
// Attempts to set the default folder for the dialog to |path|, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we using ///
for documentation comments?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We haven't been, and it's not a standard Google C++ style guide style.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I've seen it in the engine's headers so maybe I got confused from there.
filter += file_wildcard + extension; | ||
} | ||
// TODO: Make a meaningful filterspec array instead of one mega-filter. | ||
// See issue #650. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which issue is this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#650 ? I'm not sure what you're asking exactly since the issue number is in the comment...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lol I was looking for 650 in the engine's repo and just didn't make any sense 😕
EncodableValue Show(HWND parent_window) { | ||
assert(dialog_); | ||
last_result_ = dialog_->Show(parent_window); | ||
last_result_ == HRESULT_FROM_WIN32(ERROR_CANCELLED); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does this line do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tells us that either we need better warning settings, or I wasn't watching the warnings list :) It's cruft from some restructuring when I realized I didn't need a different codepath for cancelled here that used to be a condition. I'm not sure how I accidentally made it into a statement.
Removed.
after adding the plugin to project, is there any special configuration to make it work on windows ?
|
I'm not aware of any such requirements, which is why this PR doesn't update the README. |
Part of #105