Implement wxDirDialog:: and wxFileDialog::Create() in wxGTK.
Simply move the code from non-default constructor to Create(). This allows to create the dialogs using 2-step creation if necessary. Closes #14069. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70898 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -174,13 +174,24 @@ wxFileDialog::wxFileDialog(wxWindow *parent, const wxString& message,
|
||||
const wxSize& sz,
|
||||
const wxString& name)
|
||||
: wxFileDialogBase()
|
||||
{
|
||||
Create(parent, message, defaultDir, defaultFileName, wildCard, style, pos, sz, name);
|
||||
}
|
||||
|
||||
bool wxFileDialog::Create(wxWindow *parent, const wxString& message,
|
||||
const wxString& defaultDir,
|
||||
const wxString& defaultFileName,
|
||||
const wxString& wildCard,
|
||||
long style, const wxPoint& pos,
|
||||
const wxSize& sz,
|
||||
const wxString& name)
|
||||
{
|
||||
parent = GetParentForModalDialog(parent, style);
|
||||
|
||||
if (!wxFileDialogBase::Create(parent, message, defaultDir, defaultFileName,
|
||||
wildCard, style, pos, sz, name))
|
||||
{
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!PreCreation(parent, pos, wxDefaultSize) ||
|
||||
@@ -188,7 +199,7 @@ wxFileDialog::wxFileDialog(wxWindow *parent, const wxString& message,
|
||||
wxDefaultValidator, wxT("filedialog")))
|
||||
{
|
||||
wxFAIL_MSG( wxT("wxFileDialog creation failed") );
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
GtkFileChooserAction gtk_action;
|
||||
@@ -311,6 +322,8 @@ wxFileDialog::wxFileDialog(wxWindow *parent, const wxString& message,
|
||||
G_CALLBACK(gtk_filedialog_update_preview_callback),
|
||||
previewImage);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
wxFileDialog::~wxFileDialog()
|
||||
|
Reference in New Issue
Block a user