-
Notifications
You must be signed in to change notification settings - Fork 618
Update "File > Open Folder..." dialog with Windows' Open File dialog in pick folders mode. #247
Conversation
FYI... no hurt feelings if y'all decide not to take this change. I did it mostly to see if it'd fix the aforementioned 'brackets-app' issue. The new dialog drops in quite nicely and gives a more full-featured dialog with a UI that's more consistent with the Mac implementation. However, since it doesn't solve Peter's original issue, I'm not sure it's a must-have change. If y'all prefer to leave the current implementation, we can just close this pull request. |
@bchintx Brackets supports Windows XP too, so we'd have to keep the old code as a fallback codepath depending on OS version. |
@bchintx This is definitely better. As @peterflynn said, we still have to support WinXP, but eventually we want to use the new dialog. Can you add a conditional to check to WinXP and use the old dialog, otherwise use the new dialog? That way your code won't get lost and we jus need to remove the old code when we drop support for WinXP. |
Great observation, @peterflynn, and suggestion @redmunds. I've added a check to call the old, folder select dialog if the current OS is pre-Vista (eg. XP) or the new, IFileFolder dialog if the current OS is Vista or later. |
FYI- I noticed that this code change also addresses this Trello card, currently on the Icebox: |
Please remove this line of code in appshell_extensions_win.cpp line 418:
|
@bchintx I saw this comment you made above:
This seems to behave the same as Sprint 24. Are you aware of the |
@peterflynn Can you confirm that this works correctly on WinXP? |
@redmunds Yes, I use that script to set the index.html. With that location fixed, the fact that the Open File dialog opens to a different location doesn't really matter anymore. Still, I just wanted to mention it as the only other change in behavior that I could find. |
Thanks, Brian! Merging. |
Update "File > Open Folder..." dialog with Windows' Open File dialog in pick folders mode.
Update "File > Open Folder..." dialog with Windows' Open File dialog in pick folders mode.
While investigating 'brackets' issue adobe/brackets#889, which was opened in lieu of 'brackets-app' issue adobe/brackets-app#120, I noticed that (in the latter issue's discussion) NJ suggested looking at newer implementations of the Windows common file dialogs to solve the double-click issue. Unfortunately, it appears that dbl-click, even in the newer implementation, is still not the Microsoft-supported/recommended way of selecting and confirming the dialog. However, here's code to update the dialog, in case we're interested.
This Pull Request replaces the code implementing Brackets' feature "File > Open Folder..." currently using SHBrowseForFolder() with the MSDN-recommended implementation using IFileDialog + FOS_PICFOLDERS.
More specifically, as suggested by MSDN (http://msdn.microsoft.com/en-us/library/windows/desktop/bb762115%28v=vs.85%29.aspx), for Vista and later OSes, apps should use the newer Open File dialog in pick folders mode.
The only "downside" to pulling this new code (so far as I can tell) is that the selected folder is remembered for the next time that the dialog appears, which might interfere with the "Please select the Brackets index.html file" dialog in development builds.