[wx-dev] Re: Fityk GSoC project (wxFileCtrl/custom wxFileDialog)
Vadim Zeitlin
vadim at wxwindows.org
Tue May 8 14:04:14 PDT 2007
On Tue, 08 May 2007 23:50:10 +0300 Diaa Sami <diaasami at gmail.com> wrote:
DS> but what if the user specifies filters and didn't specify SHOW_FILTERS?
DS> on wxGTK, the filter list will be displayed and on the generic
DS> implementation it won't. IMO this is acceptable but it should be
DS> mentioned in the docs.
IMHO if the user does specify the filters, they should be used, even if
SHOW_FILTERS was not given. In fact I wonder why do we need SHOW_FILTERS at
all, it would make more sense to me to only show them if they were
specified and use the "all files" filter ("*" or "*.*") by default.
DS> >> wxFD_OVERWRITE_PROMPT: For save dialog only: prompt for a confirmation
DS> >> if a file will be overwritten.
DS> >
DS> > But how it works for ctrl? (OK button is outside of ctrl). How it
DS> > works in GtkFileChooserWidget?
DS>
DS> GtkFileChooserWidget generates 'file-activated' events when files are
DS> double-clicked, a confirmation dialog could be shown automatically when
DS> this even is fired.
DS>
DS> note: when I tried I couldn't get it to work, but this may be my fault.
It wouldn't be a good idea to show the warning when the file is just
selected though. So maybe we need to have some GetFinallyChosenFilename()
or something like this (I assume GetFilename() itself could be called
before the "Ok" button is clicked too). But IMHO this is getting too
complicated and it would be simpler to just drop support for this style in
wxFileCtrl -- it really corresponds more to something that should be done
at dialog level.
DS> >> wxFD_FILE_MUST_EXIST: For open dialog only: the user may only select
DS> >> files that actually exist.
DS> >
DS> > you wrote that it makes no sense for ctrl
DS>
DS> May be this flag should be kept, but marked as Windows-only as some
DS> other flags in wxWidgets.
The problem seems to be the same as with wxFD_OVERWRITE_PROMPT above, i.e.
when do you do the check?
Regards,
VZ
More information about the wx-dev
mailing list