author | kergoth <kergoth> | 2003-08-09 17:14:54 (UTC) |
---|---|---|
committer | kergoth <kergoth> | 2003-08-09 17:14:54 (UTC) |
commit | a7e015198a8c5ad3b6e144a9032b059086253e00 (patch) (unidiff) | |
tree | b712b6f11310d88744fe393a92b3160b741a7efe /noncore/settings/networksettings/mainwindowimp.cpp | |
parent | beba0e73306815337bf04dee39502233595e9739 (diff) | |
download | opie-a7e015198a8c5ad3b6e144a9032b059086253e00.zip opie-a7e015198a8c5ad3b6e144a9032b059086253e00.tar.gz opie-a7e015198a8c5ad3b6e144a9032b059086253e00.tar.bz2 |
Merge from BRANCH_1_0
Diffstat (limited to 'noncore/settings/networksettings/mainwindowimp.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/mainwindowimp.cpp | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/noncore/settings/networksettings/mainwindowimp.cpp b/noncore/settings/networksettings/mainwindowimp.cpp index 2d714ca..f74cf87 100644 --- a/noncore/settings/networksettings/mainwindowimp.cpp +++ b/noncore/settings/networksettings/mainwindowimp.cpp | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <qlabel.h> | 13 | #include <qlabel.h> |
14 | #include <qpe/qcopenvelope_qws.h> | 14 | #include <qpe/qcopenvelope_qws.h> |
15 | #include <qtabwidget.h> // in order to disable the profiles tab | 15 | #include <qtabwidget.h> // in order to disable the profiles tab |
16 | #include <qpe/qpeapplication.h> | ||
16 | 17 | ||
17 | #include <qmessagebox.h> | 18 | #include <qmessagebox.h> |
18 | 19 | ||
@@ -49,7 +50,7 @@ | |||
49 | #define DEFAULT_SCHEME "/var/lib/pcmcia/scheme" | 50 | #define DEFAULT_SCHEME "/var/lib/pcmcia/scheme" |
50 | #define _PROCNETDEV "/proc/net/dev" | 51 | #define _PROCNETDEV "/proc/net/dev" |
51 | 52 | ||
52 | MainWindowImp::MainWindowImp(QWidget *parent, const char *name) : MainWindow(parent, name), advancedUserMode(true), scheme(DEFAULT_SCHEME){ | 53 | MainWindowImp::MainWindowImp(QWidget *parent, const char *name) : MainWindow(parent, name, Qt::WStyle_ContextHelp), advancedUserMode(true), scheme(DEFAULT_SCHEME){ |
53 | connect(addConnectionButton, SIGNAL(clicked()), this, SLOT(addClicked())); | 54 | connect(addConnectionButton, SIGNAL(clicked()), this, SLOT(addClicked())); |
54 | connect(removeConnectionButton, SIGNAL(clicked()), this, SLOT(removeClicked())); | 55 | connect(removeConnectionButton, SIGNAL(clicked()), this, SLOT(removeClicked())); |
55 | connect(informationConnectionButton, SIGNAL(clicked()), this, SLOT(informationClicked())); | 56 | connect(informationConnectionButton, SIGNAL(clicked()), this, SLOT(informationClicked())); |
@@ -62,7 +63,7 @@ MainWindowImp::MainWindowImp(QWidget *parent, const char *name) : MainWindow(par | |||
62 | connect(newProfile, SIGNAL(textChanged(const QString&)), this, SLOT(newProfileChanged(const QString&))); | 63 | connect(newProfile, SIGNAL(textChanged(const QString&)), this, SLOT(newProfileChanged(const QString&))); |
63 | 64 | ||
64 | //FIXME: disable profiles for the moment: | 65 | //FIXME: disable profiles for the moment: |
65 | // tabWidget->setTabEnabled( tab, false ); | 66 | tabWidget->setTabEnabled( tab, false ); |
66 | 67 | ||
67 | // Load connections. | 68 | // Load connections. |
68 | // /usr/local/kde/lib/libinterfaces.la | 69 | // /usr/local/kde/lib/libinterfaces.la |
@@ -78,6 +79,14 @@ MainWindowImp::MainWindowImp(QWidget *parent, const char *name) : MainWindow(par | |||
78 | QStringList list = i.getInterfaceList(); | 79 | QStringList list = i.getInterfaceList(); |
79 | QMap<QString, Interface*>::Iterator it; | 80 | QMap<QString, Interface*>::Iterator it; |
80 | for ( QStringList::Iterator ni = list.begin(); ni != list.end(); ++ni ) { | 81 | for ( QStringList::Iterator ni = list.begin(); ni != list.end(); ++ni ) { |
82 | /* | ||
83 | * we skipped it in getAllInterfaces now | ||
84 | * we need to ignore it as well | ||
85 | */ | ||
86 | if (m_handledIfaces.contains( *ni) ) { | ||
87 | qDebug("Not up iface handled by module"); | ||
88 | continue; | ||
89 | } | ||
81 | bool found = false; | 90 | bool found = false; |
82 | for( it = interfaceNames.begin(); it != interfaceNames.end(); ++it ){ | 91 | for( it = interfaceNames.begin(); it != interfaceNames.end(); ++it ){ |
83 | if(it.key() == (*ni)) | 92 | if(it.key() == (*ni)) |
@@ -196,6 +205,10 @@ void MainWindowImp::getAllInterfaces(){ | |||
196 | 205 | ||
197 | for (QStringList::Iterator it = ifaces.begin(); it != ifaces.end(); ++it) { | 206 | for (QStringList::Iterator it = ifaces.begin(); it != ifaces.end(); ++it) { |
198 | int flags = 0; | 207 | int flags = 0; |
208 | if ( m_handledIfaces.contains( (*it) ) ) { | ||
209 | qDebug(" %s is handled by a module", (*it).latin1() ); | ||
210 | continue; | ||
211 | } | ||
199 | // int family; | 212 | // int family; |
200 | i = NULL; | 213 | i = NULL; |
201 | 214 | ||
@@ -307,6 +320,7 @@ Module* MainWindowImp::loadPlugin(const QString &pluginFileName, const QString & | |||
307 | return NULL; | 320 | return NULL; |
308 | } | 321 | } |
309 | 322 | ||
323 | m_handledIfaces += object->handledInterfaceNames(); | ||
310 | // Store for deletion later | 324 | // Store for deletion later |
311 | libraries.insert(object, lib); | 325 | libraries.insert(object, lib); |
312 | return object; | 326 | return object; |
@@ -426,7 +440,7 @@ void MainWindowImp::configureClicked(){ | |||
426 | } | 440 | } |
427 | } | 441 | } |
428 | 442 | ||
429 | InterfaceSetupImpDialog *configure = new InterfaceSetupImpDialog(this, "InterfaceSetupImp", i, true, Qt::WDestructiveClose ); | 443 | InterfaceSetupImpDialog *configure = new InterfaceSetupImpDialog(this, "InterfaceSetupImp", i, true, Qt::WDestructiveClose | Qt::WStyle_ContextHelp ); |
430 | configure->setProfile(currentProfileText); | 444 | configure->setProfile(currentProfileText); |
431 | configure->showMaximized(); | 445 | configure->showMaximized(); |
432 | } | 446 | } |
@@ -459,7 +473,7 @@ void MainWindowImp::informationClicked(){ | |||
459 | return; | 473 | return; |
460 | } | 474 | } |
461 | } | 475 | } |
462 | InterfaceInformationImp *information = new InterfaceInformationImp(this, "InterfaceSetupImp", i, Qt::WType_Modal | Qt::WDestructiveClose | Qt::WStyle_Dialog); | 476 | InterfaceInformationImp *information = new InterfaceInformationImp(this, "InterfaceSetupImp", i, Qt::WType_Modal | Qt::WDestructiveClose | Qt::WStyle_Dialog | Qt::WStyle_ContextHelp); |
463 | information->showMaximized(); | 477 | information->showMaximized(); |
464 | } | 478 | } |
465 | 479 | ||
@@ -639,7 +653,6 @@ void MainWindowImp::receive(const QCString &msg, const QByteArray &arg) | |||
639 | { | 653 | { |
640 | bool found = false; | 654 | bool found = false; |
641 | qDebug("MainWindowImp::receive QCop msg >"+msg+"<"); | 655 | qDebug("MainWindowImp::receive QCop msg >"+msg+"<"); |
642 | |||
643 | if (msg == "raise") { | 656 | if (msg == "raise") { |
644 | raise(); | 657 | raise(); |
645 | return; | 658 | return; |