Changeset d3172cc in git


Ignore:
Timestamp:
13/06/10 07:57:33 (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:
8a05a7a
Parents:
5f97258
Message:

src/cavernlog.cc,src/gla-gl.cc,src/mainfrm.cc: wxString::fn_str() on
wxmsw returns a wide string, which doesn't work with fopen(), etc, so
call char_str() instead for now.

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

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • ChangeLog

    r5f97258 rd3172cc  
     1Sun Jun 13 06:57:07 GMT 2010  Olly Betts <olly@survex.com>
     2
     3        * src/cavernlog.cc,src/gla-gl.cc,src/mainfrm.cc: wxString::fn_str() on
     4          wxmsw returns a wide string, which doesn't work with fopen(), etc, so
     5          call char_str() instead for now.
     6
    17Sun Jun 13 05:41:30 GMT 2010  Olly Betts <olly@survex.com>
    28
  • src/cavernlog.cc

    r5f97258 rd3172cc  
    161161                }
    162162        }
    163         system(cmd.fn_str());
     163        // FIXME: This should really use fn_str() - currently we probably can't
     164        // process a Unicode path on wxmsw.
     165        system(cmd.char_str());
    164166    }
    165167}
     
    183185    cmd += escaped_file;
    184186
    185     FILE * cavern_out = popen(cmd.fn_str(), "r");
     187    // FIXME: This should really use fn_str() - currently we probably can't
     188    // process a Unicode path on wxmsw.
     189    FILE * cavern_out = popen(cmd.char_str(), "r");
    186190    if (!cavern_out) {
    187191        wxString m;
  • src/gla-gl.cc

    r5f97258 rd3172cc  
    305305    path += wxCONFIG_PATH_SEPARATOR;
    306306    path += wxT("aven.txf");
    307     m_Font.load(path.fn_str());
     307    // FIXME: This should really use fn_str() - currently we probably can't
     308    // save to a Unicode path on wxmsw.
     309    m_Font.load(path.char_str());
    308310#endif
    309311
  • src/mainfrm.cc

    r5f97258 rd3172cc  
    317317            }
    318318
    319             FILE * fh_pres = fopen(fnm.fn_str(), "w");
     319            // FIXME: This should really use fn_str() - currently we probably can't
     320            // save to a Unicode path on wxmsw.
     321            FILE * fh_pres = fopen(fnm.char_str(), "w");
    320322            if (!fh_pres) {
    321323                wxGetApp().ReportError(wxString::Format(wmsg(/*Error writing to file `%s'*/110), fnm.c_str()));
     
    349351        void New(const wxString &fnm) {
    350352            DeleteAllItems();
    351             char *baseleaf = baseleaf_from_fnm(fnm.fn_str());
    352             filename = wxString(baseleaf, wxConvUTF8);
    353             free(baseleaf);
     353            wxFileName::SplitPath(fnm, NULL, NULL, &filename, NULL, wxPATH_NATIVE);
    354354            filename += wxT(".fly");
    355355            force_save_as = true;
    356356        }
    357357        bool Load(const wxString &fnm) {
    358             FILE * fh_pres = fopen(fnm.fn_str(), "r");
     358            // FIXME: This should really use fn_str() - currently we probably
     359            // can't save to a Unicode path on wxmsw.
     360            FILE * fh_pres = fopen(fnm.char_str(), "r");
    359361            if (!fh_pres) {
    360362                wxString m;
Note: See TracChangeset for help on using the changeset viewer.