summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-gutenbrowser/gutenbrowser.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/noncore/apps/opie-gutenbrowser/gutenbrowser.cpp b/noncore/apps/opie-gutenbrowser/gutenbrowser.cpp
index d0af114..644fae8 100644
--- a/noncore/apps/opie-gutenbrowser/gutenbrowser.cpp
+++ b/noncore/apps/opie-gutenbrowser/gutenbrowser.cpp
@@ -125,28 +125,28 @@ Gutenbrowser::Gutenbrowser(QWidget *,const char*, WFlags )
125 int i_numofFiles = s_numofFiles.toInt(); 125 int i_numofFiles = s_numofFiles.toInt();
126 126
127 QString tempFileName; 127 QString tempFileName;
128 128
129 for (int i = 0; i <= i_numofFiles; i++) { 129 for (int i = 0; i <= i_numofFiles; i++) {
130 // tempFileName.setNum(i); 130 // tempFileName.setNum(i);
131 config.setGroup( "Files" ); 131 config.setGroup( "Files" );
132 QString ramble = config.readEntry( QString::number(i), "" ); 132 QString ramble = config.readEntry( QString::number(i), "" );
133 133
134 config.setGroup( "Titles" ); 134 config.setGroup( "Titles" );
135 QString tempTitle = config.readEntry( ramble, ""); 135 QString tempTitle = config.readEntry( ramble, "");
136 config.setGroup( tempTitle); 136 config.setGroup( tempTitle);
137 int index=config.readNumEntry( "LineNumber", -1 ); 137 int index = config.readNumEntry( "LineNumber", -1 );
138 if( index != -1) { 138 if( index != -1) {
139 odebug << tempTitle << oendl; 139 odebug << tempTitle << oendl;
140 bookmarksMenu->insertItem( tempTitle); 140 if(!tempTitle.isEmpty()) bookmarksMenu->insertItem( tempTitle);
141 } 141 }
142 } 142 }
143 143
144 // QString gutenIndex= local_library + "GUTINDEX.ALL"; 144 // QString gutenIndex= local_library + "GUTINDEX.ALL";
145 QString gutenIndex = QPEApplication::qpeDir()+ "/etc/gutenbrowser/GUTINDEX.ALL"; 145 QString gutenIndex = QPEApplication::qpeDir()+ "/etc/gutenbrowser/GUTINDEX.ALL";
146 qDebug("gutenindex "+gutenIndex ); 146 qDebug("gutenindex "+gutenIndex );
147 if( QFile( gutenIndex).exists() ) { 147 if( QFile( gutenIndex).exists() ) {
148 indexLib.setName( gutenIndex); 148 indexLib.setName( gutenIndex);
149 } else { 149 } else {
150 QString localLibIndexFile = QPEApplication::qpeDir()+ "/etc/gutenbrowser/PGWHOLE.TXT"; 150 QString localLibIndexFile = QPEApplication::qpeDir()+ "/etc/gutenbrowser/PGWHOLE.TXT";
151 // QString localLibIndexFile= local_library + "PGWHOLE.TXT"; 151 // QString localLibIndexFile= local_library + "PGWHOLE.TXT";
152 newindexLib.setName( localLibIndexFile); 152 newindexLib.setName( localLibIndexFile);
@@ -552,25 +552,25 @@ void Gutenbrowser::BeginBtn() {
552 QString s_pattern="*END*THE SMALL PRINT"; 552 QString s_pattern="*END*THE SMALL PRINT";
553 QString sPattern2 = "*END THE SMALL PRINT"; 553 QString sPattern2 = "*END THE SMALL PRINT";
554 554
555 int pageSize = Lview->PageSize(); 555 int pageSize = Lview->PageSize();
556 Lview->clear(); 556 Lview->clear();
557 557
558 // int lines = Lview->numLines(); 558 // int lines = Lview->numLines();
559 int pos = 0;//, i = 0; 559 int pos = 0;//, i = 0;
560 int i_topRow = Lview->topRow(); 560 int i_topRow = Lview->topRow();
561 561
562 QString LeftText;// = Lview->text(); 562 QString LeftText;// = Lview->text();
563 563
564 int linesPerPage = Lview->lastRow() - Lview->topRow(); 564 // int linesPerPage = Lview->lastRow() - Lview->topRow();
565 // int pages = (( linesPerPage / Lview->editSize() ) ) +1; 565 // int pages = (( linesPerPage / Lview->editSize() ) ) +1;
566 // int pageN = 0; 566 // int pageN = 0;
567 i_pageNum = 1; 567 i_pageNum = 1;
568 int lastPage=1; 568 int lastPage=1;
569 int lineNo=0; 569 int lineNo=0;
570 QString s; 570 QString s;
571 f.at( 0); 571 f.at( 0);
572 572
573 while ( !f.atEnd() ) { 573 while ( !f.atEnd() ) {
574 f.readLine(s, 256); 574 f.readLine(s, 256);
575 lineNo++; 575 lineNo++;
576 LeftText = s; 576 LeftText = s;