1. minor fixes in wxDynLib
2. added more symbols to winundef.h 3. fixed wxTextFile::IsOpen() - now it does what you'd suppose 4. listctrl now updates the item image when it changes 5. file dlg checks for an error and gives a message about it (debug only) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2973 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -63,6 +63,8 @@ const wxTextFileType wxTextFile::typeDefault =
|
||||
|
||||
wxTextFile::wxTextFile(const wxString& strFile) : m_strFile(strFile)
|
||||
{
|
||||
m_nCurLine = 0;
|
||||
m_isOpened = FALSE;
|
||||
}
|
||||
|
||||
wxTextFile::~wxTextFile()
|
||||
@@ -91,11 +93,11 @@ bool wxTextFile::Open()
|
||||
return FALSE;
|
||||
|
||||
// read file into memory
|
||||
bool bRet = Read();
|
||||
m_isOpened = Read();
|
||||
|
||||
m_file.Close();
|
||||
|
||||
return bRet;
|
||||
return m_isOpened;
|
||||
}
|
||||
|
||||
// analyse some lines of the file trying to guess it's type.
|
||||
@@ -175,7 +177,6 @@ bool wxTextFile::Read()
|
||||
nRead = m_file.Read(buf, WXSIZEOF(buf));
|
||||
if ( nRead == wxInvalidOffset ) {
|
||||
// read error (error message already given in wxFile::Read)
|
||||
m_file.Close();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -231,6 +232,7 @@ bool wxTextFile::Close()
|
||||
m_aTypes.Clear();
|
||||
m_aLines.Clear();
|
||||
m_nCurLine = 0;
|
||||
m_isOpened = FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
Reference in New Issue
Block a user