Diffstat (limited to 'noncore/apps/opie-gutenbrowser/gutenbrowser.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-gutenbrowser/gutenbrowser.cpp | 38 |
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 | |||
@@ -141,13 +141,13 @@ Gutenbrowser::Gutenbrowser(QWidget *,const char*, WFlags ) | |||
141 | } | 141 | } |
142 | } | 142 | } |
143 | 143 | ||
144 | // QString gutenIndex= local_library + "GUTINDEX.ALL"; | 144 | QString gutenIndex = local_library + "/GUTINDEX.ALL"; |
145 | QString gutenIndex = QPEApplication::qpeDir()+ "etc/gutenbrowser/GUTINDEX.ALL"; | ||
146 | qDebug("gutenindex "+gutenIndex ); | 145 | qDebug("gutenindex "+gutenIndex ); |
146 | |||
147 | if( QFile( gutenIndex).exists() ) { | 147 | if( QFile( gutenIndex).exists() ) { |
148 | indexLib.setName( gutenIndex); | 148 | indexLib.setName( gutenIndex); |
149 | } else { | 149 | } else { |
150 | QString localLibIndexFile = QPEApplication::qpeDir()+ "etc/gutenbrowser/PGWHOLE.TXT"; | 150 | QString localLibIndexFile = local_library + "/PGWHOLE.TXT"; |
151 | // QString localLibIndexFile= local_library + "PGWHOLE.TXT"; | 151 | // QString localLibIndexFile= local_library + "PGWHOLE.TXT"; |
152 | newindexLib.setName( localLibIndexFile); | 152 | newindexLib.setName( localLibIndexFile); |
153 | } | 153 | } |
@@ -197,28 +197,28 @@ void Gutenbrowser::InfoBarClick() { | |||
197 | /* | 197 | /* |
198 | download http with wget or preferred browser */ | 198 | download http with wget or preferred browser */ |
199 | void Gutenbrowser::goGetit( const QString &url, bool showMsg) { | 199 | void Gutenbrowser::goGetit( const QString &url, bool showMsg) { |
200 | // int eexit=0; | ||
201 | QString cmd; | 200 | QString cmd; |
202 | // config.read(); | ||
203 | qApp->processEvents(); | 201 | qApp->processEvents(); |
204 | QString filename = QPEApplication::qpeDir(); | ||
205 | if(filename.right(1)!="/") | ||
206 | filename+="/etc/gutenbrowser/"; | ||
207 | else | ||
208 | filename+="etc/gutenbrowser/"; | ||
209 | odebug << "filename "+filename << oendl; | ||
210 | // QString filename = QDir::homeDirPath()+"/Applications/gutenbrowser/"; | ||
211 | 202 | ||
212 | filename += url.right( url.length() - url.findRev("/",-1,TRUE) -1); | 203 | QString filename = local_library + "/GUTINDEX.ALL"; |
204 | // QString filename = old_index; | ||
213 | 205 | ||
214 | Config config("Gutenbrowser"); | 206 | // filename += url.right( url.length() - url.findRev("/",-1,TRUE) -1); |
215 | config.setGroup( "Browser" ); | 207 | |
216 | QString brow = config.readEntry("Preferred", "Opera"); | 208 | Config cfg("Gutenbrowser"); |
217 | odebug << "Preferred browser is "+brow << oendl; | 209 | cfg.setGroup("FTPsite"); |
210 | ftp_host=cfg.readEntry("SiteName", "sailor.gutenberg.org"); | ||
211 | ftp_base_dir= cfg.readEntry("base", "/pub/gutenberg"); | ||
212 | |||
213 | // Config config("Gutenbrowser"); | ||
214 | // config.setGroup( "Browser" ); | ||
215 | // QString brow = config.readEntry("Preferred", "Opera"); | ||
216 | // //odebug << "Preferred browser is "+brow << oendl; | ||
218 | if(!showMsg) { //if we just get the gutenindex.all | 217 | if(!showMsg) { //if we just get the gutenindex.all |
218 | // QString cmd="wget -O " + gutenindex1 + " http://sailor.gutenberg.org/GUTINDEX.ALL 2>&1"; | ||
219 | cmd="wget -O " + filename +" " + url+" 2>&1" ; | 219 | cmd="wget -O " + filename +" " + url+" 2>&1" ; |
220 | chdir(local_library); | 220 | chdir(local_library); |
221 | odebug << "Issuing the system command: " << cmd << "" << oendl; | 221 | // //odebug << "Issuing the system command: " << cmd << "" << oendl; |
222 | 222 | ||
223 | Output *outDlg; | 223 | Output *outDlg; |
224 | 224 | ||
@@ -274,7 +274,7 @@ void Gutenbrowser::goGetit( const QString &url, bool showMsg) { | |||
274 | } | 274 | } |
275 | 275 | ||
276 | chdir(local_library); | 276 | chdir(local_library); |
277 | odebug << "Issuing the sys command: " << cmd << "" << oendl; | 277 | // //odebug << "Issuing the sys command: " << cmd << "" << oendl; |
278 | system(cmd); | 278 | system(cmd); |
279 | } | 279 | } |
280 | } | 280 | } |