-void wxFileDialog::UpdateDialog()
-{
-
- if (wxDirExists(m_path))
- {
- gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(m_widget),
- wxGTK_CONV(m_path));
- }
- else
- {
- gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(m_widget),
- wxGTK_CONV(m_path));
-
- // pre-fill the filename, too:
- if (GetWindowStyle() & wxSAVE)
- {
- gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER(m_widget),
- wxGTK_CONV(m_fileName));
- }
- }
-}
-
-void wxFileDialog::DoSetPath(const wxString& path)
-{
- if (!path.empty())
- {
- wxFileName fn(path);
- fn.MakeAbsolute();
- m_path = fn.GetFullPath();
-
- wxString ext;
- wxSplitPath(path, &m_dir, &m_fileName, &ext);
- if (!ext.empty())
- {
- m_fileName += wxT(".");
- m_fileName += ext;
- }
- }
- else
- {
- m_path = path;
- }
-}
-