Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/lintest/myrulib.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKandrashin Denis <mail@lintest.ru>2012-10-11 14:27:03 +0400
committerKandrashin Denis <mail@lintest.ru>2012-10-11 14:27:03 +0400
commit93693386af989da85569de8dc298ffe6b7375f0c (patch)
tree5078e37a6911fdf6e3cbf8774adf6819a28e458e
parent94aefc8cea3999af099da684d1e6e9a9d0d8790d (diff)
Small changes for wxMSW 2.9
-rw-r--r--sources/MyRuLib/FbFileReader.cpp14
-rw-r--r--sources/MyRuLib/dialogs/FbExportDlg.cpp4
2 files changed, 7 insertions, 11 deletions
diff --git a/sources/MyRuLib/FbFileReader.cpp b/sources/MyRuLib/FbFileReader.cpp
index 669c0885..25cc5b8e 100644
--- a/sources/MyRuLib/FbFileReader.cpp
+++ b/sources/MyRuLib/FbFileReader.cpp
@@ -329,14 +329,12 @@ void FbFileReader::ShowError() const
void FbFileReader::ShellExecute(const wxString &filename)
{
- wxString command;
wxString filetype = Ext(filename);
#ifdef __WXMSW__
wxString filepath = filename;
filepath.Prepend(wxT('"')).Append(wxT('"'));
- wxChar * buffer = command.GetWriteBuf(MAX_PATH);
- bool ok = (int) FindExecutable(filepath, NULL, buffer) > 32;
- command.UngetWriteBuf();
+ wxChar command[MAX_PATH];
+ bool ok = (int) FindExecutable(filepath, NULL, command) > 32;
if (ok) {
::ShellExecute(NULL, NULL, command, filepath, NULL, SW_SHOW);
} else {
@@ -344,7 +342,7 @@ void FbFileReader::ShellExecute(const wxString &filename)
}
#else
#ifdef __WXGTK__
- command = wxT("xdg-open");
+ wxString command = wxT("xdg-open");
FbExecute(command, filename);
#else
bool ok = GetSystemCommand(filename, filetype, command);
@@ -425,10 +423,8 @@ static wxString CreateCacheFile(const wxString &url, const wxString &ext, wxInpu
if (!pCreateProc || !pCommitProc) return wxEmptyString;
- wxString filename;
- wxChar * buffer = filename.GetWriteBuf(MAX_PATH);
- bool ok = pCreateProc(url.c_str(), 0, ext.c_str(), buffer, 0);
- filename.UngetWriteBuf();
+ wxChar filename[MAX_PATH];
+ bool ok = pCreateProc(url.c_str(), 0, ext.c_str(), filename, 0);
if (tempfile.IsEmpty()) {
SaveFile(stream, filename);
diff --git a/sources/MyRuLib/dialogs/FbExportDlg.cpp b/sources/MyRuLib/dialogs/FbExportDlg.cpp
index 64389226..88e56bb7 100644
--- a/sources/MyRuLib/dialogs/FbExportDlg.cpp
+++ b/sources/MyRuLib/dialogs/FbExportDlg.cpp
@@ -95,8 +95,8 @@ FbExportDlg::FbExportDlg( wxWindow* parent, const wxString & selections, int iAu
bSizerMain->Add( bSizerFormat, 0, wxEXPAND, 5 );
m_folder->SetValue( FbParamItem::GetPath(FB_EXTERNAL_DIR) );
- m_transFold->SetValue( FbParamItem::GetPath(FB_TRANSLIT_FOLDER) );
- m_transFile->SetValue( FbParamItem::GetPath(FB_TRANSLIT_FILE) );
+ m_transFold->SetValue( FbParams(FB_TRANSLIT_FOLDER) );
+ m_transFile->SetValue( FbParams(FB_TRANSLIT_FILE) );
wxStdDialogButtonSizer * sdbSizerBtn = CreateStdDialogButtonSizer( wxOK | wxCANCEL );
bSizerMain->Add( sdbSizerBtn, 0, wxEXPAND|wxBOTTOM|wxLEFT|wxRIGHT, 5 );