From 5f294a018a0f44a6547485bc73a095cd0c153903 Mon Sep 17 00:00:00 2001 From: mickeyl Date: Fri, 09 Apr 2004 14:06:05 +0000 Subject: libopie1 --> libopie2 --- diff --git a/noncore/apps/opie-gutenbrowser/browserDialog.cpp b/noncore/apps/opie-gutenbrowser/browserDialog.cpp index 5c48da1..81dd516 100644 --- a/noncore/apps/opie-gutenbrowser/browserDialog.cpp +++ b/noncore/apps/opie-gutenbrowser/browserDialog.cpp @@ -8,13 +8,16 @@ copyright 2001 by L.J. Potter ljp@llornkcor.com #include "optionsDialog.h" //#include "fileBrowser.h" +/* OPIE */ +#include +using namespace Opie::Ui; + +/* QT */ #include #include #include #include -#include - void optionsDialog::BrowserDlg( ) { // setCaption( tr( "Choose Browser" ) ); @@ -71,7 +74,7 @@ void optionsDialog::BrowseSelected() { } void optionsDialog::setHttp(int index) { - Config config("Gutenbrowser"); + Config config("Gutenbrowser"); config.setGroup( "HttpServer" ); qDebug("writing http server"); if( index== 0) { diff --git a/noncore/apps/opie-gutenbrowser/config.in b/noncore/apps/opie-gutenbrowser/config.in index ec67d6e..d2a3033 100644 --- a/noncore/apps/opie-gutenbrowser/config.in +++ b/noncore/apps/opie-gutenbrowser/config.in @@ -1,4 +1,6 @@ - config OPIE-GUTENBROWSER + config GUTENBROWSER boolean "gutenbrowser - Gutenberg Project etext reader and selector" default "n" - depends ( LIBQPE || LIBQPE-X11 ) && FTPLIB + depends ( LIBQPE || LIBQPE-X11 ) && FTPLIB && LIBOPIE2CORE && LIBOPIE2UI + comment "gutenbrowser needs a libqpe, ftplib, libopie2core and libopie2ui" + depends !(( LIBQPE || LIBQPE-X11 ) && FTPLIB && LIBOPIE2CORE && LIBOPIE2UI) 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 +/* OPIE */ +#include #include +#include #include +using namespace Opie::Ui; #include #include -#include - -#include +#include #if defined(_WS_WIN_) #include @@ -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); diff --git a/noncore/apps/opie-gutenbrowser/opie-gutenbrowser.pro b/noncore/apps/opie-gutenbrowser/opie-gutenbrowser.pro index e34e922..5c1d0c4 100644 --- a/noncore/apps/opie-gutenbrowser/opie-gutenbrowser.pro +++ b/noncore/apps/opie-gutenbrowser/opie-gutenbrowser.pro @@ -1,6 +1,5 @@ TEMPLATE = app -CONFIG += qt warn_on release quick-app -#CONFIG += qt warn_on release qpp +CONFIG += qt warn_on quick-app HEADERS = LibraryDialog.h \ SearchDialog.h \ SearchResults.h \ @@ -11,7 +10,7 @@ HEADERS = LibraryDialog.h \ fontDialog.h \ optionsDialog.h \ helpwindow.h \ - output.h \ + output.h \ NetworkDialog.h \ gutenbrowser.h \ resource.h @@ -32,7 +31,7 @@ SOURCES = LibraryDialog.cpp \ helpwindow.cpp \ output.cpp \ NetworkDialog.cpp \ - gutenbrowserData.cpp \ + gutenbrowserData.cpp \ gutenbrowser.cpp \ main.cpp TARGET = gutenbrowser @@ -40,6 +39,6 @@ TARGET = gutenbrowser INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include DESTDIR = $(OPIEDIR)/bin -LIBS += -lqpe -lpthread -lftplib -lopie +LIBS += -lqpe -lpthread -lftplib -lopiecore2 -lopieui2 include ( $(OPIEDIR)/include.pro ) -- cgit v0.9.0.2