Diffstat (limited to 'noncore/apps/opie-gutenbrowser/browserDialog.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/opie-gutenbrowser/browserDialog.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/noncore/apps/opie-gutenbrowser/browserDialog.cpp b/noncore/apps/opie-gutenbrowser/browserDialog.cpp index 81dd516..cc05d04 100644 --- a/noncore/apps/opie-gutenbrowser/browserDialog.cpp +++ b/noncore/apps/opie-gutenbrowser/browserDialog.cpp | |||
@@ -1,24 +1,25 @@ | |||
1 | /**************************************************************************** | 1 | /**************************************************************************** |
2 | copyright 2001 by L.J. Potter ljp@llornkcor.com | 2 | copyright 2001 by L.J. Potter ljp@llornkcor.com |
3 | copyright : (C) 2000 -2004 by llornkcor | 3 | copyright : (C) 2000 -2004 by llornkcor |
4 | email : ljp@llornkcor.com | 4 | email : ljp@llornkcor.com |
5 | 5 | ||
6 | ****************************************************************************/ | 6 | ****************************************************************************/ |
7 | 7 | ||
8 | #include "optionsDialog.h" | 8 | #include "optionsDialog.h" |
9 | //#include "fileBrowser.h" | 9 | //#include "fileBrowser.h" |
10 | 10 | ||
11 | /* OPIE */ | 11 | /* OPIE */ |
12 | #include <opie2/ofiledialog.h> | 12 | #include <opie2/ofiledialog.h> |
13 | #include <opie2/odebug.h> | ||
13 | using namespace Opie::Ui; | 14 | using namespace Opie::Ui; |
14 | 15 | ||
15 | /* QT */ | 16 | /* QT */ |
16 | #include <qlabel.h> | 17 | #include <qlabel.h> |
17 | #include <qlistbox.h> | 18 | #include <qlistbox.h> |
18 | #include <qpushbutton.h> | 19 | #include <qpushbutton.h> |
19 | #include <qlayout.h> | 20 | #include <qlayout.h> |
20 | 21 | ||
21 | void optionsDialog::BrowserDlg( ) | 22 | void optionsDialog::BrowserDlg( ) |
22 | { | 23 | { |
23 | // setCaption( tr( "Choose Browser" ) ); | 24 | // setCaption( tr( "Choose Browser" ) ); |
24 | http_ListBox1->insertItem( tr( "Opera")); | 25 | http_ListBox1->insertItem( tr( "Opera")); |
@@ -43,44 +44,44 @@ void optionsDialog::BrowseSelected() { | |||
43 | QMap<QString, QStringList> map; | 44 | QMap<QString, QStringList> map; |
44 | map.insert(tr("All"), QStringList() ); | 45 | map.insert(tr("All"), QStringList() ); |
45 | QStringList text; | 46 | QStringList text; |
46 | text << "text/*"; | 47 | text << "text/*"; |
47 | map.insert(tr("Text"), text ); | 48 | map.insert(tr("Text"), text ); |
48 | text << "*"; | 49 | text << "*"; |
49 | map.insert(tr("All"), text ); | 50 | map.insert(tr("All"), text ); |
50 | 51 | ||
51 | QString str = OFileDialog::getOpenFileName( 2, dir , QString::null, map); | 52 | QString str = OFileDialog::getOpenFileName( 2, dir , QString::null, map); |
52 | if( !str.isEmpty() && QFile(str).exists() && !QFileInfo(str).isDir() ) { | 53 | if( !str.isEmpty() && QFile(str).exists() && !QFileInfo(str).isDir() ) { |
53 | fileName = str; | 54 | fileName = str; |
54 | // QStringList fileList=browseForFiles->fileList; | 55 | // QStringList fileList=browseForFiles->fileList; |
55 | // qDebug(selFile); | 56 | // odebug << selFile << oendl; |
56 | // QStringList::ConstIterator f; | 57 | // QStringList::ConstIterator f; |
57 | // QString fileTemp,filer; | 58 | // QString fileTemp,filer; |
58 | // for ( f = fileList.begin(); f != fileList.end(); f++ ) { | 59 | // for ( f = fileList.begin(); f != fileList.end(); f++ ) { |
59 | 60 | ||
60 | // fileTemp = *f; | 61 | // fileTemp = *f; |
61 | // fileTemp.right( fileTemp.length()-5); | 62 | // fileTemp.right( fileTemp.length()-5); |
62 | // fileName = fileTemp; | 63 | // fileName = fileTemp; |
63 | // if( !fileName.isEmpty() ){ | 64 | // if( !fileName.isEmpty() ){ |
64 | // filer = fileName; | 65 | // filer = fileName; |
65 | // } else { | 66 | // } else { |
66 | // QString sMsg; | 67 | // QString sMsg; |
67 | // sMsg = "Error opening library filelist "+fileName; | 68 | // sMsg = "Error opening library filelist "+fileName; |
68 | // } | 69 | // } |
69 | if ( !fileName.isNull() ) { // got a file name | 70 | if ( !fileName.isNull() ) { // got a file name |
70 | // ... | 71 | // ... |
71 | } | 72 | } |
72 | } | 73 | } |
73 | 74 | ||
74 | } | 75 | } |
75 | 76 | ||
76 | void optionsDialog::setHttp(int index) { | 77 | void optionsDialog::setHttp(int index) { |
77 | Config config("Gutenbrowser"); | 78 | Config config("Gutenbrowser"); |
78 | config.setGroup( "HttpServer" ); | 79 | config.setGroup( "HttpServer" ); |
79 | qDebug("writing http server"); | 80 | odebug << "writing http server" << oendl; |
80 | if( index== 0) { | 81 | if( index== 0) { |
81 | config.writeEntry("Preferred", "http://sailor.gutenberg.org"); | 82 | config.writeEntry("Preferred", "http://sailor.gutenberg.org"); |
82 | } else { | 83 | } else { |
83 | config.writeEntry("Preferred", "http://www.prairienet.org/pg"); | 84 | config.writeEntry("Preferred", "http://www.prairienet.org/pg"); |
84 | } | 85 | } |
85 | 86 | ||
86 | } | 87 | } |