summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-gutenbrowser/browserDialog.cpp9
-rw-r--r--noncore/apps/opie-gutenbrowser/config.in6
-rw-r--r--noncore/apps/opie-gutenbrowser/openetext.cpp35
-rw-r--r--noncore/apps/opie-gutenbrowser/opie-gutenbrowser.pro9
4 files changed, 32 insertions, 27 deletions
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
@@ -7,15 +7,18 @@ copyright 2001 by L.J. Potter ljp@llornkcor.com
#include "optionsDialog.h"
//#include "fileBrowser.h"
+/* OPIE */
+#include <opie2/ofiledialog.h>
+using namespace Opie::Ui;
+
+/* QT */
#include <qlabel.h>
#include <qlistbox.h>
#include <qpushbutton.h>
#include <qlayout.h>
-#include <opie/ofiledialog.h>
-
void optionsDialog::BrowserDlg( )
{
// setCaption( tr( "Choose Browser" ) );
http_ListBox1->insertItem( tr( "Opera"));
@@ -70,9 +73,9 @@ void optionsDialog::BrowseSelected() {
}
void optionsDialog::setHttp(int index) {
- Config config("Gutenbrowser");
+ Config config("Gutenbrowser");
config.setGroup( "HttpServer" );
qDebug("writing http server");
if( index== 0) {
config.writeEntry("Preferred", "http://sailor.gutenberg.org");
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
@@ -15,17 +15,18 @@
#include "gutenbrowser.h"
#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>
#else
@@ -148,15 +149,15 @@ OpenFileButton->setDown(TRUE);
// // sMsg = "Error opening library filelist "+fileName;
// }
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;
@@ -177,12 +178,12 @@ OpenFileButton->setDown(TRUE);
fileName = s_fileName;
// 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);
@@ -223,9 +224,9 @@ bool OpenEtext::FindTitle( QString filename)
bool findCheck = FALSE;
// 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";
QString target3 = "Project Gutenberg's Etext of";
@@ -263,10 +264,10 @@ bool OpenEtext::FindTitle( QString filename)
title = title.stripWhiteSpace ();
// 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);
findCheck = TRUE;
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,7 +1,6 @@
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 \
helpme.h \
@@ -10,9 +9,9 @@ HEADERS = LibraryDialog.h \
editTitle.h \
fontDialog.h \
optionsDialog.h \
helpwindow.h \
- output.h \
+ output.h \
NetworkDialog.h \
gutenbrowser.h \
resource.h
SOURCES = LibraryDialog.cpp \
@@ -31,15 +30,15 @@ SOURCES = LibraryDialog.cpp \
optionsDialogData.cpp \
helpwindow.cpp \
output.cpp \
NetworkDialog.cpp \
- gutenbrowserData.cpp \
+ gutenbrowserData.cpp \
gutenbrowser.cpp \
main.cpp
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 )