// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#ifdef __GNUG__
-#pragma implementation "wxpoem.h"
-#endif
-
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
// See what ACTUAL char height is
if(m_normalFont)
dc->SetFont(*m_normalFont);
- long xx;
- long yy;
+ wxCoord xx;
+ wxCoord yy;
dc->GetTextExtent(_T("X"), &xx, &yy);
char_height = (int)yy;
if (ask || m_searchString.empty())
{
wxString s = wxGetTextFromUser( _T("Enter search string"), _T("Search"), m_searchString);
- if (s != wxEmptyString)
+ if (!s.empty())
{
s.MakeLower();
m_searchString = s;
// Read preferences
void MainWindow::ReadPreferences()
{
+/* TODO: convert this code to use wxConfig
#if wxUSE_RESOURCES
wxGetResource(_T("wxPoem"), _T("FontSize"), &pointSize);
wxGetResource(_T("wxPoem"), _T("X"), &XPos);
wxGetResource(_T("wxPoem"), _T("Y"), &YPos);
#endif
+*/
}
// Write preferences to disk
{
#ifdef __WXMSW__
TheMainWindow->GetPosition(&XPos, &YPos);
+/* TODO: convert this code to use wxConfig
#if wxUSE_RESOURCES
wxWriteResource(_T("wxPoem"), _T("FontSize"), pointSize);
wxWriteResource(_T("wxPoem"), _T("X"), XPos);
wxWriteResource(_T("wxPoem"), _T("Y"), YPos);
#endif
+*/
#endif
}
// Only match if we're looking at a different poem
// (no point in displaying the same poem again)
- if ((ch == m_searchString[i]) && (last_poem_start != previous_poem_start))
+ if ((m_searchString[i] == ch) && (last_poem_start != previous_poem_start))
{
if (i == 0)
last_find = ftell(file);