Opened 7 years ago

Closed 20 months ago

#8572 closed defect (fixed)

Reinstate wxDIRCTRL_SHOW_FILTERS flag

Reported by: wojdyr Owned by:
Priority: low Milestone: 2.9.5
Component: GUI-generic Version: stable-latest
Keywords: wxGenericDirCtrl Cc: wojdyr, troelsk@…
Blocked By: Blocking:
Patch: yes

Description

It was discussed on wx-dev, that wxDIRCTRL_SHOW_FILTERS flag can be removed. I left the flag for compatibility, but it is unused now.
The only case when the new behaviour is not compatibile with the previous version is when wxDIRCTRL_SHOW_FILTERS is _not_ specified, but given filter is not empty. In this case filters will be shown now.

Attachments (2)

dd-filter.diff download (6.6 KB) - added by wojdyr 7 years ago.
revert.patch download (4.3 KB) - added by troelsk 21 months ago.
Revert

Download all attachments as: .zip

Change History (15)

Changed 7 years ago by wojdyr

comment:1 Changed 7 years ago by vadz

I've applied the patch to HEAD, thanks. I've changed it slightly to avoid the addition of m_filterStyle member variable: instead I've moved the style detection to wxDirFilterListCtrl itself.

comment:2 Changed 7 years ago by vadz

Oops, forgot to close it.

comment:3 Changed 21 months ago by troelsk

  • Keywords wxGenericDirCtrl added
  • Status changed from closed to reopened
  • Summary changed from removed wxDIRCTRL_SHOW_FILTERS flag to Reinstate wxDIRCTRL_SHOW_FILTERS flag
  • Type set to build error
  • Version set to 2.9-svn

Where is the discussion, why is this flag removed?
Because, it generally makes no sense with this combobox below the file/folder view, a combobox which may have only == one single == item in it, eg "All Files(*.*)"; a combobox with only one item is rather bad UI, please allow the flags to hide the combobox back.

comment:4 Changed 21 months ago by troelsk

  • Type changed from build error to enhancement

comment:5 Changed 21 months ago by vadz

  • Cc vadz removed
  • Priority changed from normal to low

I don't remember what happened 6 years ago but I think the idea was that you wouldn't use filters at all if you don't actually use them, i.e. use just "All files" one. Is there any problem with doing this?

comment:6 Changed 21 months ago by troelsk

The issue is clearly seen in the widgets sample. In the sample, using dirctrl:
If you want to see files too, not only folders, you click "All files". And get a useless one-item combobox. This combobox may be acceptable in a sample but is no good in a user app.

comment:7 Changed 21 months ago by vadz

But if you just don't configure filters at all, wouldn't it go away? I.e. isn't it just a bug in the sample?

comment:8 Changed 21 months ago by troelsk

  • Type changed from enhancement to defect

No, I get it also in my user app, and see no way of getting rid of it. The very same app compiled against wx28 displays no combobox (unless wxDIRCTRL_SHOW_FILTERS is specified).

Changed 21 months ago by troelsk

Revert

comment:9 Changed 21 months ago by troelsk

  • Cc troelsk@… added

Added patch

comment:10 Changed 21 months ago by troelsk

  • Priority changed from low to lowest

Never mind. Clearing the filter put there by DialogBlocks ("All *.*") made the combobox go away. Not sure about the wisdom in removing the flag though (and was unable to find the wxdev thread with the reasoning)

comment:11 Changed 21 months ago by vadz

  • Milestone set to 2.9.5
  • Priority changed from lowest to low

What do the other think, should we restore wxDIRCTRL_SHOW_FILTERS or not? Does anybody else think it would be useful to have it? When in doubt, I'd probably prefer to restore it to avoid breaking compatibility.

comment:12 Changed 21 months ago by ericj

In general i think it's better to have more control than less.

+1 to restore from me.

comment:13 Changed 20 months ago by VZ

  • Resolution set to fixed
  • Status changed from reopened to closed

(In [73621]) Restore wxDIRCTRL_SHOW_FILTERS flag of wxDirCtrl.

Closes #8572.

Note: See TracTickets for help on using tickets.