reverted, the problem is deeper than that

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30805 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2004-11-28 09:41:36 +00:00
parent e0107cbd45
commit c019209981
2 changed files with 32 additions and 4 deletions

View File

@@ -237,9 +237,23 @@ void wxFileDialog::SetPath(const wxString& path)
wxFileName fn(path); wxFileName fn(path);
m_path = fn.GetFullPath(); m_path = fn.GetFullPath();
m_dir = fn.GetPath();
m_fileName = fn.GetFullName();
SetDirectory(fn.GetPath()); gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(m_widget),
SetFilename(fn.GetFullName()); wxGTK_CONV(m_dir));
gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(m_widget),
wxGTK_CONV(m_path));
// pre-fill the filename when saving, too (there's no text entry
// control when opening a file, so it doesn't make sense to
// do this in when opening files):
if (GetWindowStyle() & wxSAVE)
{
gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER(m_widget),
wxGTK_CONV(m_fileName));
}
} }
void wxFileDialog::SetDirectory(const wxString& dir) void wxFileDialog::SetDirectory(const wxString& dir)

View File

@@ -237,9 +237,23 @@ void wxFileDialog::SetPath(const wxString& path)
wxFileName fn(path); wxFileName fn(path);
m_path = fn.GetFullPath(); m_path = fn.GetFullPath();
m_dir = fn.GetPath();
m_fileName = fn.GetFullName();
SetDirectory(fn.GetPath()); gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(m_widget),
SetFilename(fn.GetFullName()); wxGTK_CONV(m_dir));
gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(m_widget),
wxGTK_CONV(m_path));
// pre-fill the filename when saving, too (there's no text entry
// control when opening a file, so it doesn't make sense to
// do this in when opening files):
if (GetWindowStyle() & wxSAVE)
{
gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER(m_widget),
wxGTK_CONV(m_fileName));
}
} }
void wxFileDialog::SetDirectory(const wxString& dir) void wxFileDialog::SetDirectory(const wxString& dir)