summaryrefslogtreecommitdiff
authorbenmeyer <benmeyer>2003-01-02 19:49:08 (UTC)
committer benmeyer <benmeyer>2003-01-02 19:49:08 (UTC)
commitcbe90bbbb4a22130af317d7ddac51b3048ae34a0 (patch) (unidiff)
tree02c8fd85e168b58376d8d967eaae6eee7033705c
parentef25fa96377d3ed1b7355a4e13609d0713f6f51e (diff)
downloadopie-cbe90bbbb4a22130af317d7ddac51b3048ae34a0.zip
opie-cbe90bbbb4a22130af317d7ddac51b3048ae34a0.tar.gz
opie-cbe90bbbb4a22130af317d7ddac51b3048ae34a0.tar.bz2
Name changes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings/mainwindowimp.cpp2
-rw-r--r--noncore/settings/networksettings/opie-networksettings.control2
2 files changed, 2 insertions, 2 deletions
diff --git a/noncore/settings/networksettings/mainwindowimp.cpp b/noncore/settings/networksettings/mainwindowimp.cpp
index 9a17743..9efc8c2 100644
--- a/noncore/settings/networksettings/mainwindowimp.cpp
+++ b/noncore/settings/networksettings/mainwindowimp.cpp
@@ -1,93 +1,93 @@
1#include "mainwindowimp.h" 1#include "mainwindowimp.h"
2#include "addconnectionimp.h" 2#include "addconnectionimp.h"
3#include "interfaceinformationimp.h" 3#include "interfaceinformationimp.h"
4#include "interfacesetupimp.h" 4#include "interfacesetupimp.h"
5#include "interfaces.h" 5#include "interfaces.h"
6#include "module.h" 6#include "module.h"
7 7
8#include <qpushbutton.h> 8#include <qpushbutton.h>
9#include <qlistbox.h> 9#include <qlistbox.h>
10#include <qlineedit.h> 10#include <qlineedit.h>
11#include <qlistview.h> 11#include <qlistview.h>
12#include <qheader.h> 12#include <qheader.h>
13#include <qlabel.h> 13#include <qlabel.h>
14 14
15#include <qmainwindow.h> 15#include <qmainwindow.h>
16#include <qmessagebox.h> 16#include <qmessagebox.h>
17 17
18#include <qpe/config.h> 18#include <qpe/config.h>
19#include <qpe/qlibrary.h> 19#include <qpe/qlibrary.h>
20#include <qpe/resource.h> 20#include <qpe/resource.h>
21#include <qpe/qpeapplication.h> 21#include <qpe/qpeapplication.h>
22 22
23#include <qlist.h> 23#include <qlist.h>
24#include <qdir.h> 24#include <qdir.h>
25#include <qfile.h> 25#include <qfile.h>
26#include <qtextstream.h> 26#include <qtextstream.h>
27 27
28#include <net/if.h> 28#include <net/if.h>
29#include <sys/ioctl.h> 29#include <sys/ioctl.h>
30 30
31#define DEFAULT_SCHEME "/var/lib/pcmcia/scheme" 31#define DEFAULT_SCHEME "/var/lib/pcmcia/scheme"
32 32
33MainWindowImp::MainWindowImp(QWidget *parent, const char *name) : MainWindow(parent, name, true), advancedUserMode(false), scheme(DEFAULT_SCHEME){ 33MainWindowImp::MainWindowImp(QWidget *parent, const char *name) : MainWindow(parent, name, true), advancedUserMode(false), scheme(DEFAULT_SCHEME){
34 connect(addConnectionButton, SIGNAL(clicked()), this, SLOT(addClicked())); 34 connect(addConnectionButton, SIGNAL(clicked()), this, SLOT(addClicked()));
35 connect(removeConnectionButton, SIGNAL(clicked()), this, SLOT(removeClicked())); 35 connect(removeConnectionButton, SIGNAL(clicked()), this, SLOT(removeClicked()));
36 connect(informationConnectionButton, SIGNAL(clicked()), this, SLOT(informationClicked())); 36 connect(informationConnectionButton, SIGNAL(clicked()), this, SLOT(informationClicked()));
37 connect(configureConnectionButton, SIGNAL(clicked()), this, SLOT(configureClicked())); 37 connect(configureConnectionButton, SIGNAL(clicked()), this, SLOT(configureClicked()));
38 38
39 connect(newProfileButton, SIGNAL(clicked()), this, SLOT(addProfile())); 39 connect(newProfileButton, SIGNAL(clicked()), this, SLOT(addProfile()));
40 connect(removeProfileButton, SIGNAL(clicked()), this, SLOT(removeProfile())); 40 connect(removeProfileButton, SIGNAL(clicked()), this, SLOT(removeProfile()));
41 connect(setCurrentProfileButton, SIGNAL(clicked()), this, SLOT(changeProfile())); 41 connect(setCurrentProfileButton, SIGNAL(clicked()), this, SLOT(changeProfile()));
42 42
43 connect(newProfile, SIGNAL(textChanged(const QString&)), this, SLOT(newProfileChanged(const QString&))); 43 connect(newProfile, SIGNAL(textChanged(const QString&)), this, SLOT(newProfileChanged(const QString&)));
44 // Load connections. 44 // Load connections.
45 loadModules(QPEApplication::qpeDir() + "/plugins/networksetup"); 45 loadModules(QPEApplication::qpeDir() + "/plugins/networksettings");
46 getAllInterfaces(); 46 getAllInterfaces();
47 47
48 Interfaces i; 48 Interfaces i;
49 QStringList list = i.getInterfaceList(); 49 QStringList list = i.getInterfaceList();
50 QMap<QString, Interface*>::Iterator it; 50 QMap<QString, Interface*>::Iterator it;
51 for ( QStringList::Iterator ni = list.begin(); ni != list.end(); ++ni ) { 51 for ( QStringList::Iterator ni = list.begin(); ni != list.end(); ++ni ) {
52 bool found = false; 52 bool found = false;
53 for( it = interfaceNames.begin(); it != interfaceNames.end(); ++it ){ 53 for( it = interfaceNames.begin(); it != interfaceNames.end(); ++it ){
54 if(it.key() == (*ni)) 54 if(it.key() == (*ni))
55 found = true; 55 found = true;
56 } 56 }
57 if(!found){ 57 if(!found){
58 if(!(*ni).contains("_")){ 58 if(!(*ni).contains("_")){
59 Interface *i = new Interface(this, *ni, false); 59 Interface *i = new Interface(this, *ni, false);
60 i->setAttached(false); 60 i->setAttached(false);
61 i->setHardwareName("Disconnected"); 61 i->setHardwareName("Disconnected");
62 interfaceNames.insert(i->getInterfaceName(), i); 62 interfaceNames.insert(i->getInterfaceName(), i);
63 updateInterface(i); 63 updateInterface(i);
64 connect(i, SIGNAL(updateInterface(Interface *)), this, SLOT(updateInterface(Interface *))); 64 connect(i, SIGNAL(updateInterface(Interface *)), this, SLOT(updateInterface(Interface *)));
65 } 65 }
66 } 66 }
67 } 67 }
68 68
69 //getInterfaceList(); 69 //getInterfaceList();
70 connectionList->header()->hide(); 70 connectionList->header()->hide();
71 71
72 Config cfg("NetworkSetup"); 72 Config cfg("NetworkSetup");
73 profiles = QStringList::split(" ", cfg.readEntry("Profiles", "All")); 73 profiles = QStringList::split(" ", cfg.readEntry("Profiles", "All"));
74 for ( QStringList::Iterator it = profiles.begin(); it != profiles.end(); ++it) 74 for ( QStringList::Iterator it = profiles.begin(); it != profiles.end(); ++it)
75 profilesList->insertItem((*it)); 75 profilesList->insertItem((*it));
76 currentProfileLabel->setText(cfg.readEntry("CurrentProfile", "All")); 76 currentProfileLabel->setText(cfg.readEntry("CurrentProfile", "All"));
77 advancedUserMode = cfg.readBoolEntry("AdvancedUserMode", false); 77 advancedUserMode = cfg.readBoolEntry("AdvancedUserMode", false);
78 scheme = cfg.readEntry("SchemeFile", DEFAULT_SCHEME); 78 scheme = cfg.readEntry("SchemeFile", DEFAULT_SCHEME);
79 79
80 QFile file(scheme); 80 QFile file(scheme);
81 if ( file.open(IO_ReadOnly) ) { // file opened successfully 81 if ( file.open(IO_ReadOnly) ) { // file opened successfully
82 QTextStream stream( &file ); // use a text stream 82 QTextStream stream( &file ); // use a text stream
83 while ( !stream.eof() ) { // until end of file... 83 while ( !stream.eof() ) { // until end of file...
84 QString line = stream.readLine(); // line of text excluding '\n' 84 QString line = stream.readLine(); // line of text excluding '\n'
85 if(line.contains("SCHEME")){ 85 if(line.contains("SCHEME")){
86 line = line.mid(7, line.length()); 86 line = line.mid(7, line.length());
87 currentProfileLabel->setText(line); 87 currentProfileLabel->setText(line);
88 break; 88 break;
89 } 89 }
90 } 90 }
91 file.close(); 91 file.close();
92 } 92 }
93} 93}
diff --git a/noncore/settings/networksettings/opie-networksettings.control b/noncore/settings/networksettings/opie-networksettings.control
index 585e50e..8fa40c7 100644
--- a/noncore/settings/networksettings/opie-networksettings.control
+++ b/noncore/settings/networksettings/opie-networksettings.control
@@ -1,8 +1,8 @@
1Files: bin/networksetup apps/Settings/networksetup.desktop plugins/networksetup/* pics/networksetup/* pics/Network/PPPConnect.png $QTDIR/lib/libinterfaces.so.1.0.0 $QTDIR/lib/libinterfaces.so.1.0 $QTDIR/lib/libinterfaces.so.1 root/usr/bin/changedns bin/getprofile 1Files: bin/networksettings apps/Settings/networksettings.desktop plugins/networksettings/* pics/networksettings/* pics/Network/PPPConnect.png $QTDIR/lib/libinterfaces.so.1.0.0 $QTDIR/lib/libinterfaces.so.1.0 $QTDIR/lib/libinterfaces.so.1 root/usr/bin/changedns bin/getprofile
2Priority: optional 2Priority: optional
3Section: opie/settings 3Section: opie/settings
4Maintainer: Ben Meyer <meyerb@sharpsec.com> 4Maintainer: Ben Meyer <meyerb@sharpsec.com>
5Architecture: arm 5Architecture: arm
6Version: $QPE_VERSION-$SUB_VERSION 6Version: $QPE_VERSION-$SUB_VERSION
7Depends: opie-base ($QPE_VERSION) 7Depends: opie-base ($QPE_VERSION)
8Description: Network settings 8Description: Network settings