-rw-r--r-- | noncore/apps/dagger/ChangeLog | 8 | ||||
-rw-r--r-- | noncore/apps/dagger/README | 8 | ||||
-rw-r--r-- | noncore/apps/dagger/TODO | 7 | ||||
-rw-r--r-- | noncore/apps/dagger/mainwindow.cpp | 68 | ||||
-rw-r--r-- | noncore/apps/dagger/opie-dagger.control | 2 | ||||
-rw-r--r-- | noncore/apps/dagger/searchbar.cpp | 2 |
6 files changed, 51 insertions, 44 deletions
diff --git a/noncore/apps/dagger/ChangeLog b/noncore/apps/dagger/ChangeLog index 108419e..22b20d4 100644 --- a/noncore/apps/dagger/ChangeLog +++ b/noncore/apps/dagger/ChangeLog | |||
@@ -1,11 +1,19 @@ | |||
1 | 2005-08-09 Dan Williams <drw@handhelds.org> | ||
2 | |||
3 | * Released version 0.9.2 | ||
4 | * Added support for Sword v1.5.8 | ||
5 | * Implemented morph tag cross-referencing | ||
6 | * Fix crash when last module is closed | ||
7 | * Fix display of key when module is opened | ||
8 | |||
1 | 2004-04-22 Dan Williams <drw@handhelds.org> | 9 | 2004-04-22 Dan Williams <drw@handhelds.org> |
2 | 10 | ||
3 | * Released version 0.9.1 | 11 | * Released version 0.9.1 |
4 | * Fixed the disabling of screen blanking | 12 | * Fixed the disabling of screen blanking |
5 | * Implement previous/next page scrolling | 13 | * Implement previous/next page scrolling |
6 | * Animate search OWait | 14 | * Animate search OWait |
7 | 15 | ||
8 | 2004-04-06 Dan Williams <drw@handhelds.org> | 16 | 2004-04-06 Dan Williams <drw@handhelds.org> |
9 | 17 | ||
10 | * Released version 0.9.0 | 18 | * Released version 0.9.0 |
11 | * Initial check-in of new application | 19 | * Initial check-in of new application |
diff --git a/noncore/apps/dagger/README b/noncore/apps/dagger/README index 00e9eed..47b8eee 100644 --- a/noncore/apps/dagger/README +++ b/noncore/apps/dagger/README | |||
@@ -1,61 +1,61 @@ | |||
1 | /************************************************************************ | 1 | /************************************************************************ |
2 | /* | 2 | /* |
3 | /* Opie - Dagger | 3 | /* Opie - Dagger |
4 | /* =============== | 4 | /* =============== |
5 | /* Version 0.9.1 | 5 | /* Version 0.9.2 |
6 | /* | 6 | /* |
7 | /* A Bible study/reader application | 7 | /* A Bible study/reader application |
8 | /* | 8 | /* |
9 | /************************************************************************ | 9 | /************************************************************************ |
10 | 10 | ||
11 | --------------------------------------------- | 11 | --------------------------------------------- |
12 | Release Notes for Opie-Dagger - April, 2004 | 12 | Release Notes for Opie-Dagger - August, 2005 |
13 | --------------------------------------------- | 13 | --------------------------------------------- |
14 | 14 | ||
15 | ====================== | 15 | ====================== |
16 | = To-do = | 16 | = To-do = |
17 | ====================== | 17 | ====================== |
18 | 18 | ||
19 | - See $OPIEDIR/noncore/apps/dagger/TODO for more info. | 19 | - See $OPIEDIR/noncore/apps/dagger/TODO for more info. |
20 | 20 | ||
21 | ====================== | 21 | ====================== |
22 | = Build = | 22 | = Build = |
23 | ====================== | 23 | ====================== |
24 | 24 | ||
25 | In order to build opie-dagger, libsword needs to be present on | 25 | In order to build opie-dagger, libsword needs to be present on |
26 | the build system along with the appropriate headers. | 26 | the build system along with the appropriate headers. |
27 | 27 | ||
28 | - libsword source (best to use version 1.5.x or greater): | 28 | - libsword source (requires version 1.5.8 or greater): |
29 | - http://www.crosswire.org/sword/ | 29 | - http://www.crosswire.org/sword/ |
30 | 30 | ||
31 | - the Sword library headers need to be located in an appropriate | 31 | - the Sword library headers need to be located in an appropriate |
32 | include directory | 32 | include directory |
33 | 33 | ||
34 | ====================== | 34 | ====================== |
35 | = Run = | 35 | = Run = |
36 | ====================== | 36 | ====================== |
37 | 37 | ||
38 | - In order to use opie-dagger, libsword must be installed | 38 | - In order to use opie-dagger, libsword must be installed |
39 | on the system. | 39 | on the system. |
40 | - One or more Sword modules need to be installed, see | 40 | - One or more Sword modules need to be installed, see |
41 | http://www.crosswire.org/sword/ to download modules | 41 | http://www.crosswire.org/sword/ to download modules |
42 | - When run for the first time, the path needs to be set to the | 42 | - When run for the first time, the path needs to be set to the |
43 | directory where the Sword modules are located. Select 'Edit->Configure' | 43 | directory where the Sword modules are located. Select 'Edit->Configure' |
44 | from the menu bar and enter the path on the 'General' tab. Restart | 44 | from the menu bar and enter the path on the 'General' tab. Restart |
45 | Dagger. | 45 | Dagger. |
46 | 46 | ||
47 | ====================== | 47 | ====================== |
48 | = Credits = | 48 | = Credits = |
49 | ====================== | 49 | ====================== |
50 | 50 | ||
51 | - Opie-Dagger is (C) 2004 Dan Williams | 51 | - Opie-Dagger is (C) 2004, 2005 Dan Williams |
52 | 52 | ||
53 | ====================== | 53 | ====================== |
54 | = Links = | 54 | = Links = |
55 | ====================== | 55 | ====================== |
56 | 56 | ||
57 | - Opie Project: http://opie.handhelds.org | 57 | - Opie Project: http://opie.handhelds.org |
58 | - OpenZaurus Project: http://openzaurus.org | 58 | - OpenZaurus Project: http://openzaurus.org |
59 | - Familiar Project: http://familiar.handhelds.org | 59 | - Familiar Project: http://familiar.handhelds.org |
60 | - Crosswire Society http://www.crosswire.org/ | 60 | - Crosswire Society http://www.crosswire.org/ |
61 | - The Sword Project http://www.crosswire.org/sword/ | 61 | - The Sword Project http://www.crosswire.org/sword/ |
diff --git a/noncore/apps/dagger/TODO b/noncore/apps/dagger/TODO index 1530bd6..21426aa 100644 --- a/noncore/apps/dagger/TODO +++ b/noncore/apps/dagger/TODO | |||
@@ -1,25 +1,28 @@ | |||
1 | /************************************************************************ | 1 | /************************************************************************ |
2 | /* | 2 | /* |
3 | /* Opie - Dagger | 3 | /* Opie - Dagger |
4 | /* =============== | 4 | /* =============== |
5 | /* Version 0.9.1 | 5 | /* Version 0.9.2 |
6 | /* | 6 | /* |
7 | /* A Bible study/reader application | 7 | /* A Bible study/reader application |
8 | /* | 8 | /* |
9 | /************************************************************************ | 9 | /************************************************************************ |
10 | 10 | ||
11 | ------------------------------------ | 11 | ------------------------------------ |
12 | To-do for Opie-Dagger - April, 2004 | 12 | To-do for Opie-Dagger - August, 2005 |
13 | ------------------------------------ | 13 | ------------------------------------ |
14 | 14 | ||
15 | ====================== | 15 | ====================== |
16 | = Current release = | 16 | = Current release = |
17 | ====================== | 17 | ====================== |
18 | 18 | ||
19 | 1. Implement module installation | 19 | 1. Implement module installation |
20 | 2. Fix support for other languages | ||
21 | 3. Fix display sleep prevention | ||
22 | 4. Implement footnote cross-referencing | ||
20 | 23 | ||
21 | ====================== | 24 | ====================== |
22 | = Future releases = | 25 | = Future releases = |
23 | ====================== | 26 | ====================== |
24 | 27 | ||
25 | 1. Margin notes \ No newline at end of file | 28 | 1. Margin notes \ No newline at end of file |
diff --git a/noncore/apps/dagger/mainwindow.cpp b/noncore/apps/dagger/mainwindow.cpp index 1f2d521..f61df68 100644 --- a/noncore/apps/dagger/mainwindow.cpp +++ b/noncore/apps/dagger/mainwindow.cpp | |||
@@ -312,32 +312,34 @@ void MainWindow::openModule( const QString &modulename, const QString &key ) | |||
312 | tw = new TextWidget( this, module, m_numVerses, &m_textFont ); | 312 | tw = new TextWidget( this, module, m_numVerses, &m_textFont ); |
313 | connect( tw, SIGNAL(sigRefClicked(const QString &)), | 313 | connect( tw, SIGNAL(sigRefClicked(const QString &)), |
314 | this, SLOT(slotTextRefClicked(const QString &)) ); | 314 | this, SLOT(slotTextRefClicked(const QString &)) ); |
315 | connect( this, SIGNAL(sigNumVersesChanged(int)), tw, SLOT(slotNumVersesChanged(int)) ); | 315 | connect( this, SIGNAL(sigNumVersesChanged(int)), tw, SLOT(slotNumVersesChanged(int)) ); |
316 | connect( this, SIGNAL(sigFontChanged(const QFont *)), tw, SLOT(slotFontChanged(const QFont *)) ); | 316 | connect( this, SIGNAL(sigFontChanged(const QFont *)), tw, SLOT(slotFontChanged(const QFont *)) ); |
317 | connect( this, SIGNAL(sigOptionChanged()), tw, SLOT(slotOptionChanged()) ); | 317 | connect( this, SIGNAL(sigOptionChanged()), tw, SLOT(slotOptionChanged()) ); |
318 | 318 | ||
319 | m_tabs.addTab( tw, icon, modulename ); | 319 | m_tabs.addTab( tw, icon, modulename ); |
320 | 320 | ||
321 | m_actionTextClose->setEnabled( true ); | 321 | m_actionTextClose->setEnabled( true ); |
322 | m_actionEditCopy->setEnabled( true ); | 322 | m_actionEditCopy->setEnabled( true ); |
323 | m_actionBookmarkAdd->setEnabled( true ); | 323 | m_actionBookmarkAdd->setEnabled( true ); |
324 | 324 | ||
325 | // Set key if one is present | 325 | // Set key if one is present |
326 | if ( !key.isNull() ) | 326 | if ( !key.isNull() ) |
327 | tw->setKey( key ); | 327 | tw->setKey( key ); |
328 | setCaption( QString( "%1 - Dagger" ).arg( tw->getFullKey() ) ); | ||
329 | m_navToolbar->setKey( tw->getAbbrevKey() ); | ||
328 | } | 330 | } |
329 | } | 331 | } |
330 | } | 332 | } |
331 | 333 | ||
332 | int MainWindow::findBookmark( const QString &bookmark ) | 334 | int MainWindow::findBookmark( const QString &bookmark ) |
333 | { | 335 | { |
334 | int index = 3; | 336 | int index = 3; |
335 | int id = m_bookmarkMenu->idAt( index ); | 337 | int id = m_bookmarkMenu->idAt( index ); |
336 | while ( ( id != -1 ) && ( m_bookmarkMenu->text( id ) != bookmark ) ) | 338 | while ( ( id != -1 ) && ( m_bookmarkMenu->text( id ) != bookmark ) ) |
337 | { | 339 | { |
338 | ++index; | 340 | ++index; |
339 | id = m_bookmarkMenu->idAt( index ); | 341 | id = m_bookmarkMenu->idAt( index ); |
340 | } | 342 | } |
341 | 343 | ||
342 | return id; | 344 | return id; |
343 | } | 345 | } |
@@ -621,38 +623,39 @@ void MainWindow::slotNavPrevPage() | |||
621 | } | 623 | } |
622 | } | 624 | } |
623 | 625 | ||
624 | void MainWindow::slotNavPrevVerse() | 626 | void MainWindow::slotNavPrevVerse() |
625 | { | 627 | { |
626 | TextWidget *text = reinterpret_cast<TextWidget *>(m_tabs.currentWidget()); | 628 | TextWidget *text = reinterpret_cast<TextWidget *>(m_tabs.currentWidget()); |
627 | if ( text ) | 629 | if ( text ) |
628 | { | 630 | { |
629 | text->prevVerse(); | 631 | text->prevVerse(); |
630 | setCaption( QString( "%1 - Dagger" ).arg( text->getFullKey() ) ); | 632 | setCaption( QString( "%1 - Dagger" ).arg( text->getFullKey() ) ); |
631 | m_navToolbar->setKey( text->getAbbrevKey() ); | 633 | m_navToolbar->setKey( text->getAbbrevKey() ); |
632 | } | 634 | } |
633 | } | 635 | } |
634 | 636 | ||
635 | void MainWindow::slotNavKeyChanged( const QString &newKey ) | 637 | void MainWindow::slotNavKeyChanged( const QString &newKey ) |
636 | { | 638 | { |
637 | QString key = newKey; | ||
638 | key.replace( QRegExp( "[-=.]" ), ":" ); | ||
639 | |||
640 | TextWidget *text = reinterpret_cast<TextWidget *>(m_tabs.currentWidget()); | 639 | TextWidget *text = reinterpret_cast<TextWidget *>(m_tabs.currentWidget()); |
641 | if ( text ) | 640 | if ( text ) |
642 | { | 641 | { |
642 | QString key = newKey; | ||
643 | if ( text->isBibleText() ) | ||
644 | key.replace( QRegExp( "[-=.]" ), ":" ); | ||
645 | |||
643 | text->setKey( key ); | 646 | text->setKey( key ); |
644 | setCaption( QString( "%1 - Dagger" ).arg( text->getFullKey() ) ); | 647 | setCaption( QString( "%1 - Dagger" ).arg( text->getFullKey() ) ); |
645 | } | 648 | } |
646 | } | 649 | } |
647 | 650 | ||
648 | void MainWindow::slotNavNextVerse() | 651 | void MainWindow::slotNavNextVerse() |
649 | { | 652 | { |
650 | TextWidget *text = reinterpret_cast<TextWidget *>(m_tabs.currentWidget()); | 653 | TextWidget *text = reinterpret_cast<TextWidget *>(m_tabs.currentWidget()); |
651 | if ( text ) | 654 | if ( text ) |
652 | { | 655 | { |
653 | text->nextVerse(); | 656 | text->nextVerse(); |
654 | setCaption( QString( "%1 - Dagger" ).arg( text->getFullKey() ) ); | 657 | setCaption( QString( "%1 - Dagger" ).arg( text->getFullKey() ) ); |
655 | m_navToolbar->setKey( text->getAbbrevKey() ); | 658 | m_navToolbar->setKey( text->getAbbrevKey() ); |
656 | } | 659 | } |
657 | } | 660 | } |
658 | 661 | ||
@@ -686,68 +689,61 @@ void MainWindow::slotNavScrollRateChanged( int newRate ) | |||
686 | 689 | ||
687 | void MainWindow::slotSearchResultClicked( const QString &key ) | 690 | void MainWindow::slotSearchResultClicked( const QString &key ) |
688 | { | 691 | { |
689 | TextWidget *text = reinterpret_cast<TextWidget *>(m_tabs.currentWidget()); | 692 | TextWidget *text = reinterpret_cast<TextWidget *>(m_tabs.currentWidget()); |
690 | if ( text ) | 693 | if ( text ) |
691 | { | 694 | { |
692 | text->setKey( key ); | 695 | text->setKey( key ); |
693 | setCaption( QString( "%1 - Dagger" ).arg( text->getFullKey() ) ); | 696 | setCaption( QString( "%1 - Dagger" ).arg( text->getFullKey() ) ); |
694 | m_navToolbar->setKey( text->getAbbrevKey() ); | 697 | m_navToolbar->setKey( text->getAbbrevKey() ); |
695 | } | 698 | } |
696 | } | 699 | } |
697 | 700 | ||
698 | void MainWindow::slotTextRefClicked( const QString &ref ) | 701 | void MainWindow::slotTextRefClicked( const QString &ref ) |
699 | { | 702 | { |
700 | //printf( "Ref clicked: '%s'\n", ref.latin1() ); | 703 | //printf( "Ref clicked: '%s'\n", ref.latin1() ); |
701 | /* | 704 | /* |
702 | Ref clicked: 'type=Strongs value=G3482' | 705 | Ref clicked: 'passagestudy.jsp?action=showStrongs&type=Hebrew&value=07225' |
703 | Ref clicked: 'type=Strongs value=H07225' | 706 | Ref clicked: 'passagestudy.jsp?action=showStrongs&type=Greek&value=602' |
704 | Ref clicked: 'type=morph class=x-Robinson:N-PRI value=N-PRI' | 707 | Ref clicked: 'passagestudy.jsp?action=showMorph&type=x-Robinson%3AN-NSF&value=N-NSF' |
705 | Ref clicked: 'type=morph class=x-StrongsMorph:TH8804 value=TH8804' | 708 | Ref clicked: 'passagestudy.jsp?action=showNote&type=n&value=1&module=KJV&passage=Genesis+1%3A5' |
706 | */ | 709 | */ |
707 | //owarn << "Reference: " << ref << oendl; | 710 | //owarn << "Reference: " << ref << oendl; |
708 | if ( !ref.isNull() ) | 711 | if ( !ref.isNull() ) |
709 | { | 712 | { |
710 | TextWidget *text = reinterpret_cast<TextWidget *>(m_tabs.currentWidget()); | 713 | TextWidget *text = reinterpret_cast<TextWidget *>(m_tabs.currentWidget()); |
711 | if ( text ) | 714 | if ( text ) |
712 | { | 715 | { |
716 | // Parse action | ||
717 | int pos = ref.find( '&', 28 ); | ||
718 | QString actionStr = ref.mid( 28, pos - 28 ); | ||
719 | |||
713 | // Parse type | 720 | // Parse type |
714 | int pos = ref.find( "type=", 0, false ) + 5; | 721 | pos = ref.find( "type=", pos, false ) + 5; |
715 | QString typeStr = ref.mid( pos, ref.find( ' ', pos ) - pos ); | 722 | QString typeStr = ref.mid( pos, ref.find( '&', pos ) - pos ); |
716 | 723 | ||
717 | // Parse class (for morph. only) | ||
718 | QString classStr; | ||
719 | if ( typeStr == "morph" ) | ||
720 | { | ||
721 | pos = ref.find( "class=", 0, false ) + 5; | ||
722 | QString classStr = ref.mid( pos, ref.find( ' ', pos ) - pos ); | ||
723 | |||
724 | // TODO - need to strip 'x-' from beginning and ':key' at end? | ||
725 | } | ||
726 | |||
727 | // Parse value | 724 | // Parse value |
728 | pos = ref.find( "value=", 0, false ) + 6; | 725 | pos = ref.find( "value=", 0, false ) + 6; |
729 | QString valueStr = ref.mid( pos, ref.find( ' ', pos ) - pos ); | 726 | QString valueStr = ref.mid( pos, ref.find( ' ', pos ) - pos ); |
730 | 727 | ||
731 | if ( typeStr == "Strongs" ) | 728 | if ( actionStr == "Strongs" ) |
729 | { | ||
730 | QString module = actionStr; | ||
731 | module.append( typeStr ); | ||
732 | |||
733 | // Open reference | ||
734 | openModule( module, valueStr ); | ||
735 | } | ||
736 | else if ( actionStr == "Morph" ) | ||
732 | { | 737 | { |
733 | //Determine if is a Hebrew or Greek reference | 738 | QString module = typeStr.mid( 2, typeStr.find( '%', 2 ) - 2 ); |
734 | QString module; | 739 | |
735 | if ( valueStr.at( 0 ) == 'H' ) | ||
736 | module = "StrongsHebrew"; | ||
737 | else | ||
738 | module = "StrongsGreek"; | ||
739 | |||
740 | // Get key | ||
741 | QString key( valueStr ); | ||
742 | key.remove( 0, 1 ); | ||
743 | // Open reference | 740 | // Open reference |
744 | openModule( module, key ); | 741 | openModule( module, valueStr ); |
745 | } | 742 | } |
746 | else if ( typeStr == "morph" ) | 743 | else if ( actionStr == "Note" ) |
747 | { | 744 | { |
748 | QMessageBox::information( this, tr( "Morphological Tags" ), | 745 | // TODO |
749 | tr( "Morphological tag cross-referencing not implemented yet." ) ); | ||
750 | } | 746 | } |
751 | } | 747 | } |
752 | } | 748 | } |
753 | } | 749 | } |
diff --git a/noncore/apps/dagger/opie-dagger.control b/noncore/apps/dagger/opie-dagger.control index 4ded1f2..e613ddb 100644 --- a/noncore/apps/dagger/opie-dagger.control +++ b/noncore/apps/dagger/opie-dagger.control | |||
@@ -1,9 +1,9 @@ | |||
1 | Package: opie-dagger | 1 | Package: opie-dagger |
2 | Files: plugins/application/libdagger.so* bin/dagger pics/dagger apps/Applications/dagger.desktop | 2 | Files: plugins/application/libdagger.so* bin/dagger pics/dagger apps/Applications/dagger.desktop |
3 | Priority: optional | 3 | Priority: optional |
4 | Section: opie/applications | 4 | Section: opie/applications |
5 | Depends: task-opie-minimal, libopiecore2, libopieui2 | 5 | Depends: task-opie-minimal, libopiecore2, libopieui2 |
6 | Architecture: arm | 6 | Architecture: arm |
7 | Maintainer: Dan Williams (drw@handhelds.org) | 7 | Maintainer: Dan Williams (drw@handhelds.org) |
8 | Description: A Bible study program utilizing the Sword library. | 8 | Description: A Bible study program utilizing the Sword library. |
9 | Version: 0.9.1$EXTRAVERSION | 9 | Version: 0.9.2$EXTRAVERSION |
diff --git a/noncore/apps/dagger/searchbar.cpp b/noncore/apps/dagger/searchbar.cpp index b195f67..463a19f 100644 --- a/noncore/apps/dagger/searchbar.cpp +++ b/noncore/apps/dagger/searchbar.cpp | |||
@@ -78,33 +78,33 @@ SearchBar::SearchBar( QMainWindow *parent ) | |||
78 | m_actionNext->addTo( this ); | 78 | m_actionNext->addTo( this ); |
79 | m_actionNext->setWhatsThis( tr( "Tap here to view the next search result." ) ); | 79 | m_actionNext->setWhatsThis( tr( "Tap here to view the next search result." ) ); |
80 | connect( m_actionNext, SIGNAL(activated()), this, SLOT(slotNext()) ); | 80 | connect( m_actionNext, SIGNAL(activated()), this, SLOT(slotNext()) ); |
81 | 81 | ||
82 | if ( parent ) | 82 | if ( parent ) |
83 | { | 83 | { |
84 | installEventFilter( parent ); | 84 | installEventFilter( parent ); |
85 | // TODO - install for all controls | 85 | // TODO - install for all controls |
86 | m_searchText->installEventFilter( parent ); | 86 | m_searchText->installEventFilter( parent ); |
87 | } | 87 | } |
88 | } | 88 | } |
89 | 89 | ||
90 | void SearchBar::setCurrModule( TextWidget *currText ) | 90 | void SearchBar::setCurrModule( TextWidget *currText ) |
91 | { | 91 | { |
92 | m_actionFind->setEnabled( ( m_searchText->text() != "" ) && currText ); | 92 | m_actionFind->setEnabled( ( m_searchText->text() != "" ) && currText ); |
93 | 93 | ||
94 | if ( !m_currText || ( currText->getModuleName() != m_currText->getModuleName() ) ) | 94 | if ( !m_currText || !currText || ( currText->getModuleName() != m_currText->getModuleName() ) ) |
95 | { | 95 | { |
96 | m_actionPrev->setEnabled( false ); | 96 | m_actionPrev->setEnabled( false ); |
97 | m_resultList->clear(); | 97 | m_resultList->clear(); |
98 | m_resultList->setEnabled( false ); | 98 | m_resultList->setEnabled( false ); |
99 | m_actionNext->setEnabled( false ); | 99 | m_actionNext->setEnabled( false ); |
100 | } | 100 | } |
101 | 101 | ||
102 | m_currText = currText; | 102 | m_currText = currText; |
103 | } | 103 | } |
104 | 104 | ||
105 | void SearchBar::slotTextChanged( const QString &newText ) | 105 | void SearchBar::slotTextChanged( const QString &newText ) |
106 | { | 106 | { |
107 | m_actionFind->setEnabled( ( newText != "" ) && m_currText ); | 107 | m_actionFind->setEnabled( ( newText != "" ) && m_currText ); |
108 | } | 108 | } |
109 | 109 | ||
110 | void SearchBar::slotFind() | 110 | void SearchBar::slotFind() |