X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/53daeadab733c0458a7541efe48c3f86a5444692..236a9de39afa090fdee3cf91cb5364ceca69e3f8:/src/gtk/filedlg.cpp?ds=sidebyside diff --git a/src/gtk/filedlg.cpp b/src/gtk/filedlg.cpp index 086a593ef5..558746b221 100644 --- a/src/gtk/filedlg.cpp +++ b/src/gtk/filedlg.cpp @@ -16,7 +16,11 @@ #include "wx/intl.h" #include "wx/generic/msgdlgg.h" -#include "gtk/gtk.h" + +#ifdef __VMS__ +#define gtk_file_selection_hide_fileop_buttons gtk_file_selection_hide_fileop_ +#endif +#include //----------------------------------------------------------------------------- // idle system @@ -116,9 +120,15 @@ wxFileDialog::wxFileDialog( wxWindow *parent, const wxString& message, { m_needParent = FALSE; - PreCreation( parent, -1, pos, wxDefaultSize, style | wxDIALOG_MODAL, "filedialog" ); + if (!PreCreation( parent, pos, wxDefaultSize ) || + !CreateBase( parent, -1, pos, wxDefaultSize, style | wxDIALOG_MODAL, wxDefaultValidator, wxT("filedialog") )) + { + wxFAIL_MSG( wxT("wxXX creation failed") ); + return; + } + m_message = message; - m_path = _T(""); + m_path = wxT(""); m_fileName = defaultFileName; m_dir = defaultDir; m_wildCard = wildCard; @@ -135,7 +145,7 @@ wxFileDialog::wxFileDialog( wxWindow *parent, const wxString& message, gtk_file_selection_hide_fileop_buttons( sel ); // they don't work anyway m_path.Append(m_dir); - if( ! m_path.IsEmpty() && m_path.Last()!=_T('/') ) + if( ! m_path.IsEmpty() && m_path.Last()!=wxT('/') ) m_path.Append('/'); m_path.Append(m_fileName); @@ -167,7 +177,7 @@ void wxFileDialog::SetPath(const wxString& path) wxSplitPath(path, &m_dir, &m_fileName, &ext); if (!ext.IsEmpty()) { - m_fileName += _T("."); + m_fileName += wxT("."); m_fileName += ext; } } @@ -188,7 +198,7 @@ wxFileSelectorEx(const wxChar *message, int x, int y) { // TODO: implement this somehow - return wxFileSelector(message, default_path, default_filename, _T(""), + return wxFileSelector(message, default_path, default_filename, wxT(""), wildcard, flags, parent, x, y); } @@ -199,7 +209,7 @@ wxString wxFileSelector( const wxChar *title, { wxString filter2; if ( defaultExtension && !filter ) - filter2 = wxString(_T("*.")) + wxString(defaultExtension) ; + filter2 = wxString(wxT("*.")) + wxString(defaultExtension) ; else if ( filter ) filter2 = filter; @@ -231,9 +241,9 @@ wxString wxLoadFileSelector( const wxChar *what, const wxChar *extension, const wxString str = _("Load %s file"); wxSprintf(prompt, str, what); - if (*ext == _T('.')) ext++; + if (*ext == wxT('.')) ext++; wxChar wild[60]; - wxSprintf(wild, _T("*.%s"), ext); + wxSprintf(wild, wxT("*.%s"), ext); return wxFileSelector (prompt, (const wxChar *) NULL, default_name, ext, wild, 0, parent); } @@ -247,9 +257,9 @@ wxString wxSaveFileSelector(const wxChar *what, const wxChar *extension, const w wxString str = _("Save %s file"); wxSprintf(prompt, str, what); - if (*ext == _T('.')) ext++; + if (*ext == wxT('.')) ext++; wxChar wild[60]; - wxSprintf(wild, _T("*.%s"), ext); + wxSprintf(wild, wxT("*.%s"), ext); return wxFileSelector (prompt, (const wxChar *) NULL, default_name, ext, wild, 0, parent); }