summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/appearance2/main.cpp3
-rw-r--r--noncore/settings/networksettings/interfaces/interfacesetupimp.cpp2
2 files changed, 2 insertions, 3 deletions
diff --git a/noncore/settings/appearance2/main.cpp b/noncore/settings/appearance2/main.cpp
index 5595429..8ac45d8 100644
--- a/noncore/settings/appearance2/main.cpp
+++ b/noncore/settings/appearance2/main.cpp
@@ -1,34 +1,33 @@
1/* 1/*
2               =. This file is part of the OPIE Project 2               =. This file is part of the OPIE Project
3             .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> 3             .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org>
4           .>+-= 4           .>+-=
5 _;:,     .>    :=|. This file is free software; you can 5 _;:,     .>    :=|. This file is free software; you can
6.> <`_,   >  .   <= redistribute it and/or modify it under 6.> <`_,   >  .   <= redistribute it and/or modify it under
7:`=1 )Y*s>-.--   : the terms of the GNU General Public 7:`=1 )Y*s>-.--   : the terms of the GNU General Public
8.="- .-=="i,     .._ License as published by the Free Software 8.="- .-=="i,     .._ License as published by the Free Software
9 - .   .-<_>     .<> Foundation; either version 2 of the License, 9 - .   .-<_>     .<> Foundation; either version 2 of the License,
10     ._= =}       : or (at your option) any later version. 10     ._= =}       : or (at your option) any later version.
11    .%`+i>       _;_. 11    .%`+i>       _;_.
12    .i_,=:_.      -<s. This file is distributed in the hope that 12    .i_,=:_.      -<s. This file is distributed in the hope that
13     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY; 13     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
14    : ..    .:,     . . . without even the implied warranty of 14    : ..    .:,     . . . without even the implied warranty of
15    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A 15    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
16  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU General 16  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU General
17..}^=.=       =       ; Public License for more details. 17..}^=.=       =       ; Public License for more details.
18++=   -.     .`     .: 18++=   -.     .`     .:
19 :     =  ...= . :.=- You should have received a copy of the GNU 19 :     =  ...= . :.=- You should have received a copy of the GNU
20 -.   .:....=;==+<; General Public License along with this file; 20 -.   .:....=;==+<; General Public License along with this file;
21  -_. . .   )=.  = see the file COPYING. If not, write to the 21  -_. . .   )=.  = see the file COPYING. If not, write to the
22    --        :-=` Free Software Foundation, Inc., 22    --        :-=` Free Software Foundation, Inc.,
23 59 Temple Place - Suite 330, 23 59 Temple Place - Suite 330,
24 Boston, MA 02111-1307, USA. 24 Boston, MA 02111-1307, USA.
25 25
26*/ 26*/
27 27
28#include "appearance.h" 28#include "appearance.h"
29 29
30#include <qpe/qpeapplication.h> 30#include <opie2/oapplicationfactory.h>
31#include <opie/oapplicationfactory.h>
32 31
33 32
34OPIE_EXPORT_APP( OApplicationFactory<Appearance> ) 33OPIE_EXPORT_APP( OApplicationFactory<Appearance> )
diff --git a/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp b/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp
index ab0e4cc..05340e4 100644
--- a/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp
+++ b/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp
@@ -1,76 +1,76 @@
1#include "interfacesetupimp.h" 1#include "interfacesetupimp.h"
2#include "interface.h" 2#include "interface.h"
3 3
4#include <qcheckbox.h> 4#include <qcheckbox.h>
5#include <qlineedit.h> 5#include <qlineedit.h>
6#include <qspinbox.h> 6#include <qspinbox.h>
7#include <qgroupbox.h> 7#include <qgroupbox.h>
8#include <qlabel.h> 8#include <qlabel.h>
9 9
10#include <qmessagebox.h> 10#include <qmessagebox.h>
11 11
12#include <opie/oprocess.h> 12#include <opie2/oprocess.h>
13 13
14#ifdef QWS 14#ifdef QWS
15#include <opie2/owait.h> 15#include <opie2/owait.h>
16#include <qpe/global.h> 16#include <qpe/global.h>
17#include <qapplication.h> 17#include <qapplication.h>
18#endif 18#endif
19 19
20#define DNSSCRIPT "changedns" 20#define DNSSCRIPT "changedns"
21 21
22/** 22/**
23 * Constuctor. Set up the connection. A profile must be set. 23 * Constuctor. Set up the connection. A profile must be set.
24 */ 24 */
25InterfaceSetupImp::InterfaceSetupImp(QWidget* parent, const char* name, Interface *i, Interfaces *j, WFlags fl) : InterfaceSetup(parent, name, fl), interface(i), interfaces(j), delInterfaces(false){ 25InterfaceSetupImp::InterfaceSetupImp(QWidget* parent, const char* name, Interface *i, Interfaces *j, WFlags fl) : InterfaceSetup(parent, name, fl), interface(i), interfaces(j), delInterfaces(false){
26 if (j == 0) { 26 if (j == 0) {
27 delInterfaces = true; 27 delInterfaces = true;
28 interfaces = new Interfaces; 28 interfaces = new Interfaces;
29 } 29 }
30} 30}
31 31
32/** 32/**
33 * Destructor 33 * Destructor
34 */ 34 */
35InterfaceSetupImp::~InterfaceSetupImp(){ 35InterfaceSetupImp::~InterfaceSetupImp(){
36 if(delInterfaces) { 36 if(delInterfaces) {
37 delete interfaces; 37 delete interfaces;
38 } 38 }
39} 39}
40 40
41/** 41/**
42 * Save the current settings, then write out the interfaces file and close. 42 * Save the current settings, then write out the interfaces file and close.
43 */ 43 */
44bool InterfaceSetupImp::saveChanges(){ 44bool InterfaceSetupImp::saveChanges(){
45 bool error; 45 bool error;
46 QString iface = interfaces->getInterfaceName(error); 46 QString iface = interfaces->getInterfaceName(error);
47 qDebug("InterfaceSetupImp::saveChanges saves interface %s", iface.latin1() ); 47 qDebug("InterfaceSetupImp::saveChanges saves interface %s", iface.latin1() );
48 if(!saveSettings()) 48 if(!saveSettings())
49 return false; 49 return false;
50 50
51 interfaces->write(); 51 interfaces->write();
52 52
53 if (interface->getStatus()) { 53 if (interface->getStatus()) {
54 QString ifup; 54 QString ifup;
55 ifup += "ifdown "; 55 ifup += "ifdown ";
56 ifup += iface; 56 ifup += iface;
57 ifup += "; ifup "; 57 ifup += "; ifup ";
58 ifup += iface; 58 ifup += iface;
59 ifup += ";"; 59 ifup += ";";
60 60
61 OProcess restart; 61 OProcess restart;
62 restart << "sh"; 62 restart << "sh";
63 restart << "-c"; 63 restart << "-c";
64 restart << ifup; 64 restart << ifup;
65 65
66 OWait *owait = new OWait(); 66 OWait *owait = new OWait();
67 Global::statusMessage( tr( "Restarting interface" ) ); 67 Global::statusMessage( tr( "Restarting interface" ) );
68 68
69 owait->show(); 69 owait->show();
70 qApp->processEvents(); 70 qApp->processEvents();
71 71
72 if (!restart.start(OProcess::Block, OProcess::NoCommunication) ) { 72 if (!restart.start(OProcess::Block, OProcess::NoCommunication) ) {
73 qWarning("unstable to spawn ifdown/ifup"); 73 qWarning("unstable to spawn ifdown/ifup");
74 } 74 }
75 75
76 owait->hide(); 76 owait->hide();