X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/694f70fa9c0cc8889c208020bf75b2e3861f6818..4614c8e52801a1565198f352fdfc26ef9d3e5e5c:/contrib/utils/convertrc/convert.cpp diff --git a/contrib/utils/convertrc/convert.cpp b/contrib/utils/convertrc/convert.cpp index b0eb0e569c..078c29d5e5 100644 --- a/contrib/utils/convertrc/convert.cpp +++ b/contrib/utils/convertrc/convert.cpp @@ -5,10 +5,6 @@ 3. Converts portions of an .RC file into a wxr file */ -#ifdef __GNUG__ -#pragma implementation "convert.h" -#endif - // For compilers that support precompilation, includes "wx/wx.h". #include "wx/wxprec.h" @@ -19,10 +15,10 @@ // for all others, include the necessary headers (this file is usually all you // need because it includes almost all "standard" wxWidgets headers #ifndef WX_PRECOMP -#include +#include "wx/wx.h" #endif -#include +#include "wx/image.h" #include "wx/deprecated/setup.h" #include "wx/deprecated/resource.h" @@ -127,64 +123,65 @@ void wxMainFrame::OnQuit(wxCommandEvent& WXUNUSED(event)) void wxMainFrame::OnRc2Wxr(wxCommandEvent& WXUNUSED(event)) { - wxFileDialog filed(this); - filed.SetWildcard(_T("*.rc")); - filed.SetStyle(wxOPEN); +#if wxUSE_FILEDLG + wxFileDialog filed(this, wxEmptyString, + wxEmptyString, wxEmptyString, + _T("*.rc"), wxFD_OPEN); if (filed.ShowModal()!=wxID_OK) return; - wxFileDialog wxrfile(this,_T("Enter Desired WXR file name")); - wxrfile.SetWildcard(_T("*.wxr")); - wxrfile.SetStyle(wxOPEN); - wxrfile.SetFilename(_T("resource.wxr")); + wxFileDialog wxrfile(this, _T("Enter Desired WXR file name"), + wxEmptyString, _T("resource.wxr"), + _T("*.wxr"), wxFD_OPEN); if (wxrfile.ShowModal()!=wxID_OK) return; rc2wxr convert; convert.Convert(wxrfile.GetPath(),filed.GetPath()); +#endif // wxUSE_FILEDLG } void wxMainFrame::OnWXR2XML(wxCommandEvent& WXUNUSED(event)) { +#if wxUSE_FILEDLG wxFileDialog f(this); f.SetWildcard(_T("*.wxr")); if (f.ShowModal()!=wxID_OK) return; - wxFileDialog xmlfile(this,_T("Enter Desired XML file name")); - xmlfile.SetWildcard(_T("*.xml")); - xmlfile.SetStyle(wxOPEN); - xmlfile.SetFilename(_T("resource.xml")); + wxFileDialog xmlfile(this,_T("Enter Desired XML file name"), + wxEmptyString, _T("resource.xml"), + _T("*.xml"), wxFD_OPEN); if (xmlfile.ShowModal()!=wxID_OK) return; wxr2xml XMLCon; XMLCon.Convert(f.GetPath(),xmlfile.GetPath()); - +#endif // wxUSE_FILEDLG } void wxMainFrame::OnRC2XML(wxCommandEvent& WXUNUSED(event)) { +#if wxUSE_FILEDLG wxFileDialog f(this); f.SetWildcard(_T("*.rc")); if (f.ShowModal()!=wxID_OK) return; - wxFileDialog xmlfile(this,_T("Enter Desired XML file name")); - xmlfile.SetWildcard(_T("*.xml")); - xmlfile.SetStyle(wxOPEN); - xmlfile.SetFilename(_T("resource.xml")); + wxFileDialog xmlfile(this,_T("Enter Desired XML file name"), + wxEmptyString, _T("resource.xml"), + _T("*.xml"), wxFD_OPEN); if (xmlfile.ShowModal()!=wxID_OK) return; rc2xml XMLCon; XMLCon.Convert(f.GetPath(),xmlfile.GetPath()); - +#endif // wxUSE_FILEDLG } bool wxConvertApp::HandleCommandLine()