-rw-r--r-- | noncore/apps/opie-gutenbrowser/LibraryDialog.cpp | 2 | ||||
-rw-r--r-- | noncore/apps/opie-gutenbrowser/gutenbrowser.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/noncore/apps/opie-gutenbrowser/LibraryDialog.cpp b/noncore/apps/opie-gutenbrowser/LibraryDialog.cpp index 3b540c5..58babe9 100644 --- a/noncore/apps/opie-gutenbrowser/LibraryDialog.cpp +++ b/noncore/apps/opie-gutenbrowser/LibraryDialog.cpp @@ -883,97 +883,97 @@ bool LibraryDialog::onButtonDownload() for ( ; it4.current(); ++it4 ) { if ( it4.current()->isSelected() ) getItem(it4.current()); it4.current()->setSelected(false); } for ( ; it5.current(); ++it5 ) { if ( it5.current()->isSelected() ) getItem(it5.current()); it5.current()->setSelected(false); } return true; } /* handles the sorting combo box */ void LibraryDialog::comboSelect(int index) { // //odebug << "we are sorting" << oendl; ListView1->setSorting( index, true); ListView2->setSorting( index, true); ListView3->setSorting( index, true); ListView4->setSorting( index, true); ListView5->setSorting( index, true); ListView1->sort(); ListView2->sort(); ListView3->sort(); ListView4->sort(); ListView5->sort(); // ListView1->triggerUpdate(); // ListView2->triggerUpdate(); // ListView3->triggerUpdate(); // ListView4->triggerUpdate(); // ListView5->triggerUpdate(); } void LibraryDialog::newList() { if(indexLoaded) { onButtonDownload(); } else { Output *outDlg; buttonNewList->setDown(true); //odebug << "changing dir "+QPEApplication::qpeDir()+"etc/gutenbrowser" << oendl; QString gutenindex1 = local_library + "/GUTINDEX.ALL"; - QString cmd="wget -O " + gutenindex1 + " http://sailor.gutenberg.org/GUTINDEX.ALL 2>&1"; + QString cmd="wget -O " + gutenindex1 + " http://www.gutenberg.org/dirs/GUTINDEX.ALL 2>&1"; int result = QMessageBox::warning( this,"Download" ,"<p>Ok to use /'wget/' to download a new library list?</P>" ,"Yes","No",0,0,1); qApp->processEvents(); if(result == 0) { outDlg = new Output( 0, tr("Downloading Gutenberg Index...."),true); outDlg->showMaximized(); outDlg->show(); qApp->processEvents(); FILE *fp; char line[130]; outDlg->OutputEdit->append( tr("Running wget") ); outDlg->OutputEdit->setCursorPosition(outDlg->OutputEdit->numLines() + 1,0,false); sleep(1); fp = popen( (const char *) cmd, "r"); if ( !fp ) { } else { //odebug << "Issuing the command\n"+cmd << oendl; // system(cmd); while ( fgets( line, sizeof line, fp)) { outDlg->OutputEdit->append(line); outDlg->OutputEdit->setCursorPosition(outDlg->OutputEdit->numLines() + 1,0,false); } pclose(fp); outDlg->OutputEdit->append("Finished downloading\n"); outDlg->OutputEdit->setCursorPosition(outDlg->OutputEdit->numLines() + 1,0,false); qApp->processEvents(); // if( QFile(gutenindex1).exists() ) { // QString gutenindex=QPEApplication::qpeDir()+"etc/gutenbrowser/GUTINDEX.ALL"; // if( rename(gutenindex1.latin1(),gutenindex.latin1()) !=0) // //odebug << "renaming error" << oendl; // } } // outDlg->close(); FindLibrary(); if(outDlg) delete outDlg; } buttonNewList->setDown(false); // if(outDlg) // delete outDlg; } } bool LibraryDialog::moreInfo() diff --git a/noncore/apps/opie-gutenbrowser/gutenbrowser.cpp b/noncore/apps/opie-gutenbrowser/gutenbrowser.cpp index e639d4d..733db17 100644 --- a/noncore/apps/opie-gutenbrowser/gutenbrowser.cpp +++ b/noncore/apps/opie-gutenbrowser/gutenbrowser.cpp @@ -337,97 +337,97 @@ void Gutenbrowser::DownloadIndex() { #ifndef Q_WS_QWS { switch( QMessageBox::information( 0, (tr("Download Library Index, or FTP sites?")), (tr("Do you want to download the newest\n" "Project Gutenberg Library Index?\n" "or select an ftp site?\n")), (tr("&Library Index")), (tr("&Ftp Site")), (tr("&Cancel")), 2, 2 ) ) { case 0: // index clicked, downloadLibIndex(); break; case 1: // ftp selected downloadFtpList(); break; case 2: // Cancel break; }; } #endif } // end DownloadIndex void Gutenbrowser::downloadFtpList() { // QString cmd="wget http://www.promo.net/pg/list.html"); //system(cmd); qApp->processEvents(); optionsDialog* optDlg; optDlg = new optionsDialog( this,"Options_Dlg", true); optDlg->getSite(); if(optDlg) delete optDlg; } void Gutenbrowser::downloadLibIndex() { // QString dwmloader = local_library + "pgwhole.zip"; // QString cmd = "lynx -source http://www.gutenberg.net/pgwhole.zip | cat >> " + dwmloader; // system(cmd); // QString outputFile= local_library+ "GUTINDEX.ALL"; // config.setGroup( "FTPsite" ); // ftp server config // ftp_host=config.readEntry("SiteName", ""); // ftp_base_dir= config.readEntry("base", ""); // QString networkUrl= "ftp://"+ftp_host+ftp_base_dir+"/GUTINDEX.ALL"; QDir dir( local_library); dir.cd("", TRUE); - goGetit( "http://sailor.gutenberg.org/GUTINDEX.ALL", false); // until ghttp works on binaries -qt3 + goGetit( "http://www.gutenberg.org/dirs/GUTINDEX.ALL", false); // until ghttp works on binaries -qt3 // goGetit( "http://www.gutenberg.net/pgwhole.zip", true); // until ghttp works on binaries -qt3 // NetworkDialog *NetworkDlg; // NetworkDlg = new NetworkDialog( this,"Network Protocol Dialog", TRUE, 0, networkUrl, outputFile ); // if( NetworkDlg->exec() != 0 ) // { // use new, improved, *INSTANT* network-dialog-file-getterer //// QMessageBox::message("Note",""); // } // if(NetworkDlg) // delete NetworkDlg; } void Gutenbrowser::PrintBtn() { } void Gutenbrowser::SearchBtn() { if( loadCheck) { odebug << "loadCheck: we have a loaded doc" << oendl; Search(); } // else // QMessageBox::message("Note","Sorry, can't search. No etext is loaded"); } void Gutenbrowser::ForwardBtn() { if( !ForwardButton->autoRepeat() && !ForwardButton->isDown()) { QString s; QString insertString; int pageSize= Lview->PageSize(); Lview->clear(); for(int fd=0; fd < pageSize - 1;fd++) { f.readLine(s, 256); if(useWrap) s.replace(QRegExp("\n"),""); insertString+=s; Lview->insertLine( s, -1); // odebug << s << oendl; currentLine++; } // Lview->insertAt( insertString,0,0, FALSE); currentFilePos = f.at(); // if( i_pageNum != pages) { // Lview->MultiLine_Ex::pageDown( FALSE); i_pageNum++; |