summaryrefslogtreecommitdiff
authordrw <drw>2005-08-31 19:21:49 (UTC)
committer drw <drw>2005-08-31 19:21:49 (UTC)
commit8a74037f6174f187ea3f5583d6c253752792128a (patch) (side-by-side diff)
treeebe25ecf0a341c01b696904a5245e3f3e9778db7
parent465eb3107bb32ad7ab2d726d8a510538fca56764 (diff)
downloadopie-8a74037f6174f187ea3f5583d6c253752792128a.zip
opie-8a74037f6174f187ea3f5583d6c253752792128a.tar.gz
opie-8a74037f6174f187ea3f5583d6c253752792128a.tar.bz2
Fix support for non-English language texts
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/dagger/ChangeLog5
-rw-r--r--noncore/apps/dagger/README2
-rw-r--r--noncore/apps/dagger/TODO7
-rw-r--r--noncore/apps/dagger/opie-dagger.control2
-rw-r--r--noncore/apps/dagger/textwidget.cpp2
5 files changed, 11 insertions, 7 deletions
diff --git a/noncore/apps/dagger/ChangeLog b/noncore/apps/dagger/ChangeLog
index 22b20d4..804a899 100644
--- a/noncore/apps/dagger/ChangeLog
+++ b/noncore/apps/dagger/ChangeLog
@@ -1,19 +1,24 @@
+2005-08-31 Dan Williams <drw@handhelds.org>
+
+ * Released version 0.9.3
+ * Fix support for non-English languages
+
2005-08-09 Dan Williams <drw@handhelds.org>
* Released version 0.9.2
* Added support for Sword v1.5.8
* Implemented morph tag cross-referencing
* Fix crash when last module is closed
* Fix display of key when module is opened
2004-04-22 Dan Williams <drw@handhelds.org>
* Released version 0.9.1
* Fixed the disabling of screen blanking
* Implement previous/next page scrolling
* Animate search OWait
2004-04-06 Dan Williams <drw@handhelds.org>
* Released version 0.9.0
* Initial check-in of new application
diff --git a/noncore/apps/dagger/README b/noncore/apps/dagger/README
index 47b8eee..9ca0d8c 100644
--- a/noncore/apps/dagger/README
+++ b/noncore/apps/dagger/README
@@ -1,61 +1,61 @@
/************************************************************************
/*
/* Opie - Dagger
/* ===============
-/* Version 0.9.2
+/* Version 0.9.3
/*
/* A Bible study/reader application
/*
/************************************************************************
---------------------------------------------
Release Notes for Opie-Dagger - August, 2005
---------------------------------------------
======================
= To-do =
======================
- See $OPIEDIR/noncore/apps/dagger/TODO for more info.
======================
= Build =
======================
In order to build opie-dagger, libsword needs to be present on
the build system along with the appropriate headers.
- libsword source (requires version 1.5.8 or greater):
- http://www.crosswire.org/sword/
- the Sword library headers need to be located in an appropriate
include directory
======================
= Run =
======================
- In order to use opie-dagger, libsword must be installed
on the system.
- One or more Sword modules need to be installed, see
http://www.crosswire.org/sword/ to download modules
- When run for the first time, the path needs to be set to the
directory where the Sword modules are located. Select 'Edit->Configure'
from the menu bar and enter the path on the 'General' tab. Restart
Dagger.
======================
= Credits =
======================
- Opie-Dagger is (C) 2004, 2005 Dan Williams
======================
= Links =
======================
- Opie Project: http://opie.handhelds.org
- OpenZaurus Project: http://openzaurus.org
- Familiar Project: http://familiar.handhelds.org
- Crosswire Society http://www.crosswire.org/
- The Sword Project http://www.crosswire.org/sword/
diff --git a/noncore/apps/dagger/TODO b/noncore/apps/dagger/TODO
index 21426aa..28bda6f 100644
--- a/noncore/apps/dagger/TODO
+++ b/noncore/apps/dagger/TODO
@@ -1,28 +1,27 @@
/************************************************************************
/*
/* Opie - Dagger
/* ===============
-/* Version 0.9.2
+/* Version 0.9.3
/*
/* A Bible study/reader application
/*
/************************************************************************
------------------------------------
To-do for Opie-Dagger - August, 2005
------------------------------------
======================
= Current release =
======================
1. Implement module installation
-2. Fix support for other languages
-3. Fix display sleep prevention
-4. Implement footnote cross-referencing
+2. Fix display sleep prevention
+3. Implement footnote cross-referencing
======================
= Future releases =
======================
1. Margin notes \ No newline at end of file
diff --git a/noncore/apps/dagger/opie-dagger.control b/noncore/apps/dagger/opie-dagger.control
index e613ddb..dde696a 100644
--- a/noncore/apps/dagger/opie-dagger.control
+++ b/noncore/apps/dagger/opie-dagger.control
@@ -1,9 +1,9 @@
Package: opie-dagger
Files: plugins/application/libdagger.so* bin/dagger pics/dagger apps/Applications/dagger.desktop
Priority: optional
Section: opie/applications
Depends: task-opie-minimal, libopiecore2, libopieui2
Architecture: arm
Maintainer: Dan Williams (drw@handhelds.org)
Description: A Bible study program utilizing the Sword library.
-Version: 0.9.2$EXTRAVERSION
+Version: 0.9.3$EXTRAVERSION
diff --git a/noncore/apps/dagger/textwidget.cpp b/noncore/apps/dagger/textwidget.cpp
index 9f7de66..2df6455 100644
--- a/noncore/apps/dagger/textwidget.cpp
+++ b/noncore/apps/dagger/textwidget.cpp
@@ -20,168 +20,168 @@ file; see the file COPYING. If not, write to the Free Software Foundation, Inc.,
#include <qlayout.h>
#include <qtextbrowser.h>
#include <versekey.h>
TextWidget::TextWidget( QWidget *parent, sword::SWModule *module, int numVerses, const QFont *font )
: QWidget( parent, 0x0, 0x0 )
, m_module( module )
, m_numVerses( numVerses )
{
if ( parent )
installEventFilter( parent );
QVBoxLayout *layout = new QVBoxLayout( this, 2, 2 );
m_textView = new QTextBrowser( this );
m_textView->installEventFilter( parent );
m_textView->setMinimumHeight( 20 );
m_textView->setHScrollBarMode( QTextView::AlwaysOff );
m_textView->setTextFormat( QTextView::RichText );
connect( m_textView, SIGNAL(highlighted(const QString &)),
this, SIGNAL(sigRefClicked(const QString &)) );
layout->addWidget( m_textView );
// Set font
if ( font )
setFont( *font );
// Set initial text
if ( m_module )
{
m_isBibleText = !strcmp( module->Type(), "Biblical Texts" );
if ( m_isBibleText )
{
m_key = new sword::VerseKey( "g" );
//connect( m_textView, SIGNAL(highlighted(const QString&)),
// this, SLOT(slotReferenceClicked(const QString&)) );
//connect( parent, SIGNAL( strongsNumbers( bool ) ), this, SLOT( slotStrongsNumbers( bool ) ) );
}
else
{
m_key = new sword::SWKey( "" );
}
m_module->SetKey( m_key );
setText();
}
}
TextWidget::~TextWidget()
{
// TODO - why does this cause a SIGSEV???
//delete m_key;
}
QString TextWidget::getCurrVerse()
{
m_module->SetKey( m_key->getText() );
return ( QString ) m_module->StripText();
}
void TextWidget::prevPage()
{
(*m_key) -= m_numVerses;
setText();
}
void TextWidget::prevVerse()
{
(*m_key)--;
setText();
}
void TextWidget::setKey( const QString &newKey )
{
m_key->setText( newKey.latin1() );
setText();
}
void TextWidget::nextVerse()
{
(*m_key)++;
setText();
}
void TextWidget::nextPage()
{
(*m_key) += m_numVerses;
setText();
}
void TextWidget::slotNumVersesChanged( int numVerses )
{
m_numVerses = numVerses;
setText();
}
void TextWidget::slotFontChanged( const QFont *newFont )
{
setFont( *newFont );
// TODO - shouldn't have to reset text, but couldn't get repaint() to work
setText();
}
void TextWidget::slotOptionChanged()
{
setText();
}
void TextWidget::setText()
{
if ( m_key->Error() )
return;
m_module->SetKey( m_key->getText() );
m_fullKey = QString( "%1 (%2)" ).arg( m_key->getShortText() ).arg( m_module->Name() );
if ( m_isBibleText )
{
m_textView->setVScrollBarMode( QTextView::AlwaysOff );
m_abbrevKey = m_key->getShortText();
QString fullText;
for ( int i = 0; i < m_numVerses; i++ )
{
QString key = ( QString ) m_module->KeyText();
- QString verseStr = ( QString ) *m_module;
+ QString verseStr = QString::fromUtf8( *m_module );
// Format current verse (adding chapter and/or book headings if necessary)
int verse = static_cast<sword::VerseKey>(m_module->Key()).Verse();
if ( verse == 1 )
{
int chapter = static_cast<sword::VerseKey>(m_module->Key()).Chapter();
if ( chapter == 1 )
{
QString book = static_cast<sword::VerseKey>(m_module->Key()).getBookName();
verseStr = QString( "<p><center><big><b>%1</b></big></center><br><center><b>Chapter %1</b></center><p><b>%2</b>&nbsp;%3<p>" )
.arg( book ).arg( chapter ).arg( verse ).arg( verseStr );
}
else
{
verseStr = QString( "<center><b>Chapter %1</b></center><p><b>%2</b>&nbsp;%3<p>" )
.arg( chapter ).arg( verse ).arg( verseStr );
}
}
else
{
verseStr = QString( "<b>%1</b>&nbsp;%2<p>" ).arg( verse ).arg( verseStr );
}
fullText.append( verseStr );
m_module->Key()++;
if ( m_module->Key().Error() )
break;
}
m_textView->setText( fullText );
}
else // !isBibleText
{
m_abbrevKey = m_key->getText();
m_textView->setText( ( QString ) *m_module );
}
}