X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/035b704a464852c4d6ce297f20a90551c08d3a4c..0f217db31814dde7432ceb2e00ddf42b968b9fa3:/src/gtk1/filedlg.cpp diff --git a/src/gtk1/filedlg.cpp b/src/gtk1/filedlg.cpp index 8f7b97ed89..4589f3de1a 100644 --- a/src/gtk1/filedlg.cpp +++ b/src/gtk1/filedlg.cpp @@ -51,7 +51,7 @@ wxFileDialog::wxFileDialog(wxWindow *parent, const wxString& message, { m_needParent = FALSE; - PreCreation( parent, -1, pos, wxDefaultSize, style, "filedialog" ); + PreCreation( parent, -1, pos, wxDefaultSize, style | wxDIALOG_MODAL, "filedialog" ); m_message = message; m_path = ""; m_fileName = defaultFileName; @@ -65,7 +65,7 @@ wxFileDialog::wxFileDialog(wxWindow *parent, const wxString& message, GtkFileSelection *sel = GTK_FILE_SELECTION(m_widget); m_path.Append(m_dir); - if(m_path.Last()!='/') m_path.Append('/'); + if(! m_path.IsEmpty() && m_path.Last()!='/') m_path.Append('/'); m_path.Append(m_fileName); if(m_path.Length()>1) gtk_file_selection_set_filename(sel,m_path);