summaryrefslogtreecommitdiff
path: root/noncore/net/opietooth/manager/dunpopup.cpp
Unidiff
Diffstat (limited to 'noncore/net/opietooth/manager/dunpopup.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opietooth/manager/dunpopup.cpp31
1 files changed, 18 insertions, 13 deletions
diff --git a/noncore/net/opietooth/manager/dunpopup.cpp b/noncore/net/opietooth/manager/dunpopup.cpp
index 10505a9..3017d63 100644
--- a/noncore/net/opietooth/manager/dunpopup.cpp
+++ b/noncore/net/opietooth/manager/dunpopup.cpp
@@ -1,5 +1,6 @@
1#include <qpe/qcopenvelope_qws.h> 1#include <qpe/qcopenvelope_qws.h>
2 2#include <qmessagebox.h>
3#include <qtimer.h>
4#include <opie2/odebug.h> 3#include <opie2/odebug.h>
4#include <opie2/oprocess.h>
5#include <qpe/qpeapplication.h>
5using namespace Opie::Core; 6using namespace Opie::Core;
@@ -7,2 +8,3 @@ using namespace Opie::Core;
7#include "dunpopup.h" 8#include "dunpopup.h"
9#include "dundialog.h"
8 10
@@ -13,3 +15,4 @@ using namespace OpieTooth;
13 */ 15 */
14DunPopup::DunPopup( OpieTooth::BTDeviceItem* item ) : QPopupMenu() { 16DunPopup::DunPopup( const Services& service,
17 BTDeviceItem* item ) : QPopupMenu(), m_service(service) {
15 18
@@ -20,6 +23,2 @@ DunPopup::DunPopup( OpieTooth::BTDeviceItem* item ) : QPopupMenu() {
20 23
21 m_dunconnection = 0l;
22 /* connect action */
23
24
25 a = new QAction(); // so it's get deleted 24 a = new QAction(); // so it's get deleted
@@ -29,3 +28,2 @@ DunPopup::DunPopup( OpieTooth::BTDeviceItem* item ) : QPopupMenu() {
29 28
30
31 b = new QAction(); 29 b = new QAction();
@@ -47,5 +45,6 @@ DunPopup::~DunPopup() {
47void DunPopup::slotConnect() { 45void DunPopup::slotConnect() {
48 46 odebug << "connect" << oendl;
49 m_dunconnection = new StartDunConnection( m_item->mac() ); 47 DunDialog dundlg(m_item->mac(),
50 m_dunconnection->start(); 48 m_service.protocolDescriptorList().last().port());
49 QPEApplication::execDialog( &dundlg );
51} 50}
@@ -53,3 +52,10 @@ void DunPopup::slotConnect() {
53void DunPopup::slotDisconnect() { 52void DunPopup::slotDisconnect() {
54 m_dunconnection->stop(); 53 OProcess dunDis;
54 OProcess pppDis;
55 dunDis << tr("dund") << tr("--kill") << m_item->mac();
56 dunDis.start(OProcess::DontCare, OProcess::NoCommunication);
57 pppDis << tr("killall") << tr("-q") << tr("pppd");
58 pppDis.start(OProcess::DontCare, OProcess::NoCommunication);
59 sleep(1);
60 QMessageBox::information(this, tr("DUN Disconnect"), tr("DUN Disconnected"));
55} 61}
@@ -63,3 +69,2 @@ void DunPopup::slotConnectAndConfig() {
63 e << QString( "networksettings" ); 69 e << QString( "networksettings" );
64
65} 70}