[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdenetwork/wifi
From:       Stefan Winter <swinter () kde ! org>
Date:       2006-09-26 13:29:10
Message-ID: 1159277350.196816.3739.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 588606 by swinter:

some random fixes, mostly slots moved around
discovered that KNetwork::KNetworkInterface::address() crashes
when the interface does not have any IPs at all (TBD libs?)


 M  +9 -3      kwifi_ifaceimpl.cpp  
 M  +3 -2      kwifi_ifaceimpl.h  
 M  +1 -17     kwifimanager.cpp  
 M  +0 -2      kwifimanager.h  
 M  +2 -0      main.cpp  


--- trunk/KDE/kdenetwork/wifi/kwifi_ifaceimpl.cpp #588605:588606
@@ -89,7 +89,7 @@
   this->setWindowIcon ( temp );
 }
 
-KWiFi_Iface::KWiFi_Iface ( QStringList* ignoreList )
+KWiFi_Iface::KWiFi_Iface ( QStringList* ignoreList, QObject* parent )
 {
 
   device = new Interface_wireless_wirelessextensions ( ignoreList );
@@ -120,13 +120,13 @@
   connect ( device, SIGNAL ( statsUpdated (  ) ), statistik, SLOT ( update (  ) ) );
   connect ( device, SIGNAL ( statsUpdated (  ) ), this, SLOT ( \
updateStatsSurroundings (  ) ) );  
-  connect ( device, SIGNAL ( interfaceChanged (  ) ), this, SLOT ( \
slotChangeWindowCaption (  ) ) ); +  connect ( device, SIGNAL ( interfaceChanged (  ) \
), parent, SLOT ( slotChangeWindowCaption (  ) ) );  connect ( device, SIGNAL ( \
strengthChanged ( int, int, int ) ), this, SLOT ( updateTrayIcon ( int, int, int ) ) \
);  connect ( device, SIGNAL ( strengthChanged ( int, int, int ) ), this, SLOT ( \
updateStrengthBar ( int, int, int ) ) );  connect ( device, SIGNAL ( statusChanged (  \
) ), this, SLOT ( updateStatus (  ) ) );  connect ( device, SIGNAL ( speedChanged ( \
signed long ) ), this, SLOT ( updateSpeed ( signed long ) ) );  connect ( device, \
SIGNAL ( modeChanged ( CARDSTATES ) ), this, SLOT ( updateCardState ( CARDSTATES ) ) \
                );
-  connect ( device, SIGNAL ( essidChanged ( QString ) ), this, SLOT ( slotLogESSID ( \
QString ) ) ); +  connect ( device, SIGNAL ( essidChanged ( QString ) ), parent, SLOT \
( slotLogESSID ( QString ) ) );  connect ( device, SIGNAL ( txPowerChanged (  ) ), \
this, SLOT ( slotTXPowerChanged (  ) ) );  connect ( iface_ui.networkScan, SIGNAL ( \
clicked (  ) ), this, SLOT ( slotNetworkScan (  ) ) );  connect ( \
iface_ui.statsButton, SIGNAL ( clicked (  ) ), this, SLOT ( toggleStats (  ) ) ); @@ \
-143,6 +143,12 @@  }
 
 void
+KWiFi_Iface::slotTXPowerChanged (  )
+{
+	  iface_ui.disableRadio->setChecked ( device->get_txpower_disabled (  ) );
+}
+
+void
 KWiFi_Iface::updateStatsSurroundings (  )
 {
   int top = statistik->determineTop (  );
--- trunk/KDE/kdenetwork/wifi/kwifi_ifaceimpl.h #588605:588606
@@ -35,8 +35,7 @@
 {
 	Q_OBJECT
 	public:
-		KWiFi_Iface ( QStringList* ignoreInterfaces );
-		void tricorderBeep ();
+		KWiFi_Iface ( QStringList* ignoreInterfaces, QObject* parent );
 	public slots:
 		void updateTrayIcon ( int newQual, int newSig, int newNoise );
 		void updateStatsSurroundings (  );
@@ -47,7 +46,9 @@
 		void slotNetworkScan (  );
 		void toggleStats (  );
 		void slotDisableRadio (  );
+		void slotTXPowerChanged (  );
 		void slotToggleTric (  );
+		void tricorderBeep (  );
 		QString careOfInterface ( ) { return device->get_interface_name(); };
 	private:
 		Interface_wireless* device;
--- trunk/KDE/kdenetwork/wifi/kwifimanager.cpp #588605:588606
@@ -138,12 +138,6 @@
 
   initActions (  );
 
-#if WIRELESS_EXT > 9
-  fileDisableRadio->setEnabled ( true );
-#else
-  fileDisableRadio->setEnabled ( false );
-#endif
-
   setAutoSaveSettings (  );
 
   resize ( sizeHint (  ) );
@@ -216,21 +210,11 @@
 }
 
 void
-KWiFiManagerApp::slotTXPowerChanged (  )
-{
-  fileDisableRadio->setChecked ( device->get_txpower_disabled (  ) );
-}
-
-
-void
 KWiFiManagerApp::initActions (  )
 {
   KConfig *config = KGlobal::config (  );
   if ( config->hasGroup ( "General" ) )
     config->setGroup ( "General" );
-  fileDisableRadio = new KToggleAction( i18n ( "&Disable Radio" ), actionCollection \
                (  ), "disable_radio" );
-  connect(fileDisableRadio, SIGNAL(triggered(bool) ), SLOT ( slotDisableRadio (  ) \
                ));
-  fileDisableRadio->setChecked ( false );
 
   KStdAction::quit ( this, SLOT ( slotFileQuit (  ) ), actionCollection (  ) );
 
@@ -258,7 +242,7 @@
   // create the first instance of a wireless interface. When it finds a careOf \
interface, slotChangeWindowCaption  // fires anoher instance and so all interfaces \
are iterated  empty = new QStringList();
-  KWiFi_Iface* newIface = new KWiFi_Iface(empty);
+  KWiFi_Iface* newIface = new KWiFi_Iface(empty, this);
   iface_tabs->addTab( newIface, newIface->careOfInterface() );
   slotChangeWindowCaption ( newIface->careOfInterface() );
   iface_tabs->show();
--- trunk/KDE/kdenetwork/wifi/kwifimanager.h #588605:588606
@@ -101,7 +101,6 @@
   void slotStartConfigEditor (  );
   void slotChangeWindowCaption ( QString interface );
   void slotLogESSID ( QString essid );
-  void slotTXPowerChanged (  );
   void showSettings (  );
   void loadSettings (  );
   virtual bool queryClose (  );
@@ -118,7 +117,6 @@
   Ui::Behaviour behaviour_ui;
   Statistics *statistik;
   QGridLayout *zentrallayout;
-  KToggleAction *fileDisableRadio;
   KToggleAction *settingsAcousticScanning;
   KSystemTray *trayicon;
   void initAccessPointDatabase (  );
--- trunk/KDE/kdenetwork/wifi/main.cpp #588605:588606
@@ -40,6 +40,8 @@
   aboutData.addAuthor ( "Stefan Winter", I18N_NOOP ( "Original Author and \
Maintainer" ), "swinter@kde.org" );  aboutData.addCredit ( "Helge Deller", I18N_NOOP \
( "Lots of Fixes and Optimizations, added Session Management" ),  "deller@kde.org" );
+  aboutData.setAppName ( "KWiFiManager" );
+
   KCmdLineArgs::init ( argc, argv, &aboutData );
   KCmdLineArgs::addCmdLineOptions ( options );	// Add our own options.
   KCmdLineArgs *args = KCmdLineArgs::parsedArgs (  );


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic