[PC-BSD Commits] r668 - pcbsd/trunk/NetworkTray

svn at pcbsd.org svn at pcbsd.org
Wed Sep 5 13:50:59 PDT 2007


Author: kris
Date: 2007-09-05 13:50:59 -0700 (Wed, 05 Sep 2007)
New Revision: 668

Modified:
   pcbsd/trunk/NetworkTray/NetworkTray.cpp
   pcbsd/trunk/NetworkTray/NetworkTray.h
Log:

Fixed up the logic with NetworkTray app, now it'll properly open up
the device configuration specficially when you choose "Configure Device"



Modified: pcbsd/trunk/NetworkTray/NetworkTray.cpp
===================================================================
--- pcbsd/trunk/NetworkTray/NetworkTray.cpp	2007-09-05 20:30:00 UTC (rev 667)
+++ pcbsd/trunk/NetworkTray/NetworkTray.cpp	2007-09-05 20:50:59 UTC (rev 668)
@@ -5,6 +5,7 @@
 #include <qprocess.h>
 #include <qtooltip.h>
 #include <qimage.h>
+#include <qtranslator.h>
 
 /* KDE */
 #include <kiconloader.h>
@@ -42,6 +43,7 @@
 
 }
 
+
 void NetworkTray::programInit(QString Type, QString Device)
 {
     QString tmp;
@@ -333,16 +335,23 @@
 
 void NetworkTray::mouseDoubleClickEvent(QMouseEvent *e) {
    if(e != NULL) {
-      openConfigDlg();
+      openNetManager();
    }
 }
 
 
 void  NetworkTray::openConfigDlg() {
 
-	QProcess  process(QStringList::split(' ', "kcmshell pcbsdnetwork"));
-   	   if(!process.start())
+	if ( DeviceType == "Ethernet" )
+	{
+		   QProcess  process(QStringList::split(' ', "/usr/local/bin/kdesu --noignorebutton -d  /PCBSD/networkmanager/bin/ethernetconfig " + DeviceName));
+   		   if(!process.start())
       		   KMessageBox::error(this,  tr("Can not start network configuration utility."));
+	} else {
+		   QProcess  process(QStringList::split(' ', "/usr/local/bin/kdesu --noignorebutton -d  /PCBSD/networkmanager/bin/wificonfig " + DeviceName));
+   		   if(!process.start())
+      		   KMessageBox::error(this,  tr("Can not start network configuration utility."));
+	}
 
 }
 

Modified: pcbsd/trunk/NetworkTray/NetworkTray.h
===================================================================
--- pcbsd/trunk/NetworkTray/NetworkTray.h	2007-09-05 20:30:00 UTC (rev 667)
+++ pcbsd/trunk/NetworkTray/NetworkTray.h	2007-09-05 20:50:59 UTC (rev 668)
@@ -17,13 +17,14 @@
    virtual ~NetworkTray() {};
    
 private slots:
+   void openNetManager();
+   void openDeviceInfo();
    void openConfigDlg();
    void monitorStatus();
    void slotRestartNetwork();
    void slotEnablePPPOE();
    void slotDisablePPPOE();
-   void openNetManager();
-   void openDeviceInfo();
+
    
 protected:
    virtual void mouseDoubleClickEvent(QMouseEvent *e);



More information about the Commits mailing list