Diffstat (limited to 'noncore/settings/networksettings/mainwindowimp.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/mainwindowimp.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/noncore/settings/networksettings/mainwindowimp.cpp b/noncore/settings/networksettings/mainwindowimp.cpp index 63b9603..abf5663 100644 --- a/noncore/settings/networksettings/mainwindowimp.cpp +++ b/noncore/settings/networksettings/mainwindowimp.cpp | |||
@@ -6,16 +6,17 @@ | |||
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 | #include <qtabwidget.h> // in order to disable the profiles tab | ||
14 | 15 | ||
15 | #include <qmessagebox.h> | 16 | #include <qmessagebox.h> |
16 | 17 | ||
17 | #ifdef QWS | 18 | #ifdef QWS |
18 | #include <qpe/config.h> | 19 | #include <qpe/config.h> |
19 | #include <qpe/qlibrary.h> | 20 | #include <qpe/qlibrary.h> |
20 | #include <qpe/resource.h> | 21 | #include <qpe/resource.h> |
21 | #include <qpe/qpeapplication.h> | 22 | #include <qpe/qpeapplication.h> |
@@ -53,16 +54,20 @@ MainWindowImp::MainWindowImp(QWidget *parent, const char *name) : MainWindow(par | |||
53 | connect(informationConnectionButton, SIGNAL(clicked()), this, SLOT(informationClicked())); | 54 | connect(informationConnectionButton, SIGNAL(clicked()), this, SLOT(informationClicked())); |
54 | connect(configureConnectionButton, SIGNAL(clicked()), this, SLOT(configureClicked())); | 55 | connect(configureConnectionButton, SIGNAL(clicked()), this, SLOT(configureClicked())); |
55 | 56 | ||
56 | connect(newProfileButton, SIGNAL(clicked()), this, SLOT(addProfile())); | 57 | connect(newProfileButton, SIGNAL(clicked()), this, SLOT(addProfile())); |
57 | connect(removeProfileButton, SIGNAL(clicked()), this, SLOT(removeProfile())); | 58 | connect(removeProfileButton, SIGNAL(clicked()), this, SLOT(removeProfile())); |
58 | connect(setCurrentProfileButton, SIGNAL(clicked()), this, SLOT(changeProfile())); | 59 | connect(setCurrentProfileButton, SIGNAL(clicked()), this, SLOT(changeProfile())); |
59 | 60 | ||
60 | connect(newProfile, SIGNAL(textChanged(const QString&)), this, SLOT(newProfileChanged(const QString&))); | 61 | connect(newProfile, SIGNAL(textChanged(const QString&)), this, SLOT(newProfileChanged(const QString&))); |
62 | |||
63 | //FIXME: disable profiles for the moment: | ||
64 | tabWidget->setTabEnabled( tab, false ); | ||
65 | |||
61 | // Load connections. | 66 | // Load connections. |
62 | // /usr/local/kde/lib/libinterfaces.la | 67 | // /usr/local/kde/lib/libinterfaces.la |
63 | #ifdef QWS | 68 | #ifdef QWS |
64 | loadModules(QPEApplication::qpeDir() + "/plugins/networksettings"); | 69 | loadModules(QPEApplication::qpeDir() + "/plugins/networksettings"); |
65 | #else | 70 | #else |
66 | loader = KLibLoader::self(); | 71 | loader = KLibLoader::self(); |
67 | loadModules(QString("/usr/")+KStandardDirs::kde_default("lib")); | 72 | loadModules(QString("/usr/")+KStandardDirs::kde_default("lib")); |
68 | #endif | 73 | #endif |
@@ -89,17 +94,18 @@ MainWindowImp::MainWindowImp(QWidget *parent, const char *name) : MainWindow(par | |||
89 | } | 94 | } |
90 | } | 95 | } |
91 | 96 | ||
92 | //getInterfaceList(); | 97 | //getInterfaceList(); |
93 | connectionList->header()->hide(); | 98 | connectionList->header()->hide(); |
94 | 99 | ||
95 | Config cfg("NetworkSetup"); | 100 | Config cfg("NetworkSetup"); |
96 | profiles = QStringList::split(" ", cfg.readEntry("Profiles", "All")); | 101 | profiles = QStringList::split(" ", cfg.readEntry("Profiles", "All")); |
97 | for ( QStringList::Iterator it = profiles.begin(); it != profiles.end(); ++it) | 102 | for ( QStringList::Iterator it = profiles.begin(); |
103 | it != profiles.end(); ++it) | ||
98 | profilesList->insertItem((*it)); | 104 | profilesList->insertItem((*it)); |
99 | currentProfileLabel->setText(cfg.readEntry("CurrentProfile", "All")); | 105 | currentProfileLabel->setText(cfg.readEntry("CurrentProfile", "All")); |
100 | advancedUserMode = cfg.readBoolEntry("AdvancedUserMode", false); | 106 | advancedUserMode = cfg.readBoolEntry("AdvancedUserMode", false); |
101 | scheme = cfg.readEntry("SchemeFile", DEFAULT_SCHEME); | 107 | scheme = cfg.readEntry("SchemeFile", DEFAULT_SCHEME); |
102 | 108 | ||
103 | QFile file(scheme); | 109 | QFile file(scheme); |
104 | if ( file.open(IO_ReadOnly) ) { // file opened successfully | 110 | if ( file.open(IO_ReadOnly) ) { // file opened successfully |
105 | QTextStream stream( &file ); // use a text stream | 111 | QTextStream stream( &file ); // use a text stream |