summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-gutenbrowser/LibraryDialog.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/noncore/apps/opie-gutenbrowser/LibraryDialog.cpp b/noncore/apps/opie-gutenbrowser/LibraryDialog.cpp
index 157a3da..5b22b00 100644
--- a/noncore/apps/opie-gutenbrowser/LibraryDialog.cpp
+++ b/noncore/apps/opie-gutenbrowser/LibraryDialog.cpp
@@ -65,55 +65,55 @@ LibraryDialog::LibraryDialog( QWidget* parent, const char* name , bool modal, W
65 config.setGroup( "FTPsite" ); 65 config.setGroup( "FTPsite" );
66 ftp_host=config.readEntry("SiteName", "sailor.gutenberg.org"); 66 ftp_host=config.readEntry("SiteName", "sailor.gutenberg.org");
67 qDebug("Library Dialog: ftp_host is "+ftp_host); 67 qDebug("Library Dialog: ftp_host is "+ftp_host);
68 // ftp_host=ftp_host.right(ftp_host.length()-(ftp_host.find(") ",0,TRUE)+1) ); 68 // ftp_host=ftp_host.right(ftp_host.length()-(ftp_host.find(") ",0,TRUE)+1) );
69 // ftp_host=ftp_host.stripWhiteSpace(); 69 // ftp_host=ftp_host.stripWhiteSpace();
70 ftp_base_dir= config.readEntry("base", "/pub/gutenberg"); 70 ftp_base_dir= config.readEntry("base", "/pub/gutenberg");
71 71
72 i_binary = 0; 72 i_binary = 0;
73 73
74 config.setGroup("SortAuth"); 74 config.setGroup("SortAuth");
75 if( config.readEntry("authSort", "FALSE") == "TRUE") 75 if( config.readEntry("authSort", "FALSE") == "TRUE")
76 authBox->setChecked(TRUE); 76 authBox->setChecked(TRUE);
77 77
78 config.setGroup("General"); 78 config.setGroup("General");
79 downDir =config.readEntry( "DownloadDirectory",local_library); 79 downDir =config.readEntry( "DownloadDirectory",local_library);
80 qDebug("downDir is "+downDir); 80 qDebug("downDir is "+downDir);
81 newindexLib.setName( old_index); 81 newindexLib.setName( old_index);
82 indexLib.setName( old_index); 82 indexLib.setName( old_index);
83 83
84 new QPEDialogListener(this); 84 new QPEDialogListener(this);
85} 85}
86 86
87LibraryDialog::~LibraryDialog() 87LibraryDialog::~LibraryDialog()
88{ 88{
89 delete QList_Item2; 89 // delete QList_Item2;
90 delete QList_Item1; 90 // delete QList_Item1;
91 delete QList_Item3; 91 // delete QList_Item3;
92 delete QList_Item4; 92 // delete QList_Item4;
93 delete QList_Item5; 93 // delete QList_Item5;
94 94
95 saveConfig(); 95 //saveConfig();
96} 96}
97 97
98 /*This groks using PGWHOLE.TXT */ 98 /*This groks using PGWHOLE.TXT */
99void LibraryDialog::Newlibrary() 99void LibraryDialog::Newlibrary()
100{ 100{
101#ifndef Q_WS_QWS //sorry embedded gutenbrowser cant use zip files 101#ifndef Q_WS_QWS //sorry embedded gutenbrowser cant use zip files
102 //qDebug("Opening new library index %s",newindexLib); 102 //qDebug("Opening new library index %s",newindexLib);
103 if ( newindexLib.open( IO_ReadOnly) ) { 103 if ( newindexLib.open( IO_ReadOnly) ) {
104 setCaption( tr( "Library Index - using master pg index." ) );// file opened successfully 104 setCaption( tr( "Library Index - using master pg index." ) );// file opened successfully
105 QTextStream indexStream( &newindexLib ); 105 QTextStream indexStream( &newindexLib );
106 QString indexLine; 106 QString indexLine;
107 while ( !indexStream.atEnd() ) { // until end of file.. 107 while ( !indexStream.atEnd() ) { // until end of file..
108 indexLine = indexStream.readLine(); 108 indexLine = indexStream.readLine();
109 if ( ( indexLine.mid(4,4)).toInt() && !( indexLine.left(3)).toInt()) { 109 if ( ( indexLine.mid(4,4)).toInt() && !( indexLine.left(3)).toInt()) {
110 year = indexLine.mid(4,4); 110 year = indexLine.mid(4,4);
111 year = year.stripWhiteSpace(); 111 year = year.stripWhiteSpace();
112 file = indexLine.mid( indexLine.find( "[", 0, TRUE )+1, 12 ); 112 file = indexLine.mid( indexLine.find( "[", 0, TRUE )+1, 12 );
113 file = file.stripWhiteSpace(); 113 file = file.stripWhiteSpace();
114 number = indexLine.mid( indexLine.find( "]", 0, TRUE ) +1, indexLine.find( " ", 0, TRUE )+1 ); 114 number = indexLine.mid( indexLine.find( "]", 0, TRUE ) +1, indexLine.find( " ", 0, TRUE )+1 );
115 if( year.toInt() < 1984) 115 if( year.toInt() < 1984)
116 number = number.left( number.length() -1 ); 116 number = number.left( number.length() -1 );
117 number = number.stripWhiteSpace(); 117 number = number.stripWhiteSpace();
118 title = indexLine.mid( indexLine.find(" ", 26, TRUE), indexLine.length() ); 118 title = indexLine.mid( indexLine.find(" ", 26, TRUE), indexLine.length() );
119 title = title.stripWhiteSpace(); 119 title = title.stripWhiteSpace();