Diffstat (limited to 'noncore/apps/dagger/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/dagger/mainwindow.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/noncore/apps/dagger/mainwindow.cpp b/noncore/apps/dagger/mainwindow.cpp index ace8f36..b2e00e8 100644 --- a/noncore/apps/dagger/mainwindow.cpp +++ b/noncore/apps/dagger/mainwindow.cpp | |||
@@ -74,4 +74,7 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags /*fl*/ ) | |||
74 | MainWindow::~MainWindow() | 74 | MainWindow::~MainWindow() |
75 | { | 75 | { |
76 | // Re-enable screen blanking if it was disabled | ||
77 | QCopEnvelope( "QPE/System", "setScreenSaverMode(int)" ) << QPEApplication::Enable; | ||
78 | |||
76 | // Save Sword options | 79 | // Save Sword options |
77 | m_config.setGroup( "Sword" ); | 80 | m_config.setGroup( "Sword" ); |
@@ -170,9 +173,9 @@ void MainWindow::initUI() | |||
170 | m_navToolbar = new NavBar( this ); | 173 | m_navToolbar = new NavBar( this ); |
171 | m_navToolbar->navBtnsEnable( false ); | 174 | m_navToolbar->navBtnsEnable( false ); |
172 | connect( m_navToolbar, SIGNAL(prevChapter()), this, SLOT(slotNavPrevChapter()) ); | 175 | connect( m_navToolbar, SIGNAL(prevPage()), this, SLOT(slotNavPrevPage()) ); |
173 | connect( m_navToolbar, SIGNAL(prevVerse()), this, SLOT(slotNavPrevVerse()) ); | 176 | connect( m_navToolbar, SIGNAL(prevVerse()), this, SLOT(slotNavPrevVerse()) ); |
174 | connect( m_navToolbar, SIGNAL(keyChanged(const QString &)), this, SLOT(slotNavKeyChanged(const QString &)) ); | 177 | connect( m_navToolbar, SIGNAL(keyChanged(const QString &)), this, SLOT(slotNavKeyChanged(const QString &)) ); |
175 | connect( m_navToolbar, SIGNAL(nextVerse()), this, SLOT(slotNavNextVerse()) ); | 178 | connect( m_navToolbar, SIGNAL(nextVerse()), this, SLOT(slotNavNextVerse()) ); |
176 | connect( m_navToolbar, SIGNAL(nextChapter()), this, SLOT(slotNavNextChapter()) ); | 179 | connect( m_navToolbar, SIGNAL(nextPage()), this, SLOT(slotNavNextPage()) ); |
177 | connect( m_navToolbar, SIGNAL(autoScroll(bool)), this, SLOT(slotNavAutoScroll(bool)) ); | 180 | connect( m_navToolbar, SIGNAL(autoScroll(bool)), this, SLOT(slotNavAutoScroll(bool)) ); |
178 | connect( m_navToolbar, SIGNAL(scrollRateChanged(int)), this, SLOT(slotNavScrollRateChanged(int)) ); | 181 | connect( m_navToolbar, SIGNAL(scrollRateChanged(int)), this, SLOT(slotNavScrollRateChanged(int)) ); |
@@ -333,5 +336,5 @@ void MainWindow::enableScreenBlanking( bool enable ) | |||
333 | { | 336 | { |
334 | enable ? QCopEnvelope( "QPE/System", "setScreenSaverMode(int)" ) << QPEApplication::Enable | 337 | enable ? QCopEnvelope( "QPE/System", "setScreenSaverMode(int)" ) << QPEApplication::Enable |
335 | : QCopEnvelope( "QPE/System", "setScreenSaverMode(int)" ) << QPEApplication::Disable; | 338 | : QCopEnvelope( "QPE/System", "setScreenSaverMode(int)" ) << QPEApplication::DisableSuspend; |
336 | } | 339 | } |
337 | 340 | ||
@@ -598,10 +601,10 @@ void MainWindow::slotViewSearchToolbar( bool enabled ) | |||
598 | } | 601 | } |
599 | 602 | ||
600 | void MainWindow::slotNavPrevChapter() | 603 | void MainWindow::slotNavPrevPage() |
601 | { | 604 | { |
602 | TextWidget *text = reinterpret_cast<TextWidget *>(m_tabs.currentWidget()); | 605 | TextWidget *text = reinterpret_cast<TextWidget *>(m_tabs.currentWidget()); |
603 | if ( text ) | 606 | if ( text ) |
604 | { | 607 | { |
605 | text->prevChapter(); | 608 | text->prevPage(); |
606 | setCaption( QString( "%1 - Dagger" ).arg( text->getFullKey() ) ); | 609 | setCaption( QString( "%1 - Dagger" ).arg( text->getFullKey() ) ); |
607 | m_navToolbar->setKey( text->getAbbrevKey() ); | 610 | m_navToolbar->setKey( text->getAbbrevKey() ); |
@@ -644,10 +647,10 @@ void MainWindow::slotNavNextVerse() | |||
644 | } | 647 | } |
645 | 648 | ||
646 | void MainWindow::slotNavNextChapter() | 649 | void MainWindow::slotNavNextPage() |
647 | { | 650 | { |
648 | TextWidget *text = reinterpret_cast<TextWidget *>(m_tabs.currentWidget()); | 651 | TextWidget *text = reinterpret_cast<TextWidget *>(m_tabs.currentWidget()); |
649 | if ( text ) | 652 | if ( text ) |
650 | { | 653 | { |
651 | text->nextChapter(); | 654 | text->nextPage(); |
652 | setCaption( QString( "%1 - Dagger" ).arg( text->getFullKey() ) ); | 655 | setCaption( QString( "%1 - Dagger" ).arg( text->getFullKey() ) ); |
653 | m_navToolbar->setKey( text->getAbbrevKey() ); | 656 | m_navToolbar->setKey( text->getAbbrevKey() ); |