[sword-svn] r201 - trunk/src/SwordReader_GUI
dtrotzjr at crosswire.org
dtrotzjr at crosswire.org
Sat Jan 31 12:52:40 MST 2009
Author: dtrotzjr
Date: 2009-01-31 12:52:40 -0700 (Sat, 31 Jan 2009)
New Revision: 201
Modified:
trunk/src/SwordReader_GUI/SRBibleWidget.cpp
trunk/src/SwordReader_GUI/SRFind.cpp
trunk/src/SwordReader_GUI/SRLexiWidget.cpp
trunk/src/SwordReader_GUI/SRMenuBar.cpp
trunk/src/SwordReader_GUI/SRModuleView.cpp
trunk/src/SwordReader_GUI/SRTextView.cpp
Log:
All known memory leaks plugged.
Modified: trunk/src/SwordReader_GUI/SRBibleWidget.cpp
===================================================================
--- trunk/src/SwordReader_GUI/SRBibleWidget.cpp 2009-01-31 03:04:32 UTC (rev 200)
+++ trunk/src/SwordReader_GUI/SRBibleWidget.cpp 2009-01-31 19:52:40 UTC (rev 201)
@@ -21,7 +21,16 @@
SRBibleWidget::~SRBibleWidget()
{
-
+ if(m_viewBible)
+ delete m_viewBible;
+ if(m_viewLexi)
+ delete m_viewLexi;
+ if(m_subWndLexi)
+ delete m_subWndLexi;
+ if(m_viewNote)
+ delete m_viewNote;
+ if(m_subWndNote)
+ delete m_subWndNote;
}
BOOL SRBibleWidget::Create(SRWnd *pParentWnd, RECT bounds)
Modified: trunk/src/SwordReader_GUI/SRFind.cpp
===================================================================
--- trunk/src/SwordReader_GUI/SRFind.cpp 2009-01-31 03:04:32 UTC (rev 200)
+++ trunk/src/SwordReader_GUI/SRFind.cpp 2009-01-31 19:52:40 UTC (rev 201)
@@ -39,6 +39,26 @@
{
if(m_textPreview)
delete m_textPreview;
+ if(m_pEdtQuery)
+ delete m_pEdtQuery;
+ if(m_pButtonSearch)
+ delete m_pButtonSearch;
+ if(m_pButtonGoTo)
+ delete m_pButtonGoTo;
+ if(m_pListBoxResults)
+ delete m_pListBoxResults;
+ if(m_pRadMethodExactphrase)
+ delete m_pRadMethodExactphrase;
+ if(m_pRadMethodMultiword)
+ delete m_pRadMethodMultiword;
+ if(m_pRadRangeBible)
+ delete m_pRadRangeBible;
+ if(m_pRadRangeBook)
+ delete m_pRadRangeBook;
+ if(m_pRadRangeTestament)
+ delete m_pRadRangeTestament;
+ if(m_pProgressBar)
+ delete m_pProgressBar;
}
VOID SRFind::SetProgress(INT nPercent)
Modified: trunk/src/SwordReader_GUI/SRLexiWidget.cpp
===================================================================
--- trunk/src/SwordReader_GUI/SRLexiWidget.cpp 2009-01-31 03:04:32 UTC (rev 200)
+++ trunk/src/SwordReader_GUI/SRLexiWidget.cpp 2009-01-31 19:52:40 UTC (rev 201)
@@ -21,7 +21,12 @@
SRLexiWidget::~SRLexiWidget(void)
{
-
+ if(m_lblEntry)
+ delete m_lblEntry;
+ if(m_cmbDictEntry)
+ delete m_cmbDictEntry;
+ if(m_viewLexi)
+ delete m_viewLexi;
}
BOOL SRLexiWidget::Create(SRWnd *pParentWnd, RECT bounds)
Modified: trunk/src/SwordReader_GUI/SRMenuBar.cpp
===================================================================
--- trunk/src/SwordReader_GUI/SRMenuBar.cpp 2009-01-31 03:04:32 UTC (rev 200)
+++ trunk/src/SwordReader_GUI/SRMenuBar.cpp 2009-01-31 19:52:40 UTC (rev 201)
@@ -20,6 +20,8 @@
delete m_menuComms;
if(m_menuOpts)
delete m_menuOpts;
+ if(m_menuDicts)
+ delete m_menuDicts;
}
Modified: trunk/src/SwordReader_GUI/SRModuleView.cpp
===================================================================
--- trunk/src/SwordReader_GUI/SRModuleView.cpp 2009-01-31 03:04:32 UTC (rev 200)
+++ trunk/src/SwordReader_GUI/SRModuleView.cpp 2009-01-31 19:52:40 UTC (rev 201)
@@ -109,14 +109,14 @@
m_verse.Testament(SWORD_NEW_TESTAMENT);
m_verse.Book(nBook - BIBLE_OT_BOOKS);
m_verse.Chapter(1);
- m_verse.Verse(1);
+ m_verse.setVerse(1);
}
}else{
if( m_verse.Testament() != 1 || m_verse.Book != nBook){
m_verse.Testament(SWORD_OLD_TESTAMENT);
m_verse.Book(nBook);
m_verse.Chapter(1);
- m_verse.Verse(1);
+ m_verse.setVerse(1);
}
}
m_fChapterChanged = true;
@@ -126,7 +126,7 @@
{
if(m_verse.Chapter() != nChapter){
m_verse.Chapter(nChapter);
- m_verse.Verse(1);
+ m_verse.setVerse(1);
m_fChapterChanged = true;
}
}
@@ -141,7 +141,7 @@
if(m_viewType == CommView && m_verse.Verse() == nVerse)
return;
- m_verse.Verse(nVerse);
+ m_verse.setVerse(nVerse);
if(fScroll)
ScrollToVerse(m_verse.Verse());
}
@@ -180,10 +180,10 @@
return;
Clear();
if(m_viewType == BibleView)
- keyCur.Verse(1);
+ keyCur.setVerse(1);
}else{
m_fChapterChanged = false;
- keyCur.Verse(m_nLoadedTill + 1);
+ keyCur.setVerse(m_nLoadedTill + 1);
}
buf = "<html><body>";
@@ -372,21 +372,21 @@
case VK_UP:
ScrollFullPage(1);
if(GetVerseNum() > -1)
- m_verse.Verse(GetVerseNum());
+ m_verse.setVerse(GetVerseNum());
break;
case VK_DOWN:
ScrollFullPage(-1);
if(GetVerseNum() > -1)
- m_verse.Verse(GetVerseNum());
+ m_verse.setVerse(GetVerseNum());
break;
case VK_LEFT:
if(m_viewType == BibleView){
if(m_verse.Verse() > 1){
- m_verse.Verse(1);
+ m_verse.setVerse(1);
ScrollToVerse(1);
}else{
m_verse.decrement(1);
- m_verse.Verse(1);
+ m_verse.setVerse(1);
m_fChapterChanged = true;
LoadTextView();
}
Modified: trunk/src/SwordReader_GUI/SRTextView.cpp
===================================================================
--- trunk/src/SwordReader_GUI/SRTextView.cpp 2009-01-31 03:04:32 UTC (rev 200)
+++ trunk/src/SwordReader_GUI/SRTextView.cpp 2009-01-31 19:52:40 UTC (rev 201)
@@ -482,8 +482,6 @@
DWORDLONG dwlFontColor;
DWORDLONG dwlFontHeight;
- INT prevLeft = 0;
-
if(m_dwBuffEnd == 0)
return;
@@ -596,8 +594,6 @@
m_nLineY += nLineH;
}
- prevLeft = thisWord.m_rect.left;
-
// Store the line to be rendered later.
m_BTLines.AddWordToLine(m_dwLineNum, thisWord);
More information about the sword-cvs
mailing list