summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-gutenbrowser/LibraryDialog.cpp
Side-by-side diff
Diffstat (limited to 'noncore/apps/opie-gutenbrowser/LibraryDialog.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/opie-gutenbrowser/LibraryDialog.cpp92
1 files changed, 48 insertions, 44 deletions
diff --git a/noncore/apps/opie-gutenbrowser/LibraryDialog.cpp b/noncore/apps/opie-gutenbrowser/LibraryDialog.cpp
index 5b22b00..270a4cf 100644
--- a/noncore/apps/opie-gutenbrowser/LibraryDialog.cpp
+++ b/noncore/apps/opie-gutenbrowser/LibraryDialog.cpp
@@ -15,2 +15,6 @@
+#include "LibraryDialog.h"
+#include "output.h"
+
+/* OPIE */
#include <qpe/applnk.h>
@@ -18,6 +22,5 @@
#include <qpe/qpedialog.h>
+#include <opie2/odebug.h>
-#include "LibraryDialog.h"
-#include "output.h"
-
+/* QT */
#include <qpushbutton.h>
@@ -26,2 +29,3 @@
+/* STD */
#include <unistd.h>
@@ -66,3 +70,3 @@ LibraryDialog::LibraryDialog( QWidget* parent, const char* name , bool modal, W
ftp_host=config.readEntry("SiteName", "sailor.gutenberg.org");
- qDebug("Library Dialog: ftp_host is "+ftp_host);
+ odebug << "Library Dialog: ftp_host is "+ftp_host << oendl;
// ftp_host=ftp_host.right(ftp_host.length()-(ftp_host.find(") ",0,TRUE)+1) );
@@ -79,3 +83,3 @@ LibraryDialog::LibraryDialog( QWidget* parent, const char* name , bool modal, W
downDir =config.readEntry( "DownloadDirectory",local_library);
- qDebug("downDir is "+downDir);
+ odebug << "downDir is "+downDir << oendl;
newindexLib.setName( old_index);
@@ -101,3 +105,3 @@ void LibraryDialog::Newlibrary()
#ifndef Q_WS_QWS //sorry embedded gutenbrowser cant use zip files
- //qDebug("Opening new library index %s",newindexLib);
+ //odebug << "Opening new library index " << newindexLib << "" << oendl;
if ( newindexLib.open( IO_ReadOnly) ) {
@@ -123,3 +127,3 @@ void LibraryDialog::Newlibrary()
if (authBox->isChecked()) { // this reverses the first name and last name of the author
- // qDebug("Sorting last name first");
+ // odebug << "Sorting last name first" << oendl;
QString lastName, firstName="";
@@ -182,3 +186,3 @@ void LibraryDialog::Library()
- qDebug("opening GUTINDEX.ALL file");
+ odebug << "opening GUTINDEX.ALL file" << oendl;
IDontKnowWhy = "";
@@ -202,3 +206,3 @@ void LibraryDialog::Library()
file = file.left( file.find("]",0,TRUE));
- //qDebug("file is "+file);
+ //odebug << "file is "+file << oendl;
/// number = indexLine.mid( indexLine.find( "]", 0, TRUE ) +1, indexLine.find( " ", 0, TRUE )+1 );
@@ -209,6 +213,6 @@ void LibraryDialog::Library()
title = title.stripWhiteSpace();
- //qDebug("title is "+title);
+ //odebug << "title is "+title << oendl;
getAuthor(); // grok author
author = author.stripWhiteSpace();
- //qDebug("author is "+author);
+ //odebug << "author is "+author << oendl;
if (authBox->isChecked() == TRUE) { // this reverses the first name and last name of the author
@@ -399,4 +403,4 @@ void LibraryDialog::select_title( QListViewItem * item)
item = 0;
- qDebug( "string from librarydialog is:%s %s %s", DlglistItemYear.latin1(),DlglistItemFile.latin1(),DlglistItemNumber.latin1());
- qDebug("Title is "+DlglistItemTitle);
+ odebug << "string from librarydialog is:" << DlglistItemYear << " " << DlglistItemFile << " " << DlglistItemNumber << "" << oendl;
+ odebug << "Title is "+DlglistItemTitle << oendl;
@@ -406,3 +410,3 @@ void LibraryDialog::select_title( QListViewItem * item)
if(download_Etext()) {
- // qDebug("get here 2");
+ // odebug << "get here 2" << oendl;
if(i_binary == 1) {
@@ -425,3 +429,3 @@ bool LibraryDialog::download_Etext()
- qDebug("about to network dialog");
+ odebug << "about to network dialog" << oendl;
QString NewlistItemNumber, NewlistItemYear, ls_result, result_line, s, dir, networkUrl, outputFile;
@@ -433,3 +437,3 @@ bool LibraryDialog::download_Etext()
NewlistItemFile.replace( 0,4, DlglistItemFile.left(4));
- qDebug("NewlistItemFile is now "+NewlistItemFile);
+ odebug << "NewlistItemFile is now "+NewlistItemFile << oendl;
}
@@ -437,3 +441,3 @@ bool LibraryDialog::download_Etext()
int NewlistItemYear_Int = NewlistItemYear.toInt(0, 10);
- qDebug(NewlistItemYear);
+ odebug << NewlistItemYear << oendl;
if (NewlistItemYear_Int < 91 && NewlistItemYear_Int > 70) {
@@ -449,4 +453,4 @@ bool LibraryDialog::download_Etext()
outputFile=local_library+".guten_temp";
- //qDebug("Download file:%s",NewlistItemFile.latin1() );
- qDebug("Checking: "+ftp_host+" "+dir+" "+outputFile+" "+NewlistItemFile);
+ //odebug << "Download file:" << NewlistItemFile << "" << oendl;
+ odebug << "Checking: "+ftp_host+" "+dir+" "+outputFile+" "+NewlistItemFile << oendl;
QStringList networkList;
@@ -464,4 +468,4 @@ bool LibraryDialog::download_Etext()
File_Name= NetworkDlg->localFileName;
- qDebug("back to Library from Network Dialog");
- qDebug("Just downloaded "+NetworkDlg->localFileName);
+ odebug << "back to Library from Network Dialog" << oendl;
+ odebug << "Just downloaded "+NetworkDlg->localFileName << oendl;
@@ -470,3 +474,3 @@ bool LibraryDialog::download_Etext()
// File_Name.replace(0,local_library.length(),downDir);
- // qDebug("File_Name now is "+File_Name);
+ // odebug << "File_Name now is "+File_Name << oendl;
@@ -475,3 +479,3 @@ bool LibraryDialog::download_Etext()
if(NetworkDlg->successDownload) {
- qDebug("Filename is "+File_Name);
+ odebug << "Filename is "+File_Name << oendl;
if(File_Name.right(4)==".txt") {
@@ -483,3 +487,3 @@ bool LibraryDialog::download_Etext()
- qDebug("Filename is now "+File_Name);
+ odebug << "Filename is now "+File_Name << oendl;
@@ -492,10 +496,10 @@ bool LibraryDialog::download_Etext()
- qDebug("Setting doclink");
+ odebug << "Setting doclink" << oendl;
DocLnk lnk;
- qDebug("name is "+name_file);
+ odebug << "name is "+name_file << oendl;
lnk.setName(name_file); //sets file name
- qDebug("Title is "+DlglistItemTitle);
+ odebug << "Title is "+DlglistItemTitle << oendl;
lnk.setComment(DlglistItemTitle);
- qDebug("Filename is "+File_Name);
+ odebug << "Filename is "+File_Name << oendl;
lnk.setFile(File_Name); //sets File property
@@ -505,3 +509,3 @@ bool LibraryDialog::download_Etext()
if(!lnk.writeLink()) {
- qDebug("Writing doclink did not work");
+ odebug << "Writing doclink did not work" << oendl;
} else {
@@ -572,4 +576,4 @@ bool LibraryDialog::setTitle()
Config config("Gutenbrowser");
- qDebug("setting title");
- qDebug(DlglistItemTitle);
+ odebug << "setting title" << oendl;
+ odebug << DlglistItemTitle << oendl;
@@ -579,3 +583,3 @@ bool LibraryDialog::setTitle()
DlglistItemTitle.replace(DlglistItemTitle.find("]",0,TRUE),1, ")" );
- qDebug("Title being set is "+DlglistItemTitle);
+ odebug << "Title being set is "+DlglistItemTitle << oendl;
int test = 0;
@@ -740,3 +744,3 @@ void LibraryDialog::onButtonSearch()
texter = SearchResultsDialog->selText;
- // qDebug(texter);
+ // odebug << texter << oendl;
resultLs= SearchResultsDialog->resultsList;
@@ -751,3 +755,3 @@ void LibraryDialog::onButtonSearch()
texter.sprintf("%s \n",(*it).latin1());
- // qDebug(texter);
+ // odebug << texter << oendl;
if( tester!=texter)
@@ -808,3 +812,3 @@ void LibraryDialog::parseSearchResults( QString resultStr)
// if (exit==QMessageBox::Yes) {
- // qDebug("Issuing the command "+cmd);
+ // odebug << "Issuing the command "+cmd << oendl;
// #if defined(_WS_WIN_)
@@ -842,3 +846,3 @@ bool LibraryDialog::getItem(QListViewItem *it)
{
- // qDebug("selected getItem");
+ // odebug << "selected getItem" << oendl;
@@ -860,3 +864,3 @@ bool LibraryDialog::onButtonDownload()
{
- // qDebug("selected onButtonDownloadz");
+ // odebug << "selected onButtonDownloadz" << oendl;
@@ -902,3 +906,3 @@ void LibraryDialog::comboSelect(int index)
{
- // qDebug("we are sorting");
+ // odebug << "we are sorting" << oendl;
ListView1->setSorting( index, TRUE);
@@ -932,3 +936,3 @@ void LibraryDialog::newList()
if( chdir(QPEApplication::qpeDir()+"etc/gutenbrowser") == 0) {
- qDebug("changing dir "+QPEApplication::qpeDir()+"etc/gutenbrowser");
+ odebug << "changing dir "+QPEApplication::qpeDir()+"etc/gutenbrowser" << oendl;
QString gutenindex1 = QPEApplication::qpeDir()+"etc/gutenbrowser/GUTINDEX.ALL";
@@ -953,3 +957,3 @@ void LibraryDialog::newList()
} else {
- qDebug("Issuing the command\n"+cmd);
+ odebug << "Issuing the command\n"+cmd << oendl;
// system(cmd);
@@ -967,3 +971,3 @@ void LibraryDialog::newList()
// if( rename(gutenindex1.latin1(),gutenindex.latin1()) !=0)
- // qDebug("renaming error");
+ // odebug << "renaming error" << oendl;
// }
@@ -1026,3 +1030,3 @@ bool LibraryDialog::moreInfo()
if(titleString.length()>2) {
- qDebug( "Title is "+titleString );
+ odebug << "Title is "+titleString << oendl;
titleString.replace( QRegExp("\\s"), "%20");
@@ -1050,3 +1054,3 @@ void LibraryDialog::FindLibrary()
indexLib.setName( new_index);
- qDebug("index file is "+ new_index);
+ odebug << "index file is "+ new_index << oendl;
Newlibrary();
@@ -1055,3 +1059,3 @@ void LibraryDialog::FindLibrary()
indexLib.setName( old_index);
- qDebug("new index nameis "+ old_index);
+ odebug << "new index nameis "+ old_index << oendl;
Library();