author | benmeyer <benmeyer> | 2002-10-02 19:23:45 (UTC) |
---|---|---|
committer | benmeyer <benmeyer> | 2002-10-02 19:23:45 (UTC) |
commit | 2d0c6327dd40ab6847ce055c40ca59893bc8b9b2 (patch) (side-by-side diff) | |
tree | 260222139bb322f24d058cba10db0f7d1c43858f /noncore/net/networksetup/mainwindowimp.cpp | |
parent | c997983c6917885f6c487b942a9b294fa50ae618 (diff) | |
download | opie-2d0c6327dd40ab6847ce055c40ca59893bc8b9b2.zip opie-2d0c6327dd40ab6847ce055c40ca59893bc8b9b2.tar.gz opie-2d0c6327dd40ab6847ce055c40ca59893bc8b9b2.tar.bz2 |
Fixes
Diffstat (limited to 'noncore/net/networksetup/mainwindowimp.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/networksetup/mainwindowimp.cpp | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/noncore/net/networksetup/mainwindowimp.cpp b/noncore/net/networksetup/mainwindowimp.cpp index e9429e3..e895971 100644 --- a/noncore/net/networksetup/mainwindowimp.cpp +++ b/noncore/net/networksetup/mainwindowimp.cpp @@ -7,3 +7,2 @@ #include "kprocess.h"
-#include "namedialog.h"
@@ -12,2 +11,3 @@ #include <qlistbox.h>
+#include <qlineedit.h>
#include <qlistview.h>
@@ -39,4 +39,5 @@ MainWindowImp::MainWindowImp(QWidget *parent, const char *name) : MainWindow(par connect(removeProfileButton, SIGNAL(clicked()), this, SLOT(removeProfile()));
- connect(profilesList, SIGNAL(highlighted(const QString&)), this, SLOT(changeProfile(const QString&)));
-
+ connect(setCurrentProfileButton, SIGNAL(clicked()), this, SLOT(changeProfile()));
+
+ connect(newProfile, SIGNAL(textChanged(const QString&)), this, SLOT(newProfileChanged(const QString&)));
// Load connections.
@@ -61,2 +62,3 @@ MainWindowImp::~MainWindowImp(){ Config cfg("NetworkSetup");
+ cfg.setGroup("General");
cfg.writeEntry("Profiles", profiles.join(" "));
@@ -374,2 +376,9 @@ void MainWindowImp::updateInterface(Interface *i){ +void MainWindowImp::newProfileChanged(const QString& newText){
+ if(newText.length() > 0)
+ newProfileButton->setEnabled(true);
+ else
+ newProfileButton->setEnabled(false);
+}
+
/**
@@ -380,7 +389,3 @@ void MainWindowImp::updateInterface(Interface *i){ void MainWindowImp::addProfile(){
- NameDialog foo(this, "namedialog", true);
- QString newProfileName = foo.go();
- if(newProfileName.length() == 0)
- return;
-
+ QString newProfileName = newProfile->text();
if(profiles.grep(newProfileName).count() > 0){
@@ -416,4 +421,4 @@ void MainWindowImp::removeProfile(){ */
-void MainWindowImp::changeProfile(const QString& newProfile){
- currentProfileLabel->setText(newProfile);
+void MainWindowImp::changeProfile(){
+ currentProfileLabel->setText(profilesList->text(profilesList->currentItem()));
}
|