author | llornkcor <llornkcor> | 2004-07-08 08:37:19 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2004-07-08 08:37:19 (UTC) |
commit | a53291faf419c90bf22db7cd6d6f26dece2053c1 (patch) (unidiff) | |
tree | d0a5a10621b8705502cc87bde43e18de39042be6 | |
parent | a7b08ae7dbce8675981321828e61c949968d1afe (diff) | |
download | opie-a53291faf419c90bf22db7cd6d6f26dece2053c1.zip opie-a53291faf419c90bf22db7cd6d6f26dece2053c1.tar.gz opie-a53291faf419c90bf22db7cd6d6f26dece2053c1.tar.bz2 |
rework view, fix bookmarking
-rw-r--r-- | noncore/apps/opie-gutenbrowser/gutenbrowser.cpp | 33 | ||||
-rw-r--r-- | noncore/apps/opie-gutenbrowser/gutenbrowser.h | 1 | ||||
-rw-r--r-- | noncore/apps/opie-gutenbrowser/gutenbrowserData.cpp | 17 |
3 files changed, 33 insertions, 18 deletions
diff --git a/noncore/apps/opie-gutenbrowser/gutenbrowser.cpp b/noncore/apps/opie-gutenbrowser/gutenbrowser.cpp index be920dd..d0af114 100644 --- a/noncore/apps/opie-gutenbrowser/gutenbrowser.cpp +++ b/noncore/apps/opie-gutenbrowser/gutenbrowser.cpp | |||
@@ -163,3 +163,3 @@ Gutenbrowser::Gutenbrowser(QWidget *,const char*, WFlags ) | |||
163 | qDebug("Suppose we open somethin"); | 163 | qDebug("Suppose we open somethin"); |
164 | load(qApp->argv()[i]); | 164 | if(!load(qApp->argv()[i])) return; |
165 | } | 165 | } |
@@ -172,2 +172,3 @@ Gutenbrowser::Gutenbrowser(QWidget *,const char*, WFlags ) | |||
172 | writeConfig(); | 172 | writeConfig(); |
173 | QTimer::singleShot( 250, this, SLOT(hideView()) ); | ||
173 | } //end init | 174 | } //end init |
@@ -412,3 +413,3 @@ void Gutenbrowser::ForwardBtn() { | |||
412 | Lview->insertLine( s, -1); | 413 | Lview->insertLine( s, -1); |
413 | odebug << s << oendl; | 414 | // odebug << s << oendl; |
414 | currentLine++; | 415 | currentLine++; |
@@ -581,3 +582,3 @@ void Gutenbrowser::BeginBtn() { | |||
581 | pageStopArray[i_pageNum ] = currentFilePos; | 582 | pageStopArray[i_pageNum ] = currentFilePos; |
582 | odebug << "new page number " << i_pageNum << ", found at " << currentFilePos << "" << oendl; | 583 | // odebug << "new page number " << i_pageNum << ", found at " << currentFilePos << "" << oendl; |
583 | } | 584 | } |
@@ -652,2 +653,3 @@ void Gutenbrowser::setBookmark() { | |||
652 | cfg.writeEntry( "Page Number", QString::number( i_pageNum) ); | 653 | cfg.writeEntry( "Page Number", QString::number( i_pageNum) ); |
654 | cfg.write(); | ||
653 | bookmarksMenu->insertItem( title); | 655 | bookmarksMenu->insertItem( title); |
@@ -693,3 +695,3 @@ void Gutenbrowser::Bookmark( int itemId) { | |||
693 | 695 | ||
694 | load(file_name); | 696 | if(!load(file_name)) return; |
695 | 697 | ||
@@ -710,3 +712,3 @@ void Gutenbrowser::Bookmark( int itemId) { | |||
710 | pageStopArray[i_pageNum ] = currentFilePos; | 712 | pageStopArray[i_pageNum ] = currentFilePos; |
711 | odebug << "new page number " << i_pageNum << ", found at " << currentFilePos << "" << oendl; | 713 | // odebug << "new page number " << i_pageNum << ", found at " << currentFilePos << "" << oendl; |
712 | } | 714 | } |
@@ -749,5 +751,7 @@ bool Gutenbrowser::load( const char *fileName) { | |||
749 | odebug << "sizeHint " << sizeHint().height() << " pageSize " << Lview->PageSize() << "" << oendl; | 751 | odebug << "sizeHint " << sizeHint().height() << " pageSize " << Lview->PageSize() << "" << oendl; |
752 | // pointSize = Lview->fontInfo().pointSize(); | ||
753 | // odebug << "sizeHint " << sizeHint().height() << " point size " << pointSize << "" << oendl; | ||
750 | if( Lview->PageSize() < 4) { | 754 | if( Lview->PageSize() < 4) { |
751 | 755 | ||
752 | Lview->setMaximumHeight( sizeHint().height() ); | 756 | //Lview->setMaximumHeight( sizeHint().height() ); |
753 | Lview->setMinimumHeight( sizeHint().height() ); | 757 | Lview->setMinimumHeight( sizeHint().height() ); |
@@ -755,3 +759,3 @@ bool Gutenbrowser::load( const char *fileName) { | |||
755 | odebug << "sizeHint " << sizeHint().height() << " point size " << pointSize << "" << oendl; | 759 | odebug << "sizeHint " << sizeHint().height() << " point size " << pointSize << "" << oendl; |
756 | if(pointSize < 10) | 760 | if(pointSize < 15) |
757 | Lview->setFixedVisibleLines(19); | 761 | Lview->setFixedVisibleLines(19); |
@@ -764,2 +768,3 @@ bool Gutenbrowser::load( const char *fileName) { | |||
764 | cfg.writeEntry("Current",fileName); | 768 | cfg.writeEntry("Current",fileName); |
769 | cfg.write(); | ||
765 | currentLine=0; | 770 | currentLine=0; |
@@ -809,3 +814,3 @@ bool Gutenbrowser::load( const char *fileName) { | |||
809 | Lview->setMaxLines(Lview->PageSize()*2); | 814 | Lview->setMaxLines(Lview->PageSize()*2); |
810 | odebug << "Gulped " << currentLine << "" << oendl; | 815 | // odebug << "Gulped " << currentLine << "" << oendl; |
811 | setCaption(title); | 816 | setCaption(title); |
@@ -1038,3 +1043,3 @@ void Gutenbrowser::LibraryBtn() { | |||
1038 | // QCopEnvelope ( "QPE/System", "busy()" ); | 1043 | // QCopEnvelope ( "QPE/System", "busy()" ); |
1039 | load( file_name); | 1044 | if( !load( file_name)) return; |
1040 | } else { | 1045 | } else { |
@@ -1082,3 +1087,3 @@ void Gutenbrowser::OpenBtn() { | |||
1082 | // QCopEnvelope ( "QPE/System", "busy()" ); | 1087 | // QCopEnvelope ( "QPE/System", "busy()" ); |
1083 | load(file_name); | 1088 | if(!load(file_name)) return; |
1084 | } else { | 1089 | } else { |
@@ -1780,3 +1785,3 @@ void Gutenbrowser::listClickedSlot( QListBoxItem * index) { | |||
1780 | if( Lview->isVisible()) | 1785 | if( Lview->isVisible()) |
1781 | load(file); | 1786 | if(!load(file)) return; |
1782 | 1787 | ||
@@ -1808,3 +1813,4 @@ void Gutenbrowser::infoGutenbrowser() { | |||
1808 | void Gutenbrowser::setDocument(const QString & frozenBoogers) { | 1813 | void Gutenbrowser::setDocument(const QString & frozenBoogers) { |
1809 | this->hide(); | 1814 | // this->hide(); |
1815 | qWarning("\nXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXSET DOCUMENT\n"); | ||
1810 | if(showMainList) { | 1816 | if(showMainList) { |
@@ -1819,5 +1825,6 @@ void Gutenbrowser::setDocument(const QString & frozenBoogers) { | |||
1819 | lnk = DocLnk(frozenBoogers); | 1825 | lnk = DocLnk(frozenBoogers); |
1826 | qWarning("open "+frozenBoogers); | ||
1820 | // odebug << lnk.file() << oendl; | 1827 | // odebug << lnk.file() << oendl; |
1821 | title=lnk.comment(); | 1828 | title=lnk.comment(); |
1822 | load( lnk.file()); | 1829 | if(!load( lnk.file())) return; |
1823 | this->show(); | 1830 | this->show(); |
diff --git a/noncore/apps/opie-gutenbrowser/gutenbrowser.h b/noncore/apps/opie-gutenbrowser/gutenbrowser.h index acb6e59..2958f01 100644 --- a/noncore/apps/opie-gutenbrowser/gutenbrowser.h +++ b/noncore/apps/opie-gutenbrowser/gutenbrowser.h | |||
@@ -164,2 +164,3 @@ protected: | |||
164 | protected slots: | 164 | protected slots: |
165 | void hideView(); | ||
165 | 166 | ||
diff --git a/noncore/apps/opie-gutenbrowser/gutenbrowserData.cpp b/noncore/apps/opie-gutenbrowser/gutenbrowserData.cpp index 9473ba9..c93dbc5 100644 --- a/noncore/apps/opie-gutenbrowser/gutenbrowserData.cpp +++ b/noncore/apps/opie-gutenbrowser/gutenbrowserData.cpp | |||
@@ -315,3 +315,3 @@ void Gutenbrowser::initView() | |||
315 | mainList = new QListBox(this,"mainlist"); | 315 | mainList = new QListBox(this,"mainlist"); |
316 | 316 | mainList->hide(); | |
317 | // QPEApplication::setStylusOperation( mainList->viewport(),QPEApplication::RightOnHold); | 317 | // QPEApplication::setStylusOperation( mainList->viewport(),QPEApplication::RightOnHold); |
@@ -323,6 +323,7 @@ void Gutenbrowser::initView() | |||
323 | 323 | ||
324 | if(!showMainList) { | 324 | // if(!showMainList) { |
325 | Lview->setText( "\nThis is gutenbrowser for the Sharp Zaurus.\nMake your self at home, sit back, relax and read something great. "); | 325 | // Lview->setText( "\nThis is gutenbrowser for the Sharp Zaurus.\nMake your self at home, sit back, relax and read something great. "); |
326 | } else | 326 | // } |
327 | Lview->hide(); | 327 | // else |
328 | // Lview->hide(); | ||
328 | 329 | ||
@@ -331 +332,7 @@ void Gutenbrowser::initView() | |||
331 | } | 332 | } |
333 | |||
334 | void Gutenbrowser::hideView() { | ||
335 | // qWarning("Hide View"); | ||
336 | mainList->show(); | ||
337 | Lview->hide(); | ||
338 | } | ||