Changeset f302cbaa in git


Ignore:
Timestamp:
13/06/10 05:46:30 (9 years ago)
Author:
Olly Betts <olly@…>
Branches:
add-show-splays, line_contents, master, stereo, svn/github/master, svn/origin/master, svn/survex-1_1, svn/tags/1.1.14, svn/tags/1.1.15, svn/tags/1.1.16, svn/tags/1.2.0, svn/tags/1.2.1, svn/tags/1.2.2, svn/tags/1.2.3, svn/tags/1.2.4, svn/tags/1.2.5, svn/tags/v1_1_13, svn/trunk, travis-osx
Children:
5f97258
Parents:
98a3786
Message:

src/mainfrm.cc,src/printwx.cc: Use wxFileName::SplitPath?() instead of
baseleaf_from_fnm().

git-svn-id: file:///home/survex-svn/survex/branches/survex-1_1@3395 4b37db11-9a0c-4f06-9ece-9ab7cdaee568

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • ChangeLog

    r98a3786 rf302cbaa  
     1Sun Jun 13 04:44:30 GMT 2010  Olly Betts <olly@survex.com>
     2
     3        * src/mainfrm.cc,src/printwx.cc: Use wxFileName::SplitPath() instead of
     4          baseleaf_from_fnm().
     5
    16Sun Jun 13 00:57:11 GMT 2010  Olly Betts <olly@survex.com>
    27
  • src/mainfrm.cc

    r98a3786 rf302cbaa  
    4040
    4141#include <wx/confbase.h>
     42#include <wx/filename.h>
    4243#include <wx/image.h>
    4344#include <wx/imaglist.h>
     
    16911692{
    16921693    AvenAllowOnTop ontop(this);
    1693     char *baseleaf = baseleaf_from_fnm(m_File.char_str());
     1694    wxString baseleaf;
     1695    wxFileName::SplitPath(m_File, NULL, NULL, &baseleaf, NULL, wxPATH_NATIVE);
    16941696    wxFileDialog dlg(this, wmsg(/*Save Screenshot*/321), wxString(),
    1695                      wxString(baseleaf, wxConvUTF8) + wxT(".png"),
     1697                     baseleaf + wxT(".png"),
    16961698                     wxT("*.png"), wxFD_SAVE|wxFD_OVERWRITE_PROMPT);
    1697     free(baseleaf);
    16981699    if (dlg.ShowModal() == wxID_OK) {
    16991700        static bool png_handled = false;
     
    21502151    // FIXME : Taking the leaf of the currently loaded presentation as the
    21512152    // default might make more sense?
    2152     char *baseleaf = baseleaf_from_fnm(m_File.char_str());
     2153    wxString baseleaf;
     2154    wxFileName::SplitPath(m_File, NULL, NULL, &baseleaf, NULL, wxPATH_NATIVE);
    21532155    wxFileDialog dlg(this, wxT("Export Movie"), wxString(),
    2154                      wxString(baseleaf, wxConvUTF8) + wxT(".mpg"),
     2156                     baseleaf + wxT(".mpg"),
    21552157                     wxT("MPEG|*.mpg|AVI|*.avi|QuickTime|*.mov|WMV|*.wmv;*.asf"),
    21562158                     wxFD_SAVE|wxFD_OVERWRITE_PROMPT);
    2157     free(baseleaf);
    21582159    if (dlg.ShowModal() == wxID_OK) {
    21592160        if (!m_Gfx->ExportMovie(dlg.GetPath())) {
  • src/printwx.cc

    r98a3786 rf302cbaa  
    3535#include <float.h>
    3636#include <limits.h>
     37#include <wx/filename.h>
    3738#include <wx/print.h>
    3839#include <wx/printdlg.h>
     
    323324svxPrintDlg::OnExport(wxCommandEvent&) {
    324325    UIToLayout();
    325     char *baseleaf = baseleaf_from_fnm(m_File.fn_str());
    326 //    wxFileName::SplitPath(m_File,NULL,NULL,&baseleaf,NULL,wxPATH_NATIVE);
    327     wxFileDialog dlg(this, wxT("Export as:"), wxString(),
    328                      wxString(baseleaf, wxConvUTF8),
     326    wxString baseleaf;
     327    wxFileName::SplitPath(m_File, NULL, NULL, &baseleaf, NULL, wxPATH_NATIVE);
     328    wxFileDialog dlg(this, wxT("Export as:"), wxString(), baseleaf,
    329329                     wxT("DXF files|*.dxf|SVG files|*.svg|Sketch files|*.sk|EPS files|*.eps|Compass PLT for use with Carto|*.plt|HPGL for plotters|*.hpgl"),
    330330                     wxFD_SAVE|wxFD_OVERWRITE_PROMPT);
Note: See TracChangeset for help on using the changeset viewer.