Opened 7 years ago
Closed 14 months ago
#13721 closed bug (fixed)
BFilePanel with B_DIRECTORY_NODE allows file selection
Reported by: | kallisti5 | Owned by: | nobody |
---|---|---|---|
Priority: | normal | Milestone: | R1/beta5 |
Component: | Kits/Interface Kit | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description (last modified by )
Per the documentation: https://www.haiku-os.org/legacy-docs/bebook/BFilePanel_Overview.html#BFilePanel_Constructing_Fine_Tuning
If the setting includes B_DIRECTORY_NODE and the user selects and Opens (i.e. clicks the Open button) a directory or a symlink to a directory, the directory (or symlink) is delivered to your target. If it doesn't include B_DIRECTORY_NODE and the user Opens a directory (or symlink to a directory), the directory is entered (the contents of the directory are displayed in the file list).
Specifying B_DIRECTORY_NODE only results in a BFilePanel which can:
- Open directories.
- Open files if you double-click them
Given the documentation, one would expect B_DIRECTORY_NODE without B_FILE_NODE to not allow users to select files.
Change History (8)
comment:1 by , 7 years ago
Description: | modified (diff) |
---|
comment:2 by , 7 years ago
Description: | modified (diff) |
---|
comment:3 by , 7 years ago
Example usage:
folderPanel = new BFilePanel(B_OPEN_PANEL, NULL, NULL, B_DIRECTORY_NODE); folderPanel->Show();
comment:5 by , 7 years ago
Doesn't appear so. That seems more related to the enabled/disable state of the button. In my tests, the button remains enabled when selecting files, but doesn't do anything on files. (Which seems correct
)
follow-up: 7 comment:6 by , 20 months ago
I suspect there was no progress with this issue. I have upvoted it anyway, the current behaviour is not correct in the sense that a double click on a file in B_DIRECTORY_NODE flavour should not trigger a B_REFS_RECEIVED, at all.
comment:7 by , 20 months ago
Replying to Nexus-6:
I suspect there was no progress with this issue. I have upvoted it anyway, the current behaviour is not correct in the sense that a double click on a file in B_DIRECTORY_NODE flavour should not trigger a B_REFS_RECEIVED, at all.
Obviously not a real solution but it is pretty easy to create a RefFilter to workaround this problem. I've done this for Beezer and a few other apps.
comment:8 by , 14 months ago
Milestone: | Unscheduled → R1/beta5 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Fixed in hrev57294.
EDIT: Clarified description. This only occurs if you "double click" files in the BFilePane to select them. Clicking OK blocks your attempt to open.
I feel like the correct solution would be to just hide non-directories when B_DIRECTORY_NODE is the setting.