[PC-BSD Commits] r105 - pcbsd/trunk/NetworkManager

svn at pcbsd.org svn at pcbsd.org
Thu Feb 22 12:02:09 PST 2007


Author: kris
Date: 2007-02-22 21:02:08 +0100 (Thu, 22 Feb 2007)
New Revision: 105

Added:
   pcbsd/trunk/NetworkManager/GetNetName.sh
   pcbsd/trunk/NetworkManager/connect_to_network.png
   pcbsd/trunk/NetworkManager/file_broken.png
Modified:
   pcbsd/trunk/NetworkManager/NetworkManager.pro
   pcbsd/trunk/NetworkManager/NetworkManager_en.ts
   pcbsd/trunk/NetworkManager/kcm.cpp
   pcbsd/trunk/NetworkManager/kcm.h
   pcbsd/trunk/NetworkManager/network_local.png
   pcbsd/trunk/NetworkManager/networkman.ui
   pcbsd/trunk/NetworkManager/networkman.ui.h
Log:
Initial Import of Network Manager KCM module 0.5 Beta

Added: pcbsd/trunk/NetworkManager/GetNetName.sh


Property changes on: pcbsd/trunk/NetworkManager/GetNetName.sh
___________________________________________________________________
Name: svn:executable
   + *

Modified: pcbsd/trunk/NetworkManager/NetworkManager.pro
===================================================================
--- pcbsd/trunk/NetworkManager/NetworkManager.pro	2007-02-14 22:19:24 UTC (rev 104)
+++ pcbsd/trunk/NetworkManager/NetworkManager.pro	2007-02-22 20:02:08 UTC (rev 105)
@@ -8,11 +8,11 @@
 SOURCES	+= kcm.cpp
 
 FORMS	= networkman.ui \
-	netproperties.ui \
 	restartpopup.ui \
 	notroot.ui
 
-IMAGES	= network_local.png
+IMAGES	= connect_to_network.png \
+	network_local.png
 
 TRANSLATIONS = NetworkManager_en.ts
 

Modified: pcbsd/trunk/NetworkManager/NetworkManager_en.ts
===================================================================
--- pcbsd/trunk/NetworkManager/NetworkManager_en.ts	2007-02-14 22:19:24 UTC (rev 104)
+++ pcbsd/trunk/NetworkManager/NetworkManager_en.ts	2007-02-22 20:02:08 UTC (rev 105)
@@ -1,69 +1,52 @@
 <!DOCTYPE TS><TS>
 <context>
-    <name>NetProperties</name>
+    <name>NetworkMan</name>
     <message>
-        <source>Device Properties</source>
+        <source>PC-BSD Network Manager</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <source>Device Settings</source>
+        <source>Devices</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <source>IP Address:</source>
+        <source>Device Status</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <source>Use DHCP</source>
+        <source>Alt+C</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <source>Static IP Address</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>...</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
         <source>999\.999\.999\.999; </source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <source>&amp;Cancel</source>
+        <source>IP Address:</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <source>Alt+C</source>
+        <source>MAC Address:</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <source>&amp;Save</source>
+        <source>Link Status:</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <source>Alt+S</source>
+        <source>&amp;Configure</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <source>Netmask:</source>
+        <source>Local Network Adapters</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <source>Missing Fields</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>You must enter an IP and Netmask to continue!
-</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
         <source>Warning</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <source>IP Address is out of range! (</source>
+        <source>DNS #1 is out of range! (</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
@@ -71,111 +54,74 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <source>Netmask is out of range! (</source>
+        <source>DNS #2 is out of range! (</source>
         <translation type="unfinished"></translation>
     </message>
-</context>
-<context>
-    <name>NetworkMan</name>
     <message>
-        <source>PC-BSD Network Manager</source>
+        <source>Gateway is out of range! (</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <source>Devices</source>
+        <source>Display system tray icon</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <source>Detected Network Adapters</source>
+        <source>DNS / Gateway</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <source>&amp;Properties</source>
+        <source>Below you can set system-wide configuration settings for your network setup.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <source>Alt+P</source>
+        <source>DNS Configuration</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <source>Device Status</source>
+        <source>Server 2:</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <source>Link:</source>
+        <source>Server 1:</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <source>IP:</source>
+        <source>Below you can specify your DNS settings if your ISP requires them. Normally when using DHCP this is not necessary.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <source>MAC:</source>
+        <source>Default Router / Gateway device:</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <source>&amp;Close</source>
+        <source>System Hostname:</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <source>Alt+C</source>
+        <source>Refresh List</source>
         <translation type="unfinished"></translation>
     </message>
+</context>
+<context>
+    <name>NotRoot</name>
     <message>
-        <source>Global Settings</source>
+        <source>Root Access Required</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <source>These settings apply to all network devices on your system.</source>
+        <source>This program must be run as root. Click the &quot;Administrator Mode&quot; button below or restart the program as root.</source>
         <translation type="unfinished"></translation>
     </message>
+</context>
+<context>
+    <name>restartPopup</name>
     <message>
-        <source>999\.999\.999\.999; </source>
+        <source>Restarting Network</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <source>Hostname:</source>
+        <source>Restarting the Network... Please Wait...</source>
         <translation type="unfinished"></translation>
     </message>
-    <message>
-        <source>&amp;Save</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Alt+S</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Default Router:</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>DNS Server 1:</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>DNS Server 2:</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Warning</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>DNS #1 is out of range! (</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>) Fields must be between 0-255.</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>DNS #2 is out of range! (</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Gateway is out of range! (</source>
-        <translation type="unfinished"></translation>
-    </message>
 </context>
 </TS>

Added: pcbsd/trunk/NetworkManager/connect_to_network.png


Property changes on: pcbsd/trunk/NetworkManager/connect_to_network.png
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream

Added: pcbsd/trunk/NetworkManager/file_broken.png


Property changes on: pcbsd/trunk/NetworkManager/file_broken.png
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream

Modified: pcbsd/trunk/NetworkManager/kcm.cpp
===================================================================
--- pcbsd/trunk/NetworkManager/kcm.cpp	2007-02-14 22:19:24 UTC (rev 104)
+++ pcbsd/trunk/NetworkManager/kcm.cpp	2007-02-22 20:02:08 UTC (rev 105)
@@ -6,27 +6,28 @@
 #include <networkman.h>
 #include <notroot.h>
 #include <kcm.h>
+#include <kcmodule.h>
+#include <kaboutdata.h>
 
 
-PCBSDKCModule::PCBSDKCModule(QWidget  *parent,
-                           const char  *name,
-                           __unused  const QStringList &  list)
+PCBSDKCModule::PCBSDKCModule(QWidget  *parent, const char  *name, const QStringList &  list)
    :    KCModule(parent, name)
 {
-  layout = new QGridLayout(this);
+  setButtons(KCModule::Apply);
+
+  QGridLayout *layout = new QGridLayout(this);
   layout->setAutoAdd(true);
-  
-  buttons();
-  
+
   if ( checkRoot() )
   {
-   buttons();
-   setButtons(KCModule::Help);
-  NetworkMan *netproc = new NetworkMan(parent);
+  netproc = new NetworkMan(parent);
   netproc->Init();
   netproc->reparent(this, QPoint());
+
+  connect(netproc, SIGNAL(changed(bool) ), this, SLOT(configChanged() ) );
+
   } else  {
-      setButtons(KCModule::Help);
+
       NotRoot *nroot = new NotRoot(parent);
       nroot->reparent(this, QPoint());
   }
@@ -41,6 +42,9 @@
     return (getuid() == 0);
 }
 
+int    PCBSDKCModule::buttons() {
+   return KCModule::Apply; 
+}
 
 void    PCBSDKCModule::load() {
     
@@ -53,8 +57,14 @@
 
 
 void    PCBSDKCModule::save() {
+    
+   netproc->save();
+   emit changed(FALSE);
 }
 
+void    PCBSDKCModule::configChanged() {
+	emit changed(TRUE);
+}
 
 /*
 * Start the KFactory Creation  
@@ -79,6 +89,10 @@
 PCBSDNETWORK::~PCBSDNETWORK() {
 }
 
+int    PCBSDNETWORK::buttons() {
+   return KCModule::Apply; 
+}
+
 QString  PCBSDNETWORK::kcmoduleName() {
    return  "pcbsdnetwork";
 }

Modified: pcbsd/trunk/NetworkManager/kcm.h
===================================================================
--- pcbsd/trunk/NetworkManager/kcm.h	2007-02-14 22:19:24 UTC (rev 104)
+++ pcbsd/trunk/NetworkManager/kcm.h	2007-02-22 20:02:08 UTC (rev 105)
@@ -3,9 +3,9 @@
 #include <qdialog.h>
 #include <networkman.h>
 #include <kcmodule.h>
+#include <kaboutdata.h>
 
 
-
 class  PCBSDKCModule : public KCModule {
    Q_OBJECT
 
@@ -16,8 +16,16 @@
    void load();
    void defaults();
    void save();
+   virtual int buttons();
    bool checkRoot();
    QLayout 	*layout;
+
+public slots:
+   void configChanged();
+
+private: 
+   NetworkMan *netproc;
+
 };
 
 
@@ -30,6 +38,7 @@
    PCBSDNETWORK(QWidget * = NULL,  const char * = NULL,  const QStringList & = QStringList() );
    virtual  ~PCBSDNETWORK();
 void   getParent(QWidget * = NULL);
+virtual int buttons();
    
 protected:
    QString      kcmoduleName();

Modified: pcbsd/trunk/NetworkManager/network_local.png
===================================================================
(Binary files differ)

Modified: pcbsd/trunk/NetworkManager/networkman.ui
===================================================================
--- pcbsd/trunk/NetworkManager/networkman.ui	2007-02-14 22:19:24 UTC (rev 104)
+++ pcbsd/trunk/NetworkManager/networkman.ui	2007-02-22 20:02:08 UTC (rev 105)
@@ -8,20 +8,20 @@
         <rect>
             <x>0</x>
             <y>0</y>
-            <width>535</width>
-            <height>468</height>
+            <width>674</width>
+            <height>663</height>
         </rect>
     </property>
     <property name="caption">
         <string>PC-BSD Network Manager</string>
     </property>
     <property name="icon">
-        <pixmap>network_local.png</pixmap>
+        <pixmap>image0</pixmap>
     </property>
     <property name="sizeGripEnabled">
         <bool>true</bool>
     </property>
-    <vbox>
+    <grid>
         <property name="name">
             <cstring>unnamed</cstring>
         </property>
@@ -31,7 +31,7 @@
         <property name="spacing">
             <number>6</number>
         </property>
-        <widget class="QTabWidget">
+        <widget class="QTabWidget" row="0" column="0">
             <property name="name">
                 <cstring>tabNetMan</cstring>
             </property>
@@ -46,179 +46,203 @@
                     <property name="name">
                         <cstring>unnamed</cstring>
                     </property>
-                    <widget class="QLabel" row="0" column="0" rowspan="1" colspan="5">
+                    <widget class="Line" row="5" column="0" rowspan="1" colspan="4">
                         <property name="name">
-                            <cstring>textLabel1</cstring>
+                            <cstring>line1</cstring>
                         </property>
+                        <property name="frameShape">
+                            <enum>HLine</enum>
+                        </property>
+                        <property name="frameShadow">
+                            <enum>Sunken</enum>
+                        </property>
+                        <property name="orientation">
+                            <enum>Horizontal</enum>
+                        </property>
+                    </widget>
+                    <widget class="QLabel" row="6" column="0" rowspan="1" colspan="4">
+                        <property name="name">
+                            <cstring>textLabel2</cstring>
+                        </property>
                         <property name="text">
-                            <string>Detected Network Adapters</string>
+                            <string>Device Status</string>
                         </property>
                         <property name="alignment">
-                            <set>AlignTop|AlignLeft</set>
+                            <set>AlignCenter</set>
                         </property>
                     </widget>
-                    <widget class="QListBox" row="1" column="0" rowspan="1" colspan="5">
+                    <widget class="QLabel" row="8" column="0">
                         <property name="name">
-                            <cstring>listNetDev</cstring>
+                            <cstring>textStatusLabel2</cstring>
                         </property>
-                        <property name="sizePolicy">
-                            <sizepolicy>
-                                <hsizetype>7</hsizetype>
-                                <vsizetype>7</vsizetype>
-                                <horstretch>0</horstretch>
-                                <verstretch>0</verstretch>
-                            </sizepolicy>
+                        <property name="text">
+                            <string>IP Address:</string>
                         </property>
-                        <property name="font">
-                            <font>
-                                <pointsize>9</pointsize>
-                            </font>
+                        <property name="alignment">
+                            <set>AlignVCenter|AlignRight</set>
                         </property>
                     </widget>
-                    <spacer row="2" column="2">
+                    <widget class="QLabel" row="9" column="0">
                         <property name="name">
-                            <cstring>spacer2</cstring>
+                            <cstring>textStatusLabel3</cstring>
                         </property>
-                        <property name="orientation">
-                            <enum>Vertical</enum>
+                        <property name="text">
+                            <string>MAC Address:</string>
                         </property>
-                        <property name="sizeType">
-                            <enum>Fixed</enum>
+                        <property name="alignment">
+                            <set>AlignVCenter|AlignRight</set>
                         </property>
-                        <property name="sizeHint">
-                            <size>
-                                <width>20</width>
-                                <height>30</height>
-                            </size>
+                    </widget>
+                    <widget class="QLabel" row="7" column="0">
+                        <property name="name">
+                            <cstring>textStatusLabel1</cstring>
                         </property>
-                    </spacer>
-                    <spacer row="2" column="0" rowspan="1" colspan="2">
+                        <property name="text">
+                            <string>Link Status:</string>
+                        </property>
+                        <property name="alignment">
+                            <set>AlignVCenter|AlignRight</set>
+                        </property>
+                    </widget>
+                    <widget class="QLabel" row="7" column="1" rowspan="1" colspan="3">
                         <property name="name">
-                            <cstring>spacer4</cstring>
+                            <cstring>textStatus1</cstring>
                         </property>
-                        <property name="orientation">
-                            <enum>Horizontal</enum>
+                        <property name="text">
+                            <string></string>
                         </property>
-                        <property name="sizeType">
-                            <enum>Expanding</enum>
+                    </widget>
+                    <widget class="QLabel" row="8" column="1" rowspan="1" colspan="3">
+                        <property name="name">
+                            <cstring>textStatus2</cstring>
                         </property>
-                        <property name="sizeHint">
-                            <size>
-                                <width>91</width>
-                                <height>21</height>
-                            </size>
+                        <property name="text">
+                            <string></string>
                         </property>
-                    </spacer>
-                    <widget class="QPushButton" row="2" column="4">
+                    </widget>
+                    <widget class="QLabel" row="9" column="1" rowspan="1" colspan="3">
                         <property name="name">
-                            <cstring>pushProperties</cstring>
+                            <cstring>textStatus3</cstring>
                         </property>
                         <property name="text">
-                            <string>&amp;Properties</string>
+                            <string></string>
                         </property>
+                    </widget>
+                    <widget class="QPushButton" row="3" column="3" rowspan="2" colspan="1">
+                        <property name="name">
+                            <cstring>pushConfigure</cstring>
+                        </property>
+                        <property name="text">
+                            <string>&amp;Configure</string>
+                        </property>
                         <property name="accel">
-                            <string>Alt+P</string>
+                            <string>Alt+C</string>
                         </property>
                     </widget>
-                    <spacer row="2" column="3">
+                    <spacer row="3" column="2">
                         <property name="name">
-                            <cstring>spacer3</cstring>
+                            <cstring>spacer10</cstring>
                         </property>
                         <property name="orientation">
-                            <enum>Horizontal</enum>
+                            <enum>Vertical</enum>
                         </property>
                         <property name="sizeType">
-                            <enum>Expanding</enum>
+                            <enum>Minimum</enum>
                         </property>
                         <property name="sizeHint">
                             <size>
-                                <width>81</width>
+                                <width>20</width>
                                 <height>20</height>
                             </size>
                         </property>
                     </spacer>
-                    <widget class="Line" row="3" column="0" rowspan="1" colspan="5">
+                    <spacer row="4" column="2">
                         <property name="name">
-                            <cstring>line1</cstring>
+                            <cstring>spacer3</cstring>
                         </property>
-                        <property name="frameShape">
-                            <enum>HLine</enum>
-                        </property>
-                        <property name="frameShadow">
-                            <enum>Sunken</enum>
-                        </property>
                         <property name="orientation">
                             <enum>Horizontal</enum>
                         </property>
-                    </widget>
-                    <widget class="QLabel" row="4" column="0" rowspan="1" colspan="5">
-                        <property name="name">
-                            <cstring>textLabel2</cstring>
+                        <property name="sizeType">
+                            <enum>Expanding</enum>
                         </property>
-                        <property name="text">
-                            <string>Device Status</string>
+                        <property name="sizeHint">
+                            <size>
+                                <width>300</width>
+                                <height>20</height>
+                            </size>
                         </property>
-                        <property name="alignment">
-                            <set>AlignCenter</set>
-                        </property>
-                    </widget>
-                    <widget class="QLabel" row="5" column="1" rowspan="1" colspan="4">
+                    </spacer>
+                    <widget class="QCheckBox" row="3" column="0" rowspan="2" colspan="2">
                         <property name="name">
-                            <cstring>textLink</cstring>
+                            <cstring>checkSysTray</cstring>
                         </property>
                         <property name="text">
-                            <string></string>
+                            <string>Display system tray icon</string>
                         </property>
                     </widget>
-                    <widget class="QLabel" row="5" column="0">
+                    <spacer row="0" column="0" rowspan="1" colspan="4">
                         <property name="name">
-                            <cstring>textLabel3</cstring>
+                            <cstring>spacer10_2</cstring>
                         </property>
-                        <property name="text">
-                            <string>Link Status:</string>
+                        <property name="orientation">
+                            <enum>Vertical</enum>
                         </property>
-                        <property name="alignment">
-                            <set>AlignVCenter|AlignRight</set>
+                        <property name="sizeType">
+                            <enum>Fixed</enum>
                         </property>
-                    </widget>
-                    <widget class="QLabel" row="6" column="0">
+                        <property name="sizeHint">
+                            <size>
+                                <width>620</width>
+                                <height>20</height>
+                            </size>
+                        </property>
+                    </spacer>
+                    <widget class="QLabel" row="1" column="0" rowspan="1" colspan="3">
                         <property name="name">
-                            <cstring>textLabel4</cstring>
+                            <cstring>textLabel1</cstring>
                         </property>
                         <property name="text">
-                            <string>IP Address:</string>
+                            <string>Local Network Adapters</string>
                         </property>
                         <property name="alignment">
-                            <set>AlignVCenter|AlignRight</set>
+                            <set>AlignTop|AlignLeft</set>
                         </property>
                     </widget>
-                    <widget class="QLabel" row="6" column="1" rowspan="1" colspan="4">
+                    <widget class="QPushButton" row="1" column="3">
                         <property name="name">
-                            <cstring>textIP</cstring>
+                            <cstring>pushRefresh</cstring>
                         </property>
+                        <property name="sizePolicy">
+                            <sizepolicy>
+                                <hsizetype>0</hsizetype>
+                                <vsizetype>1</vsizetype>
+                                <horstretch>0</horstretch>
+                                <verstretch>0</verstretch>
+                            </sizepolicy>
+                        </property>
                         <property name="text">
-                            <string></string>
+                            <string>Refresh List</string>
                         </property>
                     </widget>
-                    <widget class="QLabel" row="7" column="0">
+                    <widget class="QListBox" row="2" column="0" rowspan="1" colspan="4">
                         <property name="name">
-                            <cstring>textLabel4_2</cstring>
+                            <cstring>listNetDev</cstring>
                         </property>
-                        <property name="text">
-                            <string>MAC Address:</string>
+                        <property name="sizePolicy">
+                            <sizepolicy>
+                                <hsizetype>7</hsizetype>
+                                <vsizetype>7</vsizetype>
+                                <horstretch>0</horstretch>
+                                <verstretch>0</verstretch>
+                            </sizepolicy>
                         </property>
-                        <property name="alignment">
-                            <set>AlignVCenter|AlignRight</set>
+                        <property name="font">
+                            <font>
+                                <pointsize>9</pointsize>
+                            </font>
                         </property>
                     </widget>
-                    <widget class="QLabel" row="7" column="1" rowspan="1" colspan="4">
-                        <property name="name">
-                            <cstring>textMAC</cstring>
-                        </property>
-                        <property name="text">
-                            <string></string>
-                        </property>
-                    </widget>
                 </grid>
             </widget>
             <widget class="QWidget">
@@ -226,74 +250,13 @@
                     <cstring>TabPage</cstring>
                 </property>
                 <attribute name="title">
-                    <string>Wireless Devices</string>
+                    <string>DNS / Gateway</string>
                 </attribute>
-                <widget class="QLabel">
-                    <property name="name">
-                        <cstring>textLabel1_2</cstring>
-                    </property>
-                    <property name="geometry">
-                        <rect>
-                            <x>10</x>
-                            <y>10</y>
-                            <width>326</width>
-                            <height>14</height>
-                        </rect>
-                    </property>
-                    <property name="text">
-                        <string>Detected Wireless Network Adapters</string>
-                    </property>
-                    <property name="alignment">
-                        <set>AlignTop|AlignLeft</set>
-                    </property>
-                </widget>
-                <widget class="QListBox">
-                    <property name="name">
-                        <cstring>listWirelessNetDev</cstring>
-                    </property>
-                    <property name="geometry">
-                        <rect>
-                            <x>10</x>
-                            <y>30</y>
-                            <width>326</width>
-                            <height>218</height>
-                        </rect>
-                    </property>
-                    <property name="sizePolicy">
-                        <sizepolicy>
-                            <hsizetype>7</hsizetype>
-                            <vsizetype>7</vsizetype>
-                            <horstretch>0</horstretch>
-                            <verstretch>0</verstretch>
-                        </sizepolicy>
-                    </property>
-                    <property name="font">
-                        <font>
-                            <pointsize>9</pointsize>
-                        </font>
-                    </property>
-                </widget>
-            </widget>
-            <widget class="QWidget">
-                <property name="name">
-                    <cstring>TabPage</cstring>
-                </property>
-                <attribute name="title">
-                    <string>PPPOE</string>
-                </attribute>
-            </widget>
-            <widget class="QWidget">
-                <property name="name">
-                    <cstring>TabPage</cstring>
-                </property>
-                <attribute name="title">
-                    <string>Global Settings</string>
-                </attribute>
                 <grid>
                     <property name="name">
                         <cstring>unnamed</cstring>
                     </property>
-                    <widget class="QLabel" row="0" column="0" rowspan="1" colspan="3">
+                    <widget class="QLabel" row="0" column="0" rowspan="1" colspan="9">
                         <property name="name">
                             <cstring>textLabel10</cstring>
                         </property>
@@ -304,14 +267,219 @@
                             <enum>Plain</enum>
                         </property>
                         <property name="text">
-                            <string>These settings apply to all network devices on your system.</string>
+                            <string>Below you can set system-wide configuration settings for your network setup.</string>
                         </property>
                         <property name="alignment">
-                            <set>WordBreak|AlignTop|AlignLeft</set>
+                            <set>WordBreak|AlignTop|AlignHCenter</set>
                         </property>
                     </widget>
-                    <widget class="QLineEdit" row="2" column="1" rowspan="1" colspan="2">
+                    <spacer row="1" column="0" rowspan="10" colspan="1">
                         <property name="name">
+                            <cstring>spacer17</cstring>
+                        </property>
+                        <property name="orientation">
+                            <enum>Horizontal</enum>
+                        </property>
+                        <property name="sizeType">
+                            <enum>Expanding</enum>
+                        </property>
+                        <property name="sizeHint">
+                            <size>
+                                <width>60</width>
+                                <height>430</height>
+                            </size>
+                        </property>
+                    </spacer>
+                    <spacer row="1" column="8" rowspan="10" colspan="1">
+                        <property name="name">
+                            <cstring>spacer16</cstring>
+                        </property>
+                        <property name="orientation">
+                            <enum>Horizontal</enum>
+                        </property>
+                        <property name="sizeType">
+                            <enum>Expanding</enum>
+                        </property>
+                        <property name="sizeHint">
+                            <size>
+                                <width>71</width>
+                                <height>410</height>
+                            </size>
+                        </property>
+                    </spacer>
+                    <spacer row="1" column="1" rowspan="1" colspan="7">
+                        <property name="name">
+                            <cstring>spacer13</cstring>
+                        </property>
+                        <property name="orientation">
+                            <enum>Vertical</enum>
+                        </property>
+                        <property name="sizeType">
+                            <enum>Fixed</enum>
+                        </property>
+                        <property name="sizeHint">
+                            <size>
+                                <width>430</width>
+                                <height>16</height>
+                            </size>
+                        </property>
+                    </spacer>
+                    <widget class="QGroupBox" row="7" column="1" rowspan="1" colspan="7">
+                        <property name="name">
+                            <cstring>groupBox1</cstring>
+                        </property>
+                        <property name="title">
+                            <string>DNS Configuration</string>
+                        </property>
+                        <grid>
+                            <property name="name">
+                                <cstring>unnamed</cstring>
+                            </property>
+                            <widget class="QLineEdit" row="2" column="2">
+                                <property name="name">
+                                    <cstring>lineDNS1</cstring>
+                                </property>
+                                <property name="sizePolicy">
+                                    <sizepolicy>
+                                        <hsizetype>0</hsizetype>
+                                        <vsizetype>0</vsizetype>
+                                        <horstretch>0</horstretch>
+                                        <verstretch>0</verstretch>
+                                    </sizepolicy>
+                                </property>
+                                <property name="alignment">
+                                    <set>AlignHCenter</set>
+                                </property>
+                                <property name="inputMask">
+                                    <string>999\.999\.999\.999; </string>
+                                </property>
+                            </widget>
+                            <widget class="QLineEdit" row="3" column="2">
+                                <property name="name">
+                                    <cstring>lineDNS2</cstring>
+                                </property>
+                                <property name="sizePolicy">
+                                    <sizepolicy>
+                                        <hsizetype>0</hsizetype>
+                                        <vsizetype>0</vsizetype>
+                                        <horstretch>0</horstretch>
+                                        <verstretch>0</verstretch>
+                                    </sizepolicy>
+                                </property>
+                                <property name="alignment">
+                                    <set>AlignHCenter</set>
+                                </property>
+                                <property name="inputMask">
+                                    <string>999\.999\.999\.999; </string>
+                                </property>
+                            </widget>
+                            <spacer row="2" column="3" rowspan="2" colspan="1">
+                                <property name="name">
+                                    <cstring>spacer11</cstring>
+                                </property>
+                                <property name="orientation">
+                                    <enum>Horizontal</enum>
+                                </property>
+                                <property name="sizeType">
+                                    <enum>Expanding</enum>
+                                </property>
+                                <property name="sizeHint">
+                                    <size>
+                                        <width>121</width>
+                                        <height>51</height>
+                                    </size>
+                                </property>
+                            </spacer>
+                            <widget class="QLabel" row="3" column="1">
+                                <property name="name">
+                                    <cstring>textLabel11_2_3</cstring>
+                                </property>
+                                <property name="text">
+                                    <string>Server 2:</string>
+                                </property>
+                                <property name="alignment">
+                                    <set>AlignVCenter|AlignRight</set>
+                                </property>
+                            </widget>
+                            <widget class="QLabel" row="2" column="1">
+                                <property name="name">
+                                    <cstring>textLabel11_2_2</cstring>
+                                </property>
+                                <property name="text">
+                                    <string>Server 1:</string>
+                                </property>
+                                <property name="alignment">
+                                    <set>AlignVCenter|AlignRight</set>
+                                </property>
+                            </widget>
+                            <spacer row="2" column="0" rowspan="2" colspan="1">
+                                <property name="name">
+                                    <cstring>spacer10_3</cstring>
+                                </property>
+                                <property name="orientation">
+                                    <enum>Horizontal</enum>
+                                </property>
+                                <property name="sizeType">
+                                    <enum>Expanding</enum>
+                                </property>
+                                <property name="sizeHint">
+                                    <size>
+                                        <width>81</width>
+                                        <height>41</height>
+                                    </size>
+                                </property>
+                            </spacer>
+                            <widget class="QLabel" row="0" column="0" rowspan="1" colspan="4">
+                                <property name="name">
+                                    <cstring>textLabel1_2</cstring>
+                                </property>
+                                <property name="text">
+                                    <string>Below you can specify your DNS settings if your ISP requires them. Normally when using DHCP this is not necessary.</string>
+                                </property>
+                                <property name="alignment">
+                                    <set>WordBreak|AlignVCenter</set>
+                                </property>
+                            </widget>
+                            <spacer row="1" column="2">
+                                <property name="name">
+                                    <cstring>spacer12</cstring>
+                                </property>
+                                <property name="orientation">
+                                    <enum>Vertical</enum>
+                                </property>
+                                <property name="sizeType">
+                                    <enum>Fixed</enum>
+                                </property>
+                                <property name="sizeHint">
+                                    <size>
+                                        <width>20</width>
+                                        <height>16</height>
+                                    </size>
+                                </property>
+                            </spacer>
+                        </grid>
+                    </widget>
+                    <widget class="QLineEdit" row="5" column="4">
+                        <property name="name">
+                            <cstring>lineGateway</cstring>
+                        </property>
+                        <property name="sizePolicy">
+                            <sizepolicy>
+                                <hsizetype>0</hsizetype>
+                                <vsizetype>0</vsizetype>
+                                <horstretch>0</horstretch>
+                                <verstretch>0</verstretch>
+                            </sizepolicy>
+                        </property>
+                        <property name="alignment">
+                            <set>AlignHCenter</set>
+                        </property>
+                        <property name="inputMask">
+                            <string>999\.999\.999\.999; </string>
+                        </property>
+                    </widget>
+                    <widget class="QLineEdit" row="3" column="4">
+                        <property name="name">
                             <cstring>lineHostname</cstring>
                         </property>
                         <property name="sizePolicy">
@@ -323,61 +491,93 @@
                             </sizepolicy>
                         </property>
                     </widget>
-                    <spacer row="1" column="0">
+                    <spacer row="2" column="6" rowspan="1" colspan="2">
                         <property name="name">
-                            <cstring>spacer15</cstring>
+                            <cstring>spacer12_2</cstring>
                         </property>
                         <property name="orientation">
-                            <enum>Vertical</enum>
+                            <enum>Horizontal</enum>
                         </property>
                         <property name="sizeType">
-                            <enum>Fixed</enum>
+                            <enum>Expanding</enum>
                         </property>
                         <property name="sizeHint">
                             <size>
-                                <width>20</width>
+                                <width>120</width>
                                 <height>21</height>
                             </size>
                         </property>
                     </spacer>
-                    <widget class="QLabel" row="2" column="0">
+                    <spacer row="2" column="1" rowspan="1" colspan="2">
                         <property name="name">
-                            <cstring>textLabel11</cstring>
+                            <cstring>spacer13_3</cstring>
                         </property>
-                        <property name="sizePolicy">
-                            <sizepolicy>
-                                <hsizetype>5</hsizetype>
-                                <vsizetype>5</vsizetype>
-                                <horstretch>0</horstretch>
-                                <verstretch>0</verstretch>
-                            </sizepolicy>
+                        <property name="orientation">
+                            <enum>Horizontal</enum>
                         </property>
-                        <property name="text">
-                            <string>Hostname:</string>
+                        <property name="sizeType">
+                            <enum>Expanding</enum>
                         </property>
-                        <property name="alignment">
-                            <set>AlignVCenter|AlignRight</set>
+                        <property name="sizeHint">
+                            <size>
+                                <width>131</width>
+                                <height>20</height>
+                            </size>
                         </property>
-                    </widget>
-                    <spacer row="7" column="1">
+                    </spacer>
+                    <spacer row="3" column="1" rowspan="1" colspan="3">
                         <property name="name">
-                            <cstring>spacer17</cstring>
+                            <cstring>spacer14</cstring>
                         </property>
                         <property name="orientation">
-                            <enum>Vertical</enum>
+                            <enum>Horizontal</enum>
                         </property>
                         <property name="sizeType">
                             <enum>Expanding</enum>
                         </property>
                         <property name="sizeHint">
                             <size>
-                                <width>20</width>
-                                <height>100</height>
+                                <width>151</width>
+                                <height>21</height>
                             </size>
                         </property>
                     </spacer>
-                    <spacer row="6" column="0" rowspan="1" colspan="2">
+                    <spacer row="3" column="5" rowspan="1" colspan="3">
                         <property name="name">
+                            <cstring>spacer15</cstring>
+                        </property>
+                        <property name="orientation">
+                            <enum>Horizontal</enum>
+                        </property>
+                        <property name="sizeType">
+                            <enum>Expanding</enum>
+                        </property>
+                        <property name="sizeHint">
+                            <size>
+                                <width>141</width>
+                                <height>21</height>
+                            </size>
+                        </property>
+                    </spacer>
+                    <spacer row="5" column="1" rowspan="1" colspan="3">
+                        <property name="name">
+                            <cstring>spacer18</cstring>
+                        </property>
+                        <property name="orientation">
+                            <enum>Horizontal</enum>
+                        </property>
+                        <property name="sizeType">
+                            <enum>Expanding</enum>
+                        </property>
+                        <property name="sizeHint">
+                            <size>
+                                <width>151</width>
+                                <height>21</height>
+                            </size>
+                        </property>
+                    </spacer>
+                    <spacer row="5" column="5" rowspan="1" colspan="3">
+                        <property name="name">
                             <cstring>spacer19</cstring>
                         </property>
                         <property name="orientation">
@@ -388,133 +588,180 @@
                         </property>
                         <property name="sizeHint">
                             <size>
-                                <width>200</width>
-                                <height>20</height>
+                                <width>141</width>
+                                <height>21</height>
                             </size>
                         </property>
                     </spacer>
-                    <widget class="QPushButton" row="6" column="2">
+                    <spacer row="4" column="1">
                         <property name="name">
-                            <cstring>pushSaveGlobal</cstring>
+                            <cstring>spacer16_2</cstring>
                         </property>
-                        <property name="text">
-                            <string>&amp;Save</string>
+                        <property name="orientation">
+                            <enum>Horizontal</enum>
                         </property>
-                        <property name="accel">
-                            <string>Alt+S</string>
+                        <property name="sizeType">
+                            <enum>Expanding</enum>
                         </property>
-                    </widget>
-                    <widget class="QLabel" row="3" column="0">
+                        <property name="sizeHint">
+                            <size>
+                                <width>80</width>
+                                <height>21</height>
+                            </size>
+                        </property>
+                    </spacer>
+                    <spacer row="4" column="7">
                         <property name="name">
-                            <cstring>textLabel11_2</cstring>
+                            <cstring>spacer17_2</cstring>
                         </property>
-                        <property name="text">
-                            <string>Default Router:</string>
+                        <property name="orientation">
+                            <enum>Horizontal</enum>
                         </property>
-                        <property name="alignment">
-                            <set>AlignVCenter|AlignRight</set>
+                        <property name="sizeType">
+                            <enum>Expanding</enum>
                         </property>
-                    </widget>
-                    <widget class="QLineEdit" row="3" column="1" rowspan="1" colspan="2">
+                        <property name="sizeHint">
+                            <size>
+                                <width>70</width>
+                                <height>21</height>
+                            </size>
+                        </property>
+                    </spacer>
+                    <widget class="QLabel" row="2" column="3" rowspan="1" colspan="3">
                         <property name="name">
-                            <cstring>lineGateway</cstring>
+                            <cstring>textLabel11</cstring>
                         </property>
                         <property name="sizePolicy">
                             <sizepolicy>
-                                <hsizetype>0</hsizetype>
+                                <hsizetype>5</hsizetype>
                                 <vsizetype>0</vsizetype>
                                 <horstretch>0</horstretch>
                                 <verstretch>0</verstretch>
                             </sizepolicy>
                         </property>
+                        <property name="text">
+                            <string>System Hostname:</string>
+                        </property>
                         <property name="alignment">
-                            <set>AlignHCenter</set>
+                            <set>AlignCenter</set>
                         </property>
-                        <property name="inputMask">
-                            <string>999\.999\.999\.999; </string>
-                        </property>
                     </widget>
-                    <widget class="QLineEdit" row="5" column="1" rowspan="1" colspan="2">
+                    <widget class="QLabel" row="4" column="2" rowspan="1" colspan="5">
                         <property name="name">
-                            <cstring>lineDNS2</cstring>
+                            <cstring>textLabel11_2</cstring>
                         </property>
                         <property name="sizePolicy">
                             <sizepolicy>
-                                <hsizetype>0</hsizetype>
+                                <hsizetype>5</hsizetype>
                                 <vsizetype>0</vsizetype>
                                 <horstretch>0</horstretch>
                                 <verstretch>0</verstretch>
                             </sizepolicy>
                         </property>
+                        <property name="text">
+                            <string>Default Router / Gateway device:</string>
+                        </property>
                         <property name="alignment">
-                            <set>AlignHCenter</set>
+                            <set>AlignCenter</set>
                         </property>
-                        <property name="inputMask">
-                            <string>999\.999\.999\.999; </string>
-                        </property>
                     </widget>
-                    <widget class="QLabel" row="4" column="0">
+                    <spacer row="6" column="1" rowspan="1" colspan="7">
                         <property name="name">
-                            <cstring>textLabel11_2_2</cstring>
+                            <cstring>spacer13_2</cstring>
                         </property>
-                        <property name="text">
-                            <string>DNS Server 1:</string>
+                        <property name="orientation">
+                            <enum>Vertical</enum>
                         </property>
-                        <property name="alignment">
-                            <set>AlignVCenter|AlignRight</set>
+                        <property name="sizeType">
+                            <enum>Fixed</enum>
                         </property>
-                    </widget>
-                    <widget class="QLabel" row="5" column="0">
+                        <property name="sizeHint">
+                            <size>
+                                <width>430</width>
+                                <height>20</height>
+                            </size>
+                        </property>
+                    </spacer>
+                    <spacer row="8" column="1" rowspan="1" colspan="7">
                         <property name="name">
-                            <cstring>textLabel11_2_3</cstring>
+                            <cstring>spacer13_2_2</cstring>
                         </property>
+                        <property name="orientation">
+                            <enum>Vertical</enum>
+                        </property>
+                        <property name="sizeType">
+                            <enum>Fixed</enum>
+                        </property>
+                        <property name="sizeHint">
+                            <size>
+                                <width>430</width>
+                                <height>20</height>
+                            </size>
+                        </property>
+                    </spacer>
+                    <widget class="QLabel" row="9" column="1" rowspan="1" colspan="7">
+                        <property name="name">
+                            <cstring>textGlobalError</cstring>
+                        </property>
+                        <property name="paletteForegroundColor">
+                            <color>
+                                <red>255</red>
+                                <green>0</green>
+                                <blue>0</blue>
+                            </color>
+                        </property>
                         <property name="text">
-                            <string>DNS Server 2:</string>
+                            <string></string>
                         </property>
                         <property name="alignment">
-                            <set>AlignVCenter|AlignRight</set>
+                            <set>AlignCenter</set>
                         </property>
                     </widget>
-                    <widget class="QLineEdit" row="4" column="1" rowspan="1" colspan="2">
+                    <spacer row="10" column="1" rowspan="1" colspan="7">
                         <property name="name">
-                            <cstring>lineDNS1</cstring>
+                            <cstring>spacer20</cstring>
                         </property>
-                        <property name="sizePolicy">
-                            <sizepolicy>
-                                <hsizetype>0</hsizetype>
-                                <vsizetype>0</vsizetype>
-                                <horstretch>0</horstretch>
-                                <verstretch>0</verstretch>
-                            </sizepolicy>
+                        <property name="orientation">
+                            <enum>Vertical</enum>
                         </property>
-                        <property name="alignment">
-                            <set>AlignHCenter</set>
+                        <property name="sizeType">
+                            <enum>Expanding</enum>
                         </property>
-                        <property name="inputMask">
-                            <string>999\.999\.999\.999; </string>
+                        <property name="sizeHint">
+                            <size>
+                                <width>420</width>
+                                <height>20</height>
+                            </size>
                         </property>
-                    </widget>
+                    </spacer>
                 </grid>
             </widget>
         </widget>
-    </vbox>
+    </grid>
 </widget>
+<images>
+    <image name="image0">
+        <data format="PNG" length="5466">89504e470d0a1a0a0000000d4948445200000040000000400806000000aa6971de0000152149444154789ced9b7f701ce779df3f9097f27beaa1dd530fea2d034cb02a61712f40867ba238bcabec0a18c5b540a95100a74e48b91a056a1b9bf2785439f574104deb81d4b4637126adc5da1e936a3212a9c4a5609721e0568a8e8a291d58feb86505f21615112e463863b7e40d6e2d9c71afc895b67fec1d0950a0445244d44cf3ccbcf3dcb3bbefbbeff37d9ef7799ff7ddf7e0ff736a59ed17880d23498171af0cacbb0562b344feb250cca40c2c8422908144607a126b5a28e2b80ce46b12f3cf39f9c5da6af70d56110075c3be2f10588fa9c9ec3feabb4b2adbef1bc44842ac678587172236760cfc59979d0746a57d3af5df64603d2b4f3efdfa6af5715548740fdfa3768f9c18f8da0be15c290c1717c388ceafcc17af70fdd45bf3e10b3be6c2cebb470eaa1b86377ed27a7d24a5baf7c545f7f01f0dffebe3e162b1a14c53f9771a7cfe3265e7afc0df59ce4776cc5de8dc7ce0193a47c427ade78aa476ef5b9fda3832fdea1f2f86f36717c3f07c18f1300c171b4acccdcd87e1f9309c9b5b6cf015e4f052bdb9066fca6f1c3913f6fef61b4745f713ed9fb4becb48edde77776ae3c8c29937c3303cdbb0dcdc152!
 c7ba661d50fe3e192762e97df0ac3dec7df7045f7f0fa4f5a6f20525edd30bc70a6b8d4922b5b70eeedc570f16c181e7f73ee8a3c3c1b8667de9ebf54fffc65ed9c8f9ecb3ef8ea270f82ba615fa7e81e765fddbf18866f37c6fbdb8df13db7c4728b61189622f154290ce7cf84e1fc9188bf71e4837238b7c4f2734bf8f9f0e27be6f26198da7ce0b4583792fcb87adc745db5eed9a7c8c0dad7ffd9ada9d47a097170bc2aa8e0941b7cb67ee97a3be40f392480c28c838c4361a6841effa09c9f714005d7ad4312dcd97ad49e578564c4b58d30f06b729d10f2bf7c5c00ae2b0f10ddc3ff7620d5f76f06bedac7e0dd800454c00352402592dd9320e350f44a6492698a1530926057ae2cf76f801851fdfa14c43aa1548174b2d16e124a1e680aa4b73e850c8c47fc135ffca3eb05e09a3d40740f770a457c53bdab4e6e3d387e151428cd541b9d8bf8d8090717c84f17d1e33af999227a1c26663e429e762e7a8e4c42fea4831e87b11325ea028a659774121ce9d2dfbb0d1958df56378ca8d70bc0a7aeb542fcb6afffa179c79a8dbf9ef93cfc9d185db7c5083c58bb3646e92ca46f8be1be09f2bce0e8ec517a123d1cfd19f424da38fab38f963775fc2a895b20715b8c580df4ce04fb8f401b71ecca1ada6825380b1da956bc771c9469ed16a7765acab387fee27a00b82!
 60f486d1c4949ac2f25d42cb667a1ab60cdb8a0427eda811a14a65d8a76958!
 233415d1
a14662d3aa5a4e05acbe5d9891565d42ab42d1ff3839b41a47cb66c005f7111ed60792e2606c2a802e663b40f5f5792744d0048c943423185337b102365529c0123a9f1dca102554765f4908b1a6858350b3d6e226b123dae63d52c8c84b14cbefcbe1e3731ba12e87a025cd09309f0404f252879904969d43d30531a56190c55c30aa07f631f226e2755d57c70d50100e3411958385e95df7f7e3731b78e5576a8d60cec8a851917d87e89816c1f9667a1c9688cfb52c79a5d22d75426660acbee7bd2664b2fb8e7ea172ddf8c29e92414bdc8d32ccfc54cc1f8c9129d126ccfc2d0fb915883ab0a80ba619f0ad63f108a0901f8359dc75edc89aae8985d09867afb98110ed24d30e1d479ea913eaa2987fe9e3eeab51209748ab53c7a20a956f2e8f134c55a013d9ea65e2b91d54da882d616834a64792a904e46dc486a585ec4a5079aa233519bc04c99e82917a198f75e0f00571f04935df72a8ad82a83328ad2830c2ca484c9f2696e3faff1f299a33cdc9b233f3dc9e494e4e51347f0e63426df9e2078bf0b79fe156aef38388b0914f1399cf9a3400fcefc24d0c59ab847669386ebd6694daec199ab92506394bc2a6d6a8ca3651723d98a55766853131cb227993ca3229532155f63f2cc2b42b9f5732f05954367570580f8daaff71354bea0283d1058288a094105dfef!
 c08f9d46bbb98b20d6c6e7fe7e07ef2ab37cf337fe21e2efb69169d3a8f83f24f97e17d3b556ba6e3528fb9374a92665dfa227d9c3ccbc45c72d9f61d36d095a3bd6c05c340be041dbad318a73d0736b2b8107895b13e44b25f4d62e3cbf85f879d83f314e101804f8f9e0ec417b550020d9f55b8ad2b35906168a22687a42edbc45d5af21439fe9196889bb6cfd6c86d3f32e9bda5b79e57f3ec7a6f8e7b1021fefac8e336fd1f27e17cebc45ece61e62f15984926172a68052e92096942452314ae5c8f2c5b28ba1b662792ead6a2bf9a912fa2fd21c999fe42ed1c1cc4d334cbe358bbf3883a0e7883cfbc3896b01e0aa6380c054092c9a3120e2912c6b609f5671dc09d4408ba2775c63f4e01ecc8e2c7dbd699ef9da16506c8cb841b566836a406063b667f06b45faba73e4fd02e33ff1d9f6cd9778ee070e43df7e094d68c8460c284c83a1a6b1823a19cdc0c2420d347c5f46fdc18a5f8bf2d70480c4024520030b14a3c12fc9beb470ca55dcc041aa50981ac3ad6854e3400a5cbfceb35fdb46acbd8a500cfcd305dc731a3b7e348a5fd379e9701ecfd3d8fdca38aeaf512c5b78159dc274091927b2bc0a965bc22446d1b5b0a7559e7e71f7b2feac1a00822596c75ed1130820a399144ee6c975e688892ab9ce0cc53268f1187a1c9e797c0bf9a7730cdd3788eb1791!
 b54e4a4e1e6d41076cc040535d32ed26d5aa8563c71af9461adb03b32d8d45!
 11433519
3f340acbde2f570f00895569222d0457f4841d3fda4bff862ce393e39822875571315428365689a572737e2f22a541b56621a5c48939101808c5c1afe9d89e4d2261327a2c8f26c0f24a184998708b181858150b3010c2bef47e4c7fd5001098334da485101fb07c53ee1429626a0c0d1d5bb131550d5906434d502c47f3fa4baf816527d0d419fa9239343541dfba2c32b0c9e92675696324a31831b0a10fdb0733998edcbf2d831d80a99908e1d09fea438d47fd915833ab0680c43ad9443a21321fb07c53f6021bdac0f66d0c4c0a9e0329b02b2e99e66ad1a922031b14035bb1d1f55e1c69934ae570a5434c31287a91851d59c24cc2c46c09234863cd16e90c60dccaa32773e89f8544bcd11f38b56a00a898c7086410215d448d67578c01fddd390006b2fdd8812497d2b11b195cdd83b49a60efc9714cc5006cd40e1355d898a90c0445ccce0ca9a443dfba2cf5c026818ee595a2b11fd431da0c2c6931fa0a686d0e66cac4f10a08c5f4e4c9a7a7570d00efe4176b60be26038bba8444dc5e31068c9f2844155290ed8282e7a0ab305176f1806d7fb007c7d5b08228e0f9b316be34b0bd222819ac0677039b6deb4caa58181712d8e7f26485c4ae5af8351d5f4ea0aa39f61e1e074006d69f5fabf200cab53c2cb1fe5428e6bdb266a367fb700fe51b96b72f79826b820!
 39aae51ad94d0fd68ec67da3576fe591e151da1588089c4c2c4c4f127e8bfbb0f5716e93772e84290d83008010cb5a5e10264d66850874c2c07360cdc35c49e8902f9836ae489987f72ed73c0356e89a91b465419c859a19871bdd383c0c09e8940687eeb03c9ab8f6f25f34fd300388e83f00585699b095b056cea350384859ecca2690e031bfbf0020fbd4b873ad19ed80560cd255eafd789c562cb3b7401f6fcd73176be4879e2c0d33a4c04ab0a4004c2be3f24b0bede97eaa3dae6e0b929dcca44633eb61171834c97c3d8ce6f40eba58eb20670010da80289151a6f3ed70461161050f24aa43bd3d19ea04ef42db1f552b5e2d162a029da6fafcdacdd77adfa5c330062c3705204e2340aaad9d587c4c275eb78be8f504cd4b88da6f53170b7c3f6070688e991d5aae7aa24da1217f9e54a57dd2a09128c1d1b23369b60bc5cc0ad44192601104806d66511dd926dbd83b8818bd6a15d6ca630510874457f60eda6b5ff7d55010050bb877f17c5fcaeaa3af4f7e4b02b368e9bc2af59f42773b86d0e4f3cb015cb19471702d101b9ce0c4e2d8ada5440aa92fcc93c9aa293b72d128a4ea16c63a85926ca16866a52f42c8ca4c1c4690bc74ba1aa0e83668e6a50e0f77f7310bd5d8f3ca20164e170a1a20bdd58bb696d6555010010ddc33f118af882de9e406d3541b1910!
 b3a52dae81d59b21b21a3183cf5674f23a58e103689986884dd28899141061!
 4073020b
0403191320a90f5c06a5cb7f1eb0650446dcd2169bca796e7854706487c3681aeeb518cf0638c1d1bdb75ff3fbeff9f5dad1ed7f7610410c2fc32819c76bd1460936b37d1da5c06b2bd0811adfa0a35499fb99544c2258349b50eba6a22031b3d6e4050c4505310141a999f859932008b5cbb494cb1c9ad33d135873ea30f946815e9940bb8be796cef89d147444dc0025180ac41a63df3d081fd07aefa8bd1c73a20a176bfb01ec539a8aa2295d613a8220b8a8596caa1c61d72f12c2fcde42148e3d7f2485f454a0b211aabb6c6c2ea22a84ae662862884832a4ca462e357746460539706f6e93c32604a4abf574eedf0767d7fd7e4d03f1fea6eb631f69331d2c9f4efdebee9f6ef5f8d0ed7ed0100fec987a6d4b8d94b40d93da747f37a7b8eba2c61244d0ab509facd1c5a4a30b07900634382adf70ca12635b2eb7208c526db9e4115b1488e3bf47767d1532e7deb4c687812d818aa81339b4728e69494f4caa91d1e404a49bd8ad3e8d0026452198a33c57bae56878f0500c0ccebf74fc5303649597cc3753526660a409a897201a198d8e76c7271154fdaf425b3f8f12a431bb712eb54d97ef77662ed826d1b06409518ebfa71159f6cb20f2770898928c04a69303e5920a68803be6fdd25a79ef49aefb73d5b926a08ad50f48ae817f475371a809646f9147033700bd1!
 d7c0db8076fbf5fb6f715e7ffa2bd2cfffa0aae8ef799502463c830c2419cd8c56851d268e02037765901d31fa7b3238b118d9ae1c4edc25d795251657e9ebcae208073395a35e2ba10983ea82b56804dabfb35ffbbdc7fca927e3c0ad91ba88be9ebe7b681ea7aa461e6007f60d8b01cdfb373594571a008825bc593e0d8854a7a91b776d7d3491d4eefa9dee7e3cd5c1d40cdcc061cbe6346ead8ea6c570dd88974e57d14582fc548974324d3d1ee5034f3d3f86e769efb9eef85fd8c7f6fec0f7ecff03bc0b9c6f96af7ee5ab1bfb1fe87f7ecb7d5ba25ed661ecb531b473dae13b1fbe337b35005c6953b46549b9e9b26be19202f0fe12b9a5e67b8b33a5570ed76bd5c33361e57d5d6c4a1d9d0b3efdab6d1a3f7deb34ba584bad0442ac61a2041d2246e10ce8a28dfdffab406da695dd07f6575b6be4c7c77eefbb53c7f6e665ad221bfdb858b21bb36d83bf3eb873f09f0c5ecc094b53256ebfe5768ece1fcd8f8e8efef86a00f8300f685972bfe532f9538db286c82b94c6ef9b81bfd52831e0661421b29b07eed0ba8c5fd153fd5d4238b799f15cab15141b51bf8821f59fe7fd89b3bee79cb1270b53f6c9836f2f013868940b342c6f769bf1ed8f6fff8f435f1efa6588deeccebaa8a858d3166256fcd69d0fdf390abcd730d07501b0942e8f154dcfb8bc3441583a!
 3462348647e3fea796949b2e03f6a3e8c2f083c377985bcd7f39f89b8397f2!
 e9734000
f5721d1f7f26dd9fcefa15ff1d22c0dee74340b8dae5f04a0d34af2d1d22e7898e4bfc824bca3683e6c538c1f238d204e3434148b5a7e2cf7ee5d987b55eedf3b96ceee2f56ab54a2248502c47e70c76beb8f349bfe2bf77957aadfe5159967bcbe5c3a5e9253737ca9a25f714608daaaab1a14786ee7be2cb4f3ca8a534156d49cb6ec4ea5e741c67efc1bddf7bf45f3cfaef819f13ad292fb03c5efd3f4137b1c2544ab4acb903e806cc547bea9e912747fed381fd07e6c3c5305c6c1e396d1cb23c73e64c18ce85e1f1e2f170f1adc570d7ee5d3f013e03fcbd46dbcd21f6a1f457e101000cfc306c9717b8b7bf8b7bdc1a6d7296c7773cdc32c772eb2b235f1bb923d199f8d2d65fdb3a985013ad7470697fa0c96d2e9e49aa8a2a7b0feeddfbd8f6c79e22b2fc02d1307c8f0f5abf85bf2a6f507784aab9337cb07f4ff8ecf09ba1bdaf148667e6c3f0c05b91055f3d132eecfa69f80da0cddc607e66e45b23ffead49e53878f1f39de3861bab88ccf9f9d0fc377c2f0d49ba72e5a7eae382747be35320218c02f017f9b08cce690bb9c3e60f01be7013b43a14a36f7ebdceb2e706f7f177702cae07a287a906b8f4e762ddbee5a00a7c65f964e56dbb7dc93f8349228bf5bb88c3b441f55bc46b2345dc7a939534ffee72787477f3c7a0a7807a811254acd6db1a5817ba99!
 ecb3ce08600a0ee0893b9248eaa13173e90047cd0da21abc016e3ca75ab7548c4a0345b27dd11a35ead134bc4705d172daee1780e7a528f948fa7193b31b6202db9eba13f78688f94d22782699148f92bb9fd8acadf304afd87f0d1b93361b8ef4818ee3a1286c7df0ec3e37361f8c29b6138f74ef47b255abcfcfadbd1e9d253a553d1f9e2b7c2309c8fdc7eae38f7eeb7777cfb4f8df5462f90063a88d60431a219a399532ca5163e98c42da36bda16bf12e5523c58982a925b9f61e70cf4c5411590d1c0a946bc4945371a0a6ec525b34e5bde5007b80b9050d214a6a24d92c2eb85057bd2fef1de1fed7dd13a66fd8cc8d57f4164f5f3442ebf343d5f49d116ae900c7dec2190fae3b07528c159dd1913b2364e2abb13d10e5bba2e3d33761a3415ac32649390964017976241931af2cebd2e06f69be387c7f7ef7e7ef7cbbeef2f3414af3714978da79b4a5d97f270fd1ed04c6e5a28d707077a6262f7c183ec7cc0638fbb1d39b98d976a2683668cbc13ed80fb5e952133b15ce925ca175cd0e2903f89bffb3bdb1eb60e1f7489ac5be792c5972ade5c8435015849f98f4c82aed7035a688cbbe1fde13ead3a767f6f4292566d48993c73c2c65fc8a1b5996437c69015c8adf45fa173e0c689be1aa7a233c0f8bc74ffa69611a2a0b6d8287522309a8b9ba58a5f498fab0!
 a781f6747e87d80d1d3d597c7bdbe43a8f6cf6937a8fa130cad87ac36ced6d!
 92f32fad
d673054289dae0250bf1055ce3b508d83ed41a61d9cc681e8e77eb4e78744094d0598278af2ef72c9f2972b7f395d53eafb7162407393e4264009e746fe3735f797a00f6a360883e2948dbfb08da22c3174df16120ad493203d2049e3dc5f9427a493909fc17934d3b299c8e2e759be9c5d959cfee37a40d0e43bbf336a12787f821c7f97761dd7b7c96c86c2cc1e0ca963792ef5244c9489ce1095415fc2c7a7386afb6c27b2787321d39cd7975afe86d28d488496ee17de14169ff812c2dd4db25f61ca61b795830ec1d6bb73f8356089c50b65024df03ff61c2a7de7b9a15ff92991c22b6572ab46abb1186a090bfd9d75219e8b25d5cddf783127b7ffc690ea0475f4548ca2075a1c5928f33d3be07bcf7daee52fb9bab1fdd78bc29ff6c6c3eff726771d09bf3777240c4f9d0dc3678f84eebe52f8cddfd91f5ef71f1cfedad1d6d1b0f38562f8fc132f870ff77e2bbc2199e7dfd0dfd08da3ff0b0a084384fb4687000000000049454e44ae426082</data>
+    </image>
+</images>
 <tabstops>
     <tabstop>listNetDev</tabstop>
-    <tabstop>pushProperties</tabstop>
+    <tabstop>pushConfigure</tabstop>
     <tabstop>lineHostname</tabstop>
     <tabstop>lineGateway</tabstop>
     <tabstop>lineDNS1</tabstop>
     <tabstop>lineDNS2</tabstop>
-    <tabstop>pushSaveGlobal</tabstop>
     <tabstop>tabNetMan</tabstop>
 </tabstops>
 <includes>
     <include location="local" impldecl="in declaration">qprocess.h</include>
     <include location="local" impldecl="in declaration">qmessagebox.h</include>
-    <include location="local" impldecl="in declaration">netproperties.h</include>
     <include location="local" impldecl="in declaration">qtimer.h</include>
     <include location="local" impldecl="in declaration">restartpopup.h</include>
+    <include location="local" impldecl="in declaration">klocale.h</include>
+    <include location="local" impldecl="in declaration">kglobal.h</include>
+    <include location="local" impldecl="in declaration">kcmodule.h</include>
+    <include location="local" impldecl="in declaration">kaboutdata.h</include>
     <include location="local" impldecl="in implementation">networkman.ui.h</include>
 </includes>
 <variables>
@@ -526,12 +773,17 @@
     <variable access="private">int workingDev;</variable>
     <variable access="private">QProcess *GetDevName;</variable>
     <variable access="private">QString DevsName[100];</variable>
-    <variable access="private">NetProperties *EditDevice;</variable>
     <variable access="private">QProcess *StartDHCP;</variable>
     <variable access="private">QProcess *KillDHClient;</variable>
     <variable access="private">QString DevsNetmask[100];</variable>
     <variable access="private">restartPopup *restartDialog;</variable>
+    <variable access="private">QString DevsType[100];</variable>
+    <variable access="private">QProcess *ConfigDevice;</variable>
+    <variable access="private">QString username;</variable>
 </variables>
+<signals>
+    <signal>changed(bool)</signal>
+</signals>
 <slots>
     <slot>Init()</slot>
     <slot access="private">readDetectDev()</slot>
@@ -543,11 +795,16 @@
     <slot access="private">startDHCP()</slot>
     <slot access="private">SaveDevice( QString IP, QString Netmask, bool DHCP )</slot>
     <slot access="private">restartNetwork()</slot>
+    <slot access="private">refreshDevices()</slot>
+    <slot access="private">slotSysTray()</slot>
+    <slot>save()</slot>
+    <slot access="private">slotCheckGlobalText( const QString &amp; text )</slot>
+    <slot access="private">slotDoubleClick( QListBoxItem * item )</slot>
 </slots>
 <functions>
     <function access="private">startDetectDev()</function>
     <function access="private" returnType="QString">getLineFromCommandOutput( QString command )</function>
-    <function access="private" returnType="QString">getNameForIdent( QString ident )</function>
+    <function returnType="QString">getNameForIdent( QString ident )</function>
     <function access="private" returnType="QString">getIpForIdent( QString ident )</function>
     <function access="private" returnType="QString">getMacForIdent( QString ident )</function>
     <function access="private" returnType="QString">getStatusForIdent( QString ident )</function>
@@ -558,7 +815,7 @@
     <function access="private">loadGlobals()</function>
     <function access="private" returnType="QString">getNetmaskForIdent( QString ident )</function>
     <function access="private" returnType="bool">checkRange( QString IP )</function>
+    <function access="private" returnType="QString">getTypeForIdent( QString ident )</function>
 </functions>
-<pixmapinproject/>
 <layoutdefaults spacing="6" margin="11"/>
 </UI>

Modified: pcbsd/trunk/NetworkManager/networkman.ui.h
===================================================================
--- pcbsd/trunk/NetworkManager/networkman.ui.h	2007-02-14 22:19:24 UTC (rev 104)
+++ pcbsd/trunk/NetworkManager/networkman.ui.h	2007-02-22 20:02:08 UTC (rev 105)
@@ -10,18 +10,31 @@
 ** destructor.
 *****************************************************************************/
 #include <iostream>
+
 using namespace std;
 
 void NetworkMan::Init()
 {
-
+    
+    username = QString::fromLocal8Bit(getenv("LOGNAME"));
+    
     // Start the device detection process
     startDetectDev();
     
     connect(listNetDev, SIGNAL(selectionChanged()), this, SLOT(DevSelectionChanged()) );
-    connect(pushProperties, SIGNAL(clicked()), this, SLOT(PropertiesSlot()) );
-    connect(pushSaveGlobal, SIGNAL(clicked()), this, SLOT(saveGlobals()) );
+    connect(pushConfigure, SIGNAL(clicked()), this, SLOT(PropertiesSlot()) );
+    connect(checkSysTray, SIGNAL(clicked()), this, SLOT(slotSysTray()) );
+    connect(pushRefresh, SIGNAL(clicked()), this, SLOT(refreshDevices()) );
     
+    connect(listNetDev, SIGNAL(doubleClicked( QListBoxItem *) ), this, SLOT(slotDoubleClick(QListBoxItem *) ) );
+     
+    
+    // Connect the slots to determine if we need to enable the apply button
+    connect( lineHostname, SIGNAL( textChanged(const QString &) ), this, SLOT(slotCheckGlobalText(const QString & ) ) );
+    connect( lineGateway, SIGNAL( textChanged(const QString &) ), this, SLOT(slotCheckGlobalText(const QString & ) ) );
+    connect( lineDNS1, SIGNAL( textChanged(const QString &) ), this, SLOT(slotCheckGlobalText(const QString & ) ) );
+    connect( lineDNS2, SIGNAL( textChanged(const QString &) ), this, SLOT(slotCheckGlobalText(const QString & ) ) );
+    
     loadGlobals();
     
 }
@@ -31,13 +44,13 @@
 {
     listNetDev->clear();
     listNetDev->insertItem("Detecting Devices...");
-    pushProperties->setEnabled(FALSE);
+    pushConfigure->setEnabled(FALSE);
     
         GetDevList = new QProcess( this );
         GetDevList->addArgument( "ifconfig" );
         GetDevList->addArgument( "-lu" );	
         connect( GetDevList, SIGNAL(readyReadStdout()), this, SLOT(readDetectDev() ) );
-       	   
+        connect( GetDevList, SIGNAL(processExited()), this, SLOT(refreshDevices() ) );	   
          if ( !GetDevList->start() ) {
 	      
          }
@@ -47,7 +60,6 @@
 void NetworkMan::readDetectDev()
 {
     
-    listNetDev->clear();
     QString Buffer;
     QString tmp;
     int i = 0;
@@ -67,32 +79,24 @@
 	    
 	    Buffer.remove(0, Buffer.find(" ") +1);
 	    
-	    if ( Devs[i] == "lo0" )
-	    {
-		Devs[i]="";
-	    } else {
+	    if ( Devs[i] != "lo0" )
+	    {		
+		// Determine if its a wireless or wired device
+		DevsType[i] = getTypeForIdent(Devs[i]);
+		// Get HW Idtentify line
+		DevsName[i] = getNameForIdent(Devs[i]);
 		
-		DevsName[i] = getNameForIdent(Devs[i]);
-		DevsIP[i] = getIpForIdent(Devs[i]);
-		DevsMAC[i] = getMacForIdent(Devs[i]);
-		DevsStatus[i] = getStatusForIdent(Devs[i]);
-		DevsNetmask[i] = getNetmaskForIdent(Devs[i]);		
-
-		listNetDev->insertItem(Devs[i] + " (" +DevsName[i] + ")" );
+		i++;
 	    }
 	    
 	    
 	    
 	    
-	    i++;
+	    
 	}
 	
     }
     
-    // Show the correct device. 
-    listNetDev->setSelected(0, TRUE);
-    DevSelectionChanged();
-    pushProperties->setEnabled(TRUE);
 }
 
 
@@ -178,6 +182,7 @@
 	if (inputLine != "" && inputLine.find("status") != -1){
 		
 		status = inputLine.remove(0, inputLine.find(" ") + 1);
+		status.truncate(inputLine.find("\n") );
 	
 	}
 	
@@ -191,9 +196,45 @@
 {
     int    sel = listNetDev->currentItem();
     
-    textIP->setText(DevsIP[sel]);
-    textMAC->setText(DevsMAC[sel]);
-    textLink->setText(DevsStatus[sel]);
+    // Check to see if the network tray icon is enabled or not
+     QString filename = "/home/" + username + "/.kde/Autostart/tray-" + Devs[sel] + ".desktop";
+
+
+  // First run a check to if we need to enable or disable the checkbox
+  if ( QFile::exists( filename ) )
+  {
+     checkSysTray->setChecked(TRUE);
+   } else {
+     checkSysTray->setChecked(FALSE);
+   }
+    
+    
+    
+    if ( DevsType[sel] == "Wireless")
+   {
+    textStatusLabel1->setText("IP Address:");	
+    textStatus1->setText(DevsIP[sel]);
+    
+    textStatusLabel2->setText("MAC Address:");
+    textStatus2->setText(DevsMAC[sel]);
+    
+    textStatusLabel3->setText("Status:");
+    textStatus3->setText(DevsStatus[sel]);
+    
+    } else {
+	
+    textStatusLabel1->setText("IP Address:");	
+    textStatus1->setText(DevsIP[sel]);
+    
+    textStatusLabel2->setText("MAC Address:");
+    textStatus2->setText(DevsMAC[sel]);
+    
+    textStatusLabel3->setText("Status:");
+    textStatus3->setText(DevsStatus[sel]);
+    
+    }
+
+    
 }
 
 
@@ -233,19 +274,33 @@
 {
     workingDev = listNetDev->currentItem();
     
-    int DHCP = 0;
+    if ( workingDev != -1) {
     
-    if ( checkValue("/etc/rc.conf", "ifconfig_" + Devs[workingDev], "inet") )
+    if ( DevsType[workingDev] == "Wireless" )
     {
-	DHCP=1;
-    }
+	    ConfigDevice = new QProcess( this );
+	    ConfigDevice->addArgument( "/PCBSD/networkmanager/bin/wificonfig");
+	    ConfigDevice->addArgument( Devs[workingDev] );
     
+	    connect( ConfigDevice, SIGNAL(processExited()), this, SLOT(refreshDevices() ) );
+       	   
+	    if ( ConfigDevice->start() ) {
+	    }
+    } else {
+   
+    ConfigDevice = new QProcess( this );
+    ConfigDevice->addArgument( "/PCBSD/networkmanager/bin/ethernetconfig");
+    ConfigDevice->addArgument( Devs[workingDev] );
     
+    connect( ConfigDevice, SIGNAL(processExited()), this, SLOT(refreshDevices() ) );
+       	   
+     if ( ConfigDevice->start() ) {
+         }
+     
+   }
     
-    EditDevice = new NetProperties();
-    EditDevice->Init(DevsIP[workingDev], Devs[workingDev] + "( " +DevsName[workingDev] + ")", DHCP, DevsNetmask[workingDev]);
-    connect( EditDevice, SIGNAL(Saved(QString, QString, bool)), this, SLOT(SaveDevice(QString, QString, bool)) );
-    EditDevice->exec();
+  }
+     
 }
 
 
@@ -262,51 +317,7 @@
 
 void NetworkMan::saveGlobals()
 {
-    
-     if ( lineDNS1->text() != "..."  && ! checkRange(lineDNS1->text() ) ) {
-	 QMessageBox::warning( this, tr("Warning"),
-	  tr("DNS #1 is out of range! (") + lineDNS1->text() + tr(") Fields must be between 0-255.") );
-	 return;
-     }
-    
-    if ( lineDNS2->text() != "..."  && ! checkRange(lineDNS2->text() ) ) {
-	 QMessageBox::warning( this, tr("Warning"),
-	  tr("DNS #2 is out of range! (") + lineDNS2->text() + tr(") Fields must be between 0-255.") );
-	 return;
-     }
-    
-    
-     if ( lineGateway->text() != "..."  && ! checkRange(lineGateway->text() ) ) {
-	 QMessageBox::warning( this, tr("Warning"),
-	  tr("Gateway is out of range! (") + lineGateway->text() + tr(") Fields must be between 0-255.") );
-	 return;
-     }
-    
 
-     saveValue("/etc/rc.conf", "hostname=", "hostname=\"" + lineHostname->text() + "\"", -1);
-    if ( lineGateway->text() == "..." ) {
-     saveValue("/etc/rc.conf", "defaultrouter=", "", -1);
-   } else {
-     saveValue("/etc/rc.conf", "defaultrouter=", "defaultrouter=\"" + lineGateway->text() + "\"", -1);  
-   }
-   
-   int DNSline = 1;
-   
-   
-    if ( lineDNS1->text() == "..." ) {
-     saveValue("/etc/resolv.conf", "nameserver", "", DNSline);
-   } else {
-     saveValue("/etc/resolv.conf", "nameserver", "nameserver " + lineDNS1->text(), DNSline);  
-     DNSline++;
-   }   
-    if ( lineDNS2->text() == "..." ) {
-     saveValue("/etc/resolv.conf", "nameserver", "", DNSline);
-   } else {
-     saveValue("/etc/resolv.conf", "nameserver", "nameserver " + lineDNS2->text(), DNSline);  
-   }   
-   
-    loadGlobals();
-    restartNetwork();
 }
 
 
@@ -333,7 +344,7 @@
          if ( StartDHCP->start() ) {
 	listNetDev->clear();
 	listNetDev->insertItem("DHCP Reloading...");
-	pushProperties->setEnabled(FALSE);
+	pushConfigure->setEnabled(FALSE);
          }
 
 	 
@@ -528,7 +539,7 @@
          if ( KillDHClient->start() ) {
 	listNetDev->clear();
 	listNetDev->insertItem("DHCP Reloading...");
-	pushProperties->setEnabled(FALSE);
+	pushConfigure->setEnabled(FALSE);
          }
 
 	
@@ -635,3 +646,189 @@
    restartDialog->exec();
 
 }
+
+
+QString NetworkMan::getTypeForIdent( QString ident )
+{
+    	QString command = "ifconfig " +ident + " | grep \"ssid\"";
+	QString inputLine = getLineFromCommandOutput(command);
+	QString ssid= "";
+	
+	if (inputLine != "" && inputLine.find("ssid ") != -1){
+		
+		return "Wireless";
+		
+		
+	}
+	
+	return "Ethernet";
+
+}
+
+
+void NetworkMan::refreshDevices()
+{
+    
+    int i = 0;
+    listNetDev->clear();
+    
+    while (! Devs[i].isEmpty() )
+    {
+	
+	              DevsIP[i] = getIpForIdent(Devs[i]);
+		DevsMAC[i] = getMacForIdent(Devs[i]);
+		DevsStatus[i] = getStatusForIdent(Devs[i]);
+		DevsNetmask[i] = getNetmaskForIdent(Devs[i]);
+
+		if ( DevsType[i] == "Wireless")
+		{
+		    
+		    
+		    // If we are using a Wireless device
+		    if ( DevsStatus[i] == "associated" )
+		    {
+		       QImage *Icon = new QImage("/PCBSD/networkmanager/pics/network_wifi.png");
+		       QPixmap PixmapIcon;
+	                     PixmapIcon.convertFromImage(Icon->scale(32,32));
+		       listNetDev->insertItem(PixmapIcon, Devs[i] + " (" +DevsName[i] + ")" );
+		    } else {
+		       QImage *Icon = new QImage("/PCBSD/networkmanager/pics/network_wifi_dis.png");
+		       QPixmap PixmapIcon;
+	                     PixmapIcon.convertFromImage(Icon->scale(32,32));
+		       listNetDev->insertItem(PixmapIcon, Devs[i] + " (" +DevsName[i] + ")" );
+		    }
+	                  
+		    
+		 } else {
+		   // If we are looking at a regular Ethernet device  
+		     
+		      if ( DevsStatus[i] == "active" )
+		    {
+		       QImage *Icon = new QImage("/PCBSD/networkmanager/pics/network_local.png");
+		       QPixmap PixmapIcon;
+	                     PixmapIcon.convertFromImage(Icon->scale(32,32));
+		       listNetDev->insertItem(PixmapIcon, Devs[i] + " (" +DevsName[i] + ")" );
+		    } else {
+		       QImage *Icon = new QImage("/PCBSD/networkmanager/pics/network_local_dis.png");
+		       QPixmap PixmapIcon;
+	                     PixmapIcon.convertFromImage(Icon->scale(32,32));
+		       listNetDev->insertItem(PixmapIcon, Devs[i] + " (" +DevsName[i] + ")" );
+		    }
+	                  
+		}
+	
+	i++;
+    }
+    
+    // Show the correct device. 
+    listNetDev->setSelected(0, TRUE);
+    DevSelectionChanged();
+    pushConfigure->setEnabled(TRUE);
+    
+}
+
+
+void NetworkMan::slotSysTray()
+{
+    int    sel = listNetDev->currentItem();
+    if ( sel == -1 )
+    {
+       return;	
+    }
+    
+    QString Type;
+    
+    // Start the tray applet
+    if (checkSysTray->isChecked() )
+    { 
+	
+	if ( DevsType[sel] == "Wireless" )
+	{
+	   Type="-wireless";  
+	} else {
+	    Type="-ethernet";
+	}
+	
+	    // Save the new file
+                 QFile fileout( "/home/" + username + "/.kde/Autostart/tray-" + Devs[sel] + ".desktop" );
+                 if ( fileout.open( IO_WriteOnly ) ) {
+                          QTextStream streamout( &fileout );
+                                streamout << "[Desktop Entry]\nExec=/PCBSD/networkmanager/bin/NetworkTray ";
+		    streamout << Type + " " + Devs[sel] ;
+		    streamout << "\nIcon=network\nStartupNotify=false\nType=Application\n";
+                                fileout.close();
+		    
+		    runCommand("chown " + username + ":" + username + " \"/home/" + username + "/.kde/Autostart/tray-" + Devs[sel] + ".desktop\"");
+		    runCommand("su " + username + " -c \"/PCBSD/networkmanager/bin/NetworkTray " + Type + " " + Devs[sel] + "\" &");
+		    
+                    }
+	
+    } else {
+	// Kill the tray applet
+	runCommand("rm -f \"/home/" + username + "/.kde/Autostart/tray-" + Devs[sel] + ".desktop\"");
+    }
+
+}
+
+
+void NetworkMan::save()
+{
+           saveValue("/etc/rc.conf", "hostname=", "hostname=\"" + lineHostname->text() + "\"", -1);
+    if ( lineGateway->text() == "..." ) {
+     saveValue("/etc/rc.conf", "defaultrouter=", "", -1);
+   } else {
+     saveValue("/etc/rc.conf", "defaultrouter=", "defaultrouter=\"" + lineGateway->text() + "\"", -1);  
+   }
+   
+   int DNSline = 1;
+   
+   
+    if ( lineDNS1->text() == "..." ) {
+     saveValue("/etc/resolv.conf", "nameserver", "", DNSline);
+   } else {
+     saveValue("/etc/resolv.conf", "nameserver", "nameserver " + lineDNS1->text(), DNSline);  
+     DNSline++;
+   }   
+    if ( lineDNS2->text() == "..." ) {
+     saveValue("/etc/resolv.conf", "nameserver", "", DNSline);
+   } else {
+     saveValue("/etc/resolv.conf", "nameserver", "nameserver " + lineDNS2->text(), DNSline);  
+   }   
+   
+    loadGlobals();
+    restartNetwork();
+}
+
+
+void NetworkMan::slotCheckGlobalText( const QString &text )
+{
+  
+  
+     if ( lineDNS1->text() != "..."  && ! checkRange(lineDNS1->text() ) ) {
+	 QMessageBox::warning( this, tr("Warning"),
+	  tr("DNS #1 is out of range! (") + lineDNS1->text() + tr(") Fields must be between 0-255.") );
+	 return;
+     }
+    
+    if ( lineDNS2->text() != "..."  && ! checkRange(lineDNS2->text() ) ) {
+	 QMessageBox::warning( this, tr("Warning"),
+	  tr("DNS #2 is out of range! (") + lineDNS2->text() + tr(") Fields must be between 0-255.") );
+	 return;
+     }
+    
+    
+     if ( lineGateway->text() != "..."  && ! checkRange(lineGateway->text() ) ) {
+	 QMessageBox::warning( this, tr("Warning"),
+	  tr("Gateway is out of range! (") + lineGateway->text() + tr(") Fields must be between 0-255.") );
+	 return;
+     }
+     
+     emit changed(TRUE);
+}
+
+
+void NetworkMan::slotDoubleClick( QListBoxItem *item )
+{
+    // Start the configuration dialog
+    PropertiesSlot();
+}



More information about the Commits mailing list