Diffstat (limited to 'noncore/apps/opie-gutenbrowser/openetext.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-gutenbrowser/openetext.cpp | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/noncore/apps/opie-gutenbrowser/openetext.cpp b/noncore/apps/opie-gutenbrowser/openetext.cpp index 40f35d6..bd44ce6 100644 --- a/noncore/apps/opie-gutenbrowser/openetext.cpp +++ b/noncore/apps/opie-gutenbrowser/openetext.cpp | |||
@@ -17,13 +17,14 @@ | |||
17 | #include "editTitle.h" | 17 | #include "editTitle.h" |
18 | 18 | ||
19 | #include <qfileinfo.h> | 19 | /* OPIE */ |
20 | #include <opie2/ofiledialog.h> | ||
20 | #include <qpe/applnk.h> | 21 | #include <qpe/applnk.h> |
22 | #include <qpe/config.h> | ||
21 | #include <qpe/qpeapplication.h> | 23 | #include <qpe/qpeapplication.h> |
24 | using namespace Opie::Ui; | ||
22 | 25 | ||
23 | #include <stdlib.h> | 26 | #include <stdlib.h> |
24 | #include <qtextstream.h> | 27 | #include <qtextstream.h> |
25 | #include <qpe/config.h> | 28 | #include <qfileinfo.h> |
26 | |||
27 | #include <opie/ofiledialog.h> | ||
28 | 29 | ||
29 | #if defined(_WS_WIN_) | 30 | #if defined(_WS_WIN_) |
@@ -150,11 +151,11 @@ OpenFileButton->setDown(TRUE); | |||
150 | 151 | ||
151 | if( filer.right(4) == ".txt" | 152 | if( filer.right(4) == ".txt" |
152 | || filer.right(4) == ".TXT" | 153 | || filer.right(4) == ".TXT" |
153 | || filer.right(4) == ".etx" | 154 | || filer.right(4) == ".etx" |
154 | || filer.right(4) == ".ETX" | 155 | || filer.right(4) == ".ETX" |
155 | || filer.right(4) == ".etx" | 156 | || filer.right(4) == ".etx" |
156 | || filer.right(4) == ".ETX" | 157 | || filer.right(4) == ".ETX" |
157 | || filer.right(4) == ".zip" | 158 | || filer.right(4) == ".zip" |
158 | || filer.right(4) == ".ZIP" ) { | 159 | || filer.right(4) == ".ZIP" ) { |
159 | QFileInfo zipFile( filer); | 160 | QFileInfo zipFile( filer); |
160 | QString s_fileName = zipFile.fileName(); | 161 | QString s_fileName = zipFile.fileName(); |
@@ -179,8 +180,8 @@ OpenFileButton->setDown(TRUE); | |||
179 | } | 180 | } |
180 | } else | 181 | } else |
181 | fileName = str; | 182 | fileName = str; |
182 | 183 | ||
183 | FindTitle(fileName); | 184 | FindTitle(fileName); |
184 | 185 | ||
185 | QFileInfo fi( fileName); | 186 | QFileInfo fi( fileName); |
186 | name_file = fi.fileName(); | 187 | name_file = fi.fileName(); |
@@ -225,5 +226,5 @@ bool OpenEtext::FindTitle( QString filename) | |||
225 | 226 | ||
226 | if ( indexLib.open( IO_ReadOnly) ) { | 227 | if ( indexLib.open( IO_ReadOnly) ) { |
227 | qDebug("file opened successfully"); | 228 | qDebug("file opened successfully"); |
228 | QTextStream indexStream( &indexLib ); | 229 | QTextStream indexStream( &indexLib ); |
229 | QString target = "Project Gutenberg Etext of"; | 230 | QString target = "Project Gutenberg Etext of"; |
@@ -265,6 +266,6 @@ bool OpenEtext::FindTitle( QString filename) | |||
265 | } | 266 | } |
266 | } //endof file | 267 | } //endof file |
267 | indexLib.close(); | 268 | indexLib.close(); |
268 | 269 | ||
269 | if( !findCheck || title.length() < 2) { | 270 | if( !findCheck || title.length() < 2) { |
270 | qDebug("Trying hard to find title from GUTINDEX.ALL"); | 271 | qDebug("Trying hard to find title from GUTINDEX.ALL"); |