summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-gutenbrowser/openetext.cpp
authormickeyl <mickeyl>2004-04-09 14:06:05 (UTC)
committer mickeyl <mickeyl>2004-04-09 14:06:05 (UTC)
commit5f294a018a0f44a6547485bc73a095cd0c153903 (patch) (side-by-side diff)
treeea19ba0afea3e8d4a226719a3590cf11e5fc5178 /noncore/apps/opie-gutenbrowser/openetext.cpp
parent208a155ee480e5c1ae0fd6e8876a6ffea7f1c4a5 (diff)
downloadopie-5f294a018a0f44a6547485bc73a095cd0c153903.zip
opie-5f294a018a0f44a6547485bc73a095cd0c153903.tar.gz
opie-5f294a018a0f44a6547485bc73a095cd0c153903.tar.bz2
libopie1 --> libopie2
Diffstat (limited to 'noncore/apps/opie-gutenbrowser/openetext.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-gutenbrowser/openetext.cpp35
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
@@ -16,15 +16,16 @@
#include "openetext.h"
#include "editTitle.h"
-#include <qfileinfo.h>
+/* OPIE */
+#include <opie2/ofiledialog.h>
#include <qpe/applnk.h>
+#include <qpe/config.h>
#include <qpe/qpeapplication.h>
+using namespace Opie::Ui;
#include <stdlib.h>
#include <qtextstream.h>
-#include <qpe/config.h>
-
-#include <opie/ofiledialog.h>
+#include <qfileinfo.h>
#if defined(_WS_WIN_)
#include <windows.h>
@@ -149,13 +150,13 @@ OpenFileButton->setDown(TRUE);
// }
if( filer.right(4) == ".txt"
- || filer.right(4) == ".TXT"
- || filer.right(4) == ".etx"
- || filer.right(4) == ".ETX"
- || filer.right(4) == ".etx"
- || filer.right(4) == ".ETX"
- || filer.right(4) == ".zip"
- || filer.right(4) == ".ZIP" ) {
+ || filer.right(4) == ".TXT"
+ || filer.right(4) == ".etx"
+ || filer.right(4) == ".ETX"
+ || filer.right(4) == ".etx"
+ || filer.right(4) == ".ETX"
+ || filer.right(4) == ".zip"
+ || filer.right(4) == ".ZIP" ) {
QFileInfo zipFile( filer);
QString s_fileName = zipFile.fileName();
QString cmd;
@@ -178,10 +179,10 @@ OpenFileButton->setDown(TRUE);
// qDebug("Filename is now "+fileName);
}
} else
- fileName = str;
-
+ fileName = str;
+
FindTitle(fileName);
-
+
QFileInfo fi( fileName);
name_file = fi.fileName();
name_file = name_file.left(name_file.length() - 4);
@@ -224,7 +225,7 @@ bool OpenEtext::FindTitle( QString filename)
// int Titlenumber=0;
if ( indexLib.open( IO_ReadOnly) ) {
- qDebug("file opened successfully");
+ qDebug("file opened successfully");
QTextStream indexStream( &indexLib );
QString target = "Project Gutenberg Etext of";
QString target2 = "Project Gutenberg Etext";
@@ -264,8 +265,8 @@ bool OpenEtext::FindTitle( QString filename)
// qDebug("Found the title 4 and it is %s", title.latin1());
}
} //endof file
- indexLib.close();
-
+ indexLib.close();
+
if( !findCheck || title.length() < 2) {
qDebug("Trying hard to find title from GUTINDEX.ALL");
title = titleFromLibrary( filename);