summaryrefslogtreecommitdiff
path: root/noncore/net/opietooth/manager/dundialog.cpp
Unidiff
Diffstat (limited to 'noncore/net/opietooth/manager/dundialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opietooth/manager/dundialog.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/noncore/net/opietooth/manager/dundialog.cpp b/noncore/net/opietooth/manager/dundialog.cpp
index c6d8619..872ab00 100644
--- a/noncore/net/opietooth/manager/dundialog.cpp
+++ b/noncore/net/opietooth/manager/dundialog.cpp
@@ -17,4 +17,6 @@
17#include <qlabel.h> 17#include <qlabel.h>
18#include <qstring.h> 18#include <qstring.h>
19#include <qcombobox.h>
20#include <qdir.h>
19#include <opie2/oprocess.h> 21#include <opie2/oprocess.h>
20#include <opie2/odebug.h> 22#include <opie2/odebug.h>
@@ -28,4 +30,8 @@ DunDialog::DunDialog( const QString& device, int port, QWidget* parent,
28 const char* name, bool modal, WFlags fl ) 30 const char* name, bool modal, WFlags fl )
29 : QDialog( parent, name, modal, fl ) { 31 : QDialog( parent, name, modal, fl ) {
32 QDir d("/etc/ppp/peers/"); //Dir we search files in
33 d.setFilter( QDir::Files);
34 d.setSorting( QDir::Size | QDir::Reversed );
35
30 if ( !name ) 36 if ( !name )
31 setName( "DUNDialog" ); 37 setName( "DUNDialog" );
@@ -41,5 +47,6 @@ DunDialog::DunDialog( const QString& device, int port, QWidget* parent,
41 info->setText( tr("Enter an ppp script name:") ); 47 info->setText( tr("Enter an ppp script name:") );
42 48
43 cmdLine = new QLineEdit( this ); 49 cmdLine = new QComboBox( this );
50 cmdLine->setEditable(true);
44 51
45 outPut = new QMultiLineEdit( this ); 52 outPut = new QMultiLineEdit( this );
@@ -66,4 +73,6 @@ DunDialog::DunDialog( const QString& device, int port, QWidget* parent,
66 73
67 connect( connectButton, SIGNAL( clicked() ), this, SLOT( connectToDevice() ) ); 74 connect( connectButton, SIGNAL( clicked() ), this, SLOT( connectToDevice() ) );
75 //And fill cmdLine with ppp script filenames
76 cmdLine->insertStringList(d.entryList());
68} 77}
69 78
@@ -75,5 +84,5 @@ void DunDialog::connectToDevice() {
75 bool doPersist = persist->isChecked(); 84 bool doPersist = persist->isChecked();
76 85
77 if (cmdLine->text() == "") 86 if (cmdLine->currentText() == "")
78 return; 87 return;
79 if (m_dunConnect) { 88 if (m_dunConnect) {
@@ -94,5 +103,5 @@ void DunDialog::connectToDevice() {
94 *m_dunConnect << tr("--persist"); 103 *m_dunConnect << tr("--persist");
95 *m_dunConnect << tr("call") 104 *m_dunConnect << tr("call")
96 << cmdLine->text(); 105 << cmdLine->currentText();
97 if (!m_dunConnect->start(OProcess::NotifyOnExit, 106 if (!m_dunConnect->start(OProcess::NotifyOnExit,
98 OProcess::All)) { 107 OProcess::All)) {