author | benmeyer <benmeyer> | 2002-11-04 15:17:58 (UTC) |
---|---|---|
committer | benmeyer <benmeyer> | 2002-11-04 15:17:58 (UTC) |
commit | 17a29825dcf56cb0e224848e71e24ee6a884890b (patch) (side-by-side diff) | |
tree | 91a7f024de51081800a13312dd1b16822d86c188 /noncore/settings/networksettings/interfaces/interface.cpp | |
parent | a5f1f8a58a5a654503d72042b12f36ab30216a16 (diff) | |
download | opie-17a29825dcf56cb0e224848e71e24ee6a884890b.zip opie-17a29825dcf56cb0e224848e71e24ee6a884890b.tar.gz opie-17a29825dcf56cb0e224848e71e24ee6a884890b.tar.bz2 |
Fix bug and gives more user feedback now
Diffstat (limited to 'noncore/settings/networksettings/interfaces/interface.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/interfaces/interface.cpp | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/noncore/settings/networksettings/interfaces/interface.cpp b/noncore/settings/networksettings/interfaces/interface.cpp index 929b3a1..e4f405e 100644 --- a/noncore/settings/networksettings/interfaces/interface.cpp +++ b/noncore/settings/networksettings/interfaces/interface.cpp @@ -65,4 +65,6 @@ void Interface::start(){ // check to see if we are already running. - if(true == status) + if(true == status){ + emit (updateMessage("Unable to start interface,\n already started")); return; + } @@ -70,4 +72,6 @@ void Interface::start(){ // See if it was successfull... - if(ret != 0) + if(ret != 0){ + emit (updateMessage("Starting interface failed.")); return; + } @@ -75,2 +79,3 @@ void Interface::start(){ refresh(); + emit (updateMessage("Start successfull")); } @@ -82,11 +87,16 @@ void Interface::stop(){ // check to see if we are already stopped. - if(false == status) + if(false == status){ + emit (updateMessage("Unable to stop interface,\n already stopped")); return; + } int ret = system(QString("%1 %2 down").arg(IFCONFIG).arg(this->name()).latin1()); - if(ret != 0) + if(ret != 0){ + emit (updateMessage("Stopping interface failed.")); return; + } - status = true; + status = false; refresh(); + emit (updateMessage("Stop successfull")); } |