#include "wx/tokenzr.h" // wxStringTokenizer
#include "wx/filefn.h" // ::wxGetCwd
-//-----------------------------------------------------------------------------
-// idle system
-//-----------------------------------------------------------------------------
-
-extern void wxapp_install_idle_handler();
-
//-----------------------------------------------------------------------------
// "clicked" for OK-button
//-----------------------------------------------------------------------------
gint response,
wxFileDialog *dialog)
{
- wxapp_install_idle_handler();
-
if (response == GTK_RESPONSE_ACCEPT)
gtk_filedialog_ok_callback(w, dialog);
else // GTK_RESPONSE_CANCEL or GTK_RESPONSE_NONE
return;
}
- m_needParent = false;
+ parent = GetParentForModalDialog(parent);
if (!PreCreation(parent, pos, wxDefaultSize) ||
!CreateBase(parent, wxID_ANY, pos, wxDefaultSize, style,
fn.Assign(defaultFileName);
else if ( !defaultFileName.empty() )
fn.Assign(defaultDir, defaultFileName);
+ else
+ fn.AssignDir(defaultDir);
// set the initial file name and/or directory
- wxString fname = fn.GetFullName();
- if ( fname.empty() )
+ const wxString dir = fn.GetPath();
+ if ( !dir.empty() )
{
- wxString dir = fn.GetPath();
- if ( !dir.empty() )
- {
- gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(m_widget),
- dir.fn_str());
- }
+ gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(m_widget),
+ dir.fn_str());
}
+ const wxString fname = fn.GetFullName();
if ( style & wxFD_SAVE )
{
if ( !fname.empty() )