summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-gutenbrowser/gutenbrowser.cpp
Side-by-side diff
Diffstat (limited to 'noncore/apps/opie-gutenbrowser/gutenbrowser.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/opie-gutenbrowser/gutenbrowser.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/noncore/apps/opie-gutenbrowser/gutenbrowser.cpp b/noncore/apps/opie-gutenbrowser/gutenbrowser.cpp
index c7cdd83..413ab51 100644
--- a/noncore/apps/opie-gutenbrowser/gutenbrowser.cpp
+++ b/noncore/apps/opie-gutenbrowser/gutenbrowser.cpp
@@ -143,5 +143,5 @@ Gutenbrowser::Gutenbrowser(QWidget *,const char*, WFlags )
- // QString gutenIndex= local_library + "GUTINDEX.ALL";
- QString gutenIndex = QPEApplication::qpeDir()+ "etc/gutenbrowser/GUTINDEX.ALL";
+ QString gutenIndex = local_library + "/GUTINDEX.ALL";
qDebug("gutenindex "+gutenIndex );
+
if( QFile( gutenIndex).exists() ) {
@@ -149,3 +149,3 @@ Gutenbrowser::Gutenbrowser(QWidget *,const char*, WFlags )
} else {
- QString localLibIndexFile = QPEApplication::qpeDir()+ "etc/gutenbrowser/PGWHOLE.TXT";
+ QString localLibIndexFile = local_library + "/PGWHOLE.TXT";
// QString localLibIndexFile= local_library + "PGWHOLE.TXT";
@@ -199,24 +199,24 @@ void Gutenbrowser::InfoBarClick() {
void Gutenbrowser::goGetit( const QString &url, bool showMsg) {
- // int eexit=0;
QString cmd;
- // config.read();
qApp->processEvents();
- QString filename = QPEApplication::qpeDir();
- if(filename.right(1)!="/")
- filename+="/etc/gutenbrowser/";
- else
- filename+="etc/gutenbrowser/";
- odebug << "filename "+filename << oendl;
- // QString filename = QDir::homeDirPath()+"/Applications/gutenbrowser/";
- filename += url.right( url.length() - url.findRev("/",-1,TRUE) -1);
+ QString filename = local_library + "/GUTINDEX.ALL";
+// QString filename = old_index;
- Config config("Gutenbrowser");
- config.setGroup( "Browser" );
- QString brow = config.readEntry("Preferred", "Opera");
- odebug << "Preferred browser is "+brow << oendl;
+// filename += url.right( url.length() - url.findRev("/",-1,TRUE) -1);
+
+ Config cfg("Gutenbrowser");
+ cfg.setGroup("FTPsite");
+ ftp_host=cfg.readEntry("SiteName", "sailor.gutenberg.org");
+ ftp_base_dir= cfg.readEntry("base", "/pub/gutenberg");
+
+// Config config("Gutenbrowser");
+// config.setGroup( "Browser" );
+// QString brow = config.readEntry("Preferred", "Opera");
+// //odebug << "Preferred browser is "+brow << oendl;
if(!showMsg) { //if we just get the gutenindex.all
+// QString cmd="wget -O " + gutenindex1 + " http://sailor.gutenberg.org/GUTINDEX.ALL 2>&1";
cmd="wget -O " + filename +" " + url+" 2>&1" ;
chdir(local_library);
- odebug << "Issuing the system command: " << cmd << "" << oendl;
+// //odebug << "Issuing the system command: " << cmd << "" << oendl;
@@ -276,3 +276,3 @@ void Gutenbrowser::goGetit( const QString &url, bool showMsg) {
chdir(local_library);
- odebug << "Issuing the sys command: " << cmd << "" << oendl;
+// //odebug << "Issuing the sys command: " << cmd << "" << oendl;
system(cmd);