Diffstat (limited to 'noncore/settings/networksettings/mainwindowimp.cpp') (more/less context) (show 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 @@ -12,8 +12,9 @@ #include <qheader.h> #include <qlabel.h> #include <qpe/qcopenvelope_qws.h> #include <qtabwidget.h> // in order to disable the profiles tab +#include <qpe/qpeapplication.h> #include <qmessagebox.h> #ifdef QWS @@ -48,9 +49,9 @@ #define DEFAULT_SCHEME "/var/lib/pcmcia/scheme" #define _PROCNETDEV "/proc/net/dev" -MainWindowImp::MainWindowImp(QWidget *parent, const char *name) : MainWindow(parent, name), advancedUserMode(true), scheme(DEFAULT_SCHEME){ +MainWindowImp::MainWindowImp(QWidget *parent, const char *name) : MainWindow(parent, name, Qt::WStyle_ContextHelp), advancedUserMode(true), scheme(DEFAULT_SCHEME){ connect(addConnectionButton, SIGNAL(clicked()), this, SLOT(addClicked())); connect(removeConnectionButton, SIGNAL(clicked()), this, SLOT(removeClicked())); connect(informationConnectionButton, SIGNAL(clicked()), this, SLOT(informationClicked())); connect(configureConnectionButton, SIGNAL(clicked()), this, SLOT(configureClicked())); @@ -61,9 +62,9 @@ MainWindowImp::MainWindowImp(QWidget *parent, const char *name) : MainWindow(par connect(newProfile, SIGNAL(textChanged(const QString&)), this, SLOT(newProfileChanged(const QString&))); //FIXME: disable profiles for the moment: -// tabWidget->setTabEnabled( tab, false ); + tabWidget->setTabEnabled( tab, false ); // Load connections. // /usr/local/kde/lib/libinterfaces.la #ifdef QWS @@ -77,8 +78,16 @@ MainWindowImp::MainWindowImp(QWidget *parent, const char *name) : MainWindow(par Interfaces i; QStringList list = i.getInterfaceList(); QMap<QString, Interface*>::Iterator it; for ( QStringList::Iterator ni = list.begin(); ni != list.end(); ++ni ) { + /* + * we skipped it in getAllInterfaces now + * we need to ignore it as well + */ + if (m_handledIfaces.contains( *ni) ) { + qDebug("Not up iface handled by module"); + continue; + } bool found = false; for( it = interfaceNames.begin(); it != interfaceNames.end(); ++it ){ if(it.key() == (*ni)) found = true; @@ -195,8 +204,12 @@ void MainWindowImp::getAllInterfaces(){ } for (QStringList::Iterator it = ifaces.begin(); it != ifaces.end(); ++it) { int flags = 0; + if ( m_handledIfaces.contains( (*it) ) ) { + qDebug(" %s is handled by a module", (*it).latin1() ); + continue; + } // int family; i = NULL; strcpy(ifr.ifr_name, (*it).latin1()); @@ -306,8 +319,9 @@ Module* MainWindowImp::loadPlugin(const QString &pluginFileName, const QString & delete lib; return NULL; } + m_handledIfaces += object->handledInterfaceNames(); // Store for deletion later libraries.insert(object, lib); return object; @@ -425,9 +439,9 @@ void MainWindowImp::configureClicked(){ return; } } - InterfaceSetupImpDialog *configure = new InterfaceSetupImpDialog(this, "InterfaceSetupImp", i, true, Qt::WDestructiveClose ); + InterfaceSetupImpDialog *configure = new InterfaceSetupImpDialog(this, "InterfaceSetupImp", i, true, Qt::WDestructiveClose | Qt::WStyle_ContextHelp ); configure->setProfile(currentProfileText); configure->showMaximized(); } @@ -458,9 +472,9 @@ void MainWindowImp::informationClicked(){ #endif return; } } - InterfaceInformationImp *information = new InterfaceInformationImp(this, "InterfaceSetupImp", i, Qt::WType_Modal | Qt::WDestructiveClose | Qt::WStyle_Dialog); + InterfaceInformationImp *information = new InterfaceInformationImp(this, "InterfaceSetupImp", i, Qt::WType_Modal | Qt::WDestructiveClose | Qt::WStyle_Dialog | Qt::WStyle_ContextHelp); information->showMaximized(); } /** @@ -638,9 +652,8 @@ void MainWindowImp::makeChannel() void MainWindowImp::receive(const QCString &msg, const QByteArray &arg) { bool found = false; qDebug("MainWindowImp::receive QCop msg >"+msg+"<"); - if (msg == "raise") { raise(); return; } |