summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/networksettings.cpp
authorwimpie <wimpie>2004-08-09 02:31:25 (UTC)
committer wimpie <wimpie>2004-08-09 02:31:25 (UTC)
commit0784cfdbd261c43856b45be6ab7439841e69b858 (patch) (unidiff)
treef6a27d6b2e1e6d8dcc908b2ef5836cd320ddfab1 /noncore/settings/networksettings2/networksettings.cpp
parent5e10278e748608766245ff9f59a54d1ae8ff6f7e (diff)
downloadopie-0784cfdbd261c43856b45be6ab7439841e69b858.zip
opie-0784cfdbd261c43856b45be6ab7439841e69b858.tar.gz
opie-0784cfdbd261c43856b45be6ab7439841e69b858.tar.bz2
Many changes :
bluetooth and usb seems to work added preliminary support for VPN on top of any network This version is still very much crippled yet is does DO some things
Diffstat (limited to 'noncore/settings/networksettings2/networksettings.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings2/networksettings.cpp34
1 files changed, 30 insertions, 4 deletions
diff --git a/noncore/settings/networksettings2/networksettings.cpp b/noncore/settings/networksettings2/networksettings.cpp
index b36c7a0..6ee4106 100644
--- a/noncore/settings/networksettings2/networksettings.cpp
+++ b/noncore/settings/networksettings2/networksettings.cpp
@@ -1,2 +1,3 @@
1#include <stdio.h> 1#include <stdio.h>
2#include <unistd.h>
2 3
@@ -63,2 +64,6 @@ NetworkSettings::NetworkSettings( QWidget *parent,
63 64
65 connect( &(NSResources->system()),
66 SIGNAL( lineFromCommand(const QString &) ),
67 this, SLOT( SLOT_CmdMessage(const QString &) ) );
68
64 UpdateTimer->start( 5000 ); 69 UpdateTimer->start( 5000 );
@@ -93,2 +98,8 @@ NetworkSettings::~NetworkSettings() {
93 98
99void NetworkSettings::SLOT_CmdMessage( const QString & S ) {
100 Messages_LB->insertItem( S );
101 Messages_LB->setCurrentItem( Messages_LB->count()-1 );
102 Messages_LB->ensureCurrentVisible();
103}
104
94void NetworkSettings::SLOT_RefreshStates( void ) { 105void NetworkSettings::SLOT_RefreshStates( void ) {
@@ -136,2 +147,5 @@ void NetworkSettings::SLOT_RefreshStates( void ) {
136 147
148void NetworkSettings::SLOT_NoLongerBusy( void ) {
149 NSResources->busy( FALSE );
150}
137void NetworkSettings::SLOT_AddNode( void ) { 151void NetworkSettings::SLOT_AddNode( void ) {
@@ -174,2 +188,4 @@ void NetworkSettings::SLOT_EditNode( QListBoxItem * LBI ) {
174 UpdateTimer->stop(); 188 UpdateTimer->stop();
189 NSResources->busy( TRUE );
190 QTimer::singleShot( 1000, this, SLOT( SLOT_NoLongerBusy() ));
175 // we need to retry 191 // we need to retry
@@ -208,3 +224,3 @@ void NetworkSettings::SLOT_EditNode( QListBoxItem * LBI ) {
208 NSResources->addConnection( NC ); 224 NSResources->addConnection( NC );
209 NC->setNumber( NC->maxConnectionNumber()+1 ); 225 NC->setNumber( NSResources->assignConnectionNumber() );
210 Profiles_LB->insertItem( NC->devicePixmap(), NC->name() ); 226 Profiles_LB->insertItem( NC->devicePixmap(), NC->name() );
@@ -259,2 +275,3 @@ void NetworkSettings::SLOT_ShowNode( QListBoxItem * LBI ) {
259 OnOn = 1; 275 OnOn = 1;
276 Connect_TB->setPixmap( NSResources->getPixmap( "disconnected" ) );
260 DisabledOn = 0; 277 DisabledOn = 0;
@@ -263,2 +280,3 @@ void NetworkSettings::SLOT_ShowNode( QListBoxItem * LBI ) {
263 OnOn = ConnectOn = 1; 280 OnOn = ConnectOn = 1;
281 Connect_TB->setPixmap( NSResources->getPixmap( "connected" ) );
264 DisabledOn = 0; 282 DisabledOn = 0;
@@ -267,2 +285,6 @@ void NetworkSettings::SLOT_ShowNode( QListBoxItem * LBI ) {
267 285
286 if( ! OnOn ) {
287 Connect_TB->setPixmap( NSResources->getPixmap( "disconnected" ) );
288 }
289
268 // set button state 290 // set button state
@@ -277,3 +299,3 @@ void NetworkSettings::SLOT_ShowNode( QListBoxItem * LBI ) {
277 if( NC->description().isEmpty() ) { 299 if( NC->description().isEmpty() ) {
278 Description_LBL->setText( tr( "No description" ) ); 300 Description_LBL->setText( tr( "<<No description>>" ) );
279 } else { 301 } else {
@@ -282,4 +304,3 @@ void NetworkSettings::SLOT_ShowNode( QListBoxItem * LBI ) {
282 304
283 Profile_GB->setTitle( LBI->text() ); 305 Profile_GB->setTitle( LBI->text() + " : " + NC->stateName() );
284 State_LBL->setText( NC->stateName() );
285} 306}
@@ -416,2 +437,3 @@ void NetworkSettings::SLOT_Connect( void ) {
416void NetworkSettings::SLOT_Disconnect( void ) { 437void NetworkSettings::SLOT_Disconnect( void ) {
438 QString S;
417 QListBoxItem * LBI = Profiles_LB->item( Profiles_LB->currentItem() ); 439 QListBoxItem * LBI = Profiles_LB->item( Profiles_LB->currentItem() );
@@ -424,3 +446,7 @@ void NetworkSettings::SLOT_Disconnect( void ) {
424 446
447 Log(( "Force interface %s down\n", NC->name().latin1() ));
425 NC->setState( Down, 1 ); 448 NC->setState( Down, 1 );
449 // remove 'up' file to make sure
450 S.sprintf( "/tmp/Profile-%d.up", NC->number() );
451 unlink( S.latin1() );
426} 452}