msg.Printf(
_("File '%s' already exists, do you really want to overwrite it?"),
- wxString(filename, *wxConvFileName));
+ wxString::FromUTF8(filename));
wxMessageDialog dlg(dialog, msg, _("Confirm"),
wxYES_NO | wxICON_QUESTION);
const wxString& name)
: wxFileDialogBase()
{
- parent = GetParentForModalDialog(parent);
+ parent = GetParentForModalDialog(parent, style);
if (!wxFileDialogBase::Create(parent, message, defaultDir, defaultFileName,
wildCard, style, pos, sz, name))
void wxFileDialog::SetPath(const wxString& path)
{
- wxCHECK_RET(wxIsAbsolutePath(path), " wxFileDialog::SetPath requires an absolute filepath");
- m_fc.SetPath( path );
+ // we need an absolute path for GTK native chooser so ensure that we have
+ // it
+ wxFileName fn(path);
+ fn.MakeAbsolute();
+ m_fc.SetPath(fn.GetFullPath());
}
void wxFileDialog::SetDirectory(const wxString& dir)
void wxFileDialog::SetWildcard(const wxString& wildCard)
{
- m_fc.SetWildcard( wildCard );
+ wxFileDialogBase::SetWildcard(wildCard);
+ m_fc.SetWildcard( GetWildcard() );
}
void wxFileDialog::SetFilterIndex(int filterIndex)
{
-
m_fc.SetFilterIndex( filterIndex);
}