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 @@ -18,5 +18,8 @@ -#include <qfileinfo.h> +/* OPIE */ +#include <opie2/ofiledialog.h> #include <qpe/applnk.h> +#include <qpe/config.h> #include <qpe/qpeapplication.h> +using namespace Opie::Ui; @@ -24,5 +27,3 @@ #include <qtextstream.h> -#include <qpe/config.h> - -#include <opie/ofiledialog.h> +#include <qfileinfo.h> @@ -151,9 +152,9 @@ 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); @@ -180,6 +181,6 @@ OpenFileButton->setDown(TRUE); } else - fileName = str; - + fileName = str; + FindTitle(fileName); - + QFileInfo fi( fileName); @@ -226,3 +227,3 @@ bool OpenEtext::FindTitle( QString filename) if ( indexLib.open( IO_ReadOnly) ) { - qDebug("file opened successfully"); + qDebug("file opened successfully"); QTextStream indexStream( &indexLib ); @@ -266,4 +267,4 @@ bool OpenEtext::FindTitle( QString filename) } //endof file - indexLib.close(); - + indexLib.close(); + if( !findCheck || title.length() < 2) { |