[PC-BSD Commits] r7688 - in pcbsd/current/src-qt4: libpcbsd pc-netmanager/src pc-netmanager/src/NetworkManager

svn at pcbsd.org svn at pcbsd.org
Fri Oct 1 11:14:51 PDT 2010


Author: kris
Date: 2010-10-01 11:14:51 -0700 (Fri, 01 Oct 2010)
New Revision: 7688

Removed:
   pcbsd/current/src-qt4/pc-netmanager/src/NetworkManagerAdmin/
Modified:
   pcbsd/current/src-qt4/libpcbsd/utils.cpp
   pcbsd/current/src-qt4/pc-netmanager/src/NetworkManager/networkman.cpp
   pcbsd/current/src-qt4/pc-netmanager/src/NetworkManager/networkman.h
   pcbsd/current/src-qt4/pc-netmanager/src/NetworkManager/networkman.ui
   pcbsd/current/src-qt4/pc-netmanager/src/src.pro
Log:

Updated NetworkManager, merged old NetworkManagerAdmin and proxy configuration into same
utiltity



Modified: pcbsd/current/src-qt4/libpcbsd/utils.cpp
===================================================================
--- pcbsd/current/src-qt4/libpcbsd/utils.cpp	2010-10-01 17:45:41 UTC (rev 7687)
+++ pcbsd/current/src-qt4/libpcbsd/utils.cpp	2010-10-01 18:14:51 UTC (rev 7688)
@@ -144,9 +144,9 @@
 	    savedLine = false;
             line = stream.readLine();
 
-	    // Check Mirror Tag
 	    if ( line.indexOf(key + ": ") == 0 ) {
-	      pbiConf << key + ": " + val;
+	      if ( ! val.isEmpty() )
+	        pbiConf << key + ": " + val;
 	      savedLine = true;
 	    }
 

Modified: pcbsd/current/src-qt4/pc-netmanager/src/NetworkManager/networkman.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-netmanager/src/NetworkManager/networkman.cpp	2010-10-01 17:45:41 UTC (rev 7687)
+++ pcbsd/current/src-qt4/pc-netmanager/src/NetworkManager/networkman.cpp	2010-10-01 18:14:51 UTC (rev 7688)
@@ -33,23 +33,49 @@
     colourRed = QColor(255, 78, 78);
     
     // Set tray icon disabled, since we may be running under root mode
-    checkSysTray->setEnabled(FALSE);
-    checkSysTray->setHidden(TRUE);
+    //checkSysTray->setEnabled(FALSE);
+    //checkSysTray->setHidden(TRUE);
     
     
     // Let the list box know to add new devices
     firstUpdate = 0;
     
+    // Make sure we are running as root
+    if ( getuid() != 0 )
+    {
+	 QMessageBox::critical( this, tr("Need Root Access"),
+	  tr("This program must be run as root!") );
+	 exit(1);
+    }
+
     // Get the username we're running under
     username = QString::fromLocal8Bit(getenv("LOGNAME"));
         
+    // Set global slots
+    connect(pushSave, SIGNAL(clicked()), this, SLOT(slotSave()) );
+    connect(pushClose, SIGNAL(clicked()), this, SLOT(slotClose()) );
+
+    // Set slots for the network devices tab
     connect(listNetDev, SIGNAL(itemSelectionChanged()), this, SLOT(DevSelectionChanged()) );
     connect(pushConfigure, SIGNAL(clicked()), this, SLOT(PropertiesSlot()) );
-    connect(pushAdminConfig, SIGNAL(clicked()), this, SLOT(slotOpenAdminDlg()) );
+    connect(groupBoxPPPOE, SIGNAL(clicked(bool)), this, SLOT(slotPPPOEChanged()) );
     connect(checkSysTray, SIGNAL(clicked()), this, SLOT(slotSysTray()) );
     listNetDev->setContextMenuPolicy( Qt::CustomContextMenu );
     connect(listNetDev, SIGNAL(itemDoubleClicked( QListWidgetItem *) ), this, SLOT(slotDoubleClick(QListWidgetItem *) ) );
     connect(listNetDev, SIGNAL(customContextMenuRequested( const QPoint &) ), this, SLOT(slotListRightClick(const QPoint &) ) );
+
+    // Set slots for proxy stuff
+    connect( checkProxyUser, SIGNAL( clicked() ), this, SLOT( slotProxyUserChecked() ) );
+
+    // Set the slots for the advanced tab
+    connect(lineDNS1, SIGNAL(textChanged(const QString &)), this, SLOT(slotCheckGlobalText()) );
+    connect(lineDNS2, SIGNAL(textChanged(const QString &)), this, SLOT(slotCheckGlobalText()) );
+    connect(lineGateway, SIGNAL(textChanged(const QString &)), this, SLOT(slotCheckGlobalText()) );
+    connect(lineHostname, SIGNAL(textChanged(const QString &)), this, SLOT(slotCheckGlobalText()) );
+    connect(linePPPUsername, SIGNAL(textChanged(const QString &)), this, SLOT(slotCheckGlobalText()) );
+    connect(linePPPPassword, SIGNAL(textChanged(const QString &)), this, SLOT(slotCheckGlobalText()) );
+    connect(linePPPService, SIGNAL(textChanged(const QString &)), this, SLOT(slotCheckGlobalText()) );
+
          
     // Get the FreeBSD Major version we are using
     checkFreeBSDVer();
@@ -306,20 +332,20 @@
 
 void NetworkMan::DevSelectionChanged()
 {
-    int sel = listNetDev->currentRow();
+   int sel = listNetDev->currentRow();
     
-    if ( sel != -1 ) {
+   if ( sel != -1 ) {
     
-    pushConfigure->setEnabled(TRUE);
+   pushConfigure->setEnabled(TRUE);
 
 	
-    // Check to see if the network tray icon is enabled or not
-     QString filename = "/home/" + username + "/.config/autostart/tray-" + Devs[sel] + ".desktop";
+   // Check to see if the network tray icon is enabled or not
+   QString filename = "/usr/local/etc/xdg/autostart/tray-" + Devs[sel] + ".desktop";
 
 
-  // First run a check to if we need to enable or disable the checkbox
-  if ( QFile::exists( filename ) )
-  {
+   // 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);
@@ -614,27 +640,30 @@
     lineGateway->setText(getValue("/etc/rc.conf", "defaultrouter=", 1) );
     lineDNS1->setText(getValue("/etc/resolv.conf", "nameserver", 1) );
     lineDNS2->setText(getValue("/etc/resolv.conf", "nameserver", 2) );
-    labelSearchDomain->setText(getValue("/etc/resolv.conf", "search", 1) );
+    lineSearchDomain->setText(getValue("/etc/resolv.conf", "search", 1) );
 
     // Check for IPv6 settings
+    lineIPv6Gateway->setText(getValue("/etc/rc.conf", "ipv6_defaultrouter=", 1) );
     tmp = getValue("/etc/rc.conf", "ipv6_enable=", 1) ;
-    lineIPv6Gateway->setText(getValue("/etc/rc.conf", "ipv6_defaultrouter=", 1) );
+    if ( tmp == "YES" )
+        groupIPv6->setChecked(TRUE);
+    else
+        groupIPv6->setChecked(FALSE);
+
     
     
-    
     // Load the PPPOE Configuration
-
     if ( QFile::exists( "/etc/ppp/ppp.conf" ) )
-   {
        loadPPPOEConfig();
-   }
+    else
+       groupBoxPPPOE->setChecked(false);
+
+    // Load Proxy Stuff
+    loadProxyConfig();
 	
 }
 
 
-
-
-
 QString NetworkMan::getNetmaskForIdent( QString ident )
 {
    QString cmd = "ifconfig lagg0 | grep " + ident;
@@ -692,8 +721,8 @@
 void NetworkMan::restartNetwork()
 {
     
-    //Set the hostname
-    runCommand("hostname " + lineHostname->text());
+   //Set the hostname
+   runCommand("hostname " + lineHostname->text());
 
    // Set the gateway device name
    if ( lineGateway->text() != "..."  ) {
@@ -750,11 +779,9 @@
 
 void NetworkMan::slotSysTray()
 {
-    int    sel = listNetDev->currentRow();
+    int  sel = listNetDev->currentRow();
     if ( sel == -1 )
-    {
        return;	
-    }
     
     QString Type;
     QString Command;
@@ -762,27 +789,24 @@
     // Start the tray applet
     if (checkSysTray->isChecked() )
     { 
-	
-	         // Save the new file
-                 QFile fileout( "/home/" + username + "/.config/autostart/tray-" + Devs[sel] + ".desktop" );
-                 if ( fileout.open( QIODevice::WriteOnly ) ) {
-                    QTextStream streamout( &fileout );
-                    streamout << "#!/usr/bin/env xdg-open\n";
-                    streamout << "[Desktop Entry]\nExec=pc-nettray " + Devs[sel];
-		    streamout << "\nIcon=network\nStartupNotify=false\nType=Application\n";
-                                fileout.close();
-		    
-		    runCommand("chown " + username + ":" + username + " \"/home/" + username + "/.config/autostart/tray-" + Devs[sel] + ".desktop\"");
-		    runCommand("chmod 744 \"/home/" + username + "/.config/autostart/tray-" + Devs[sel] + ".desktop\"");
+	// Save the new file
+        QFile fileout( "/usr/local/etc/xdg/autostart/tray-" + Devs[sel] + ".desktop" );
+        if ( fileout.open( QIODevice::WriteOnly ) ) {
+          QTextStream streamout( &fileout );
+          streamout << "[Desktop Entry]\nExec=pc-nettray " + Devs[sel];
+	  streamout << "\nIcon=network\nStartupNotify=false\nType=Application\n";
+          fileout.close();
+	    
+	  runCommand("chmod 644 \"/usr/local/etc/xdg/autostart/tray-" + Devs[sel] + ".desktop\"");
 
-                    // Now start the tray icon
-		    runCommand("pc-nettray " + Devs[sel] + " &");
+          // Now start the tray icon
+          //runCommand("pc-nettray " + Devs[sel] + " &");
 		    
-                    }
+        }
 	
     } else {
 	// Kill the tray applet
-	runCommand("rm -f \"/home/" + username + "/.config/autostart/tray-" + Devs[sel] + ".desktop\"");
+	runCommand("rm -f \"/usr/local/etc/xdg/autostart/tray-" + Devs[sel] + ".desktop\"");
     }
 
 }
@@ -807,39 +831,39 @@
      // Check to see if PPPoE is enabled
      tmp = getValue( "/etc/rc.conf", "ppp_enable=", 1 );
      if ( tmp != "YES" ) {
+       groupBoxPPPOE->setChecked(false);
        return; 
      }
 
+     groupBoxPPPOE->setChecked(true);
 
 
 
-   	// Start loading the rc.conf information
-   	tmp = getValue( "/etc/rc.conf", "ppp_mode=", 1 );
-	if ( tmp == "ddial" ) {
-		checkPPPAlwaysOn->setChecked(TRUE);
-	}
-   	tmp = getValue( "/etc/rc.conf", "ppp_nat=", 1 );
-	if ( tmp == "YES" ) {
-		checkPPPNat->setChecked(TRUE);
-	}
+     // Start loading the rc.conf information
+     tmp = getValue( "/etc/rc.conf", "ppp_mode=", 1 );
+     if ( tmp == "ddial" )
+	checkPPPAlwaysOn->setChecked(TRUE);
+     tmp = getValue( "/etc/rc.conf", "ppp_nat=", 1 );
+     if ( tmp == "YES" )
+	checkPPPNat->setChecked(TRUE);
 
-	// Now load the ppp.conf file
-	if ( filein.open( QIODevice::ReadOnly ) ) {
-        QTextStream stream( &filein );
-        QString line;
-        while ( !stream.atEnd() ) {
-            line = stream.readLine(); // line of text excluding '\n'
+     // Now load the ppp.conf file
+     if ( filein.open( QIODevice::ReadOnly ) ) {
+     QTextStream stream( &filein );
+     QString line;
+     while ( !stream.atEnd() ) {
+        line = stream.readLine(); // line of text excluding '\n'
 
-	    // Check if we are on a profile line
-	    if ( line.indexOf(":") == line.length() -1  ) {
-		if ( line.indexOf("default") == -1 ) {
-		    // If we find the existing profile for this device, remove it
-		    foundProfile = 1;
-		    
-		} else {
-		    foundProfile = 0;
-		}
-	    }
+        // Check if we are on a profile line
+        if ( line.indexOf(":") == line.length() -1  ) {
+  	  if ( line.indexOf("default") == -1 ) {
+	    // If we find the existing profile for this device, remove it
+	    foundProfile = 1;
+	    
+	  } else {
+	    foundProfile = 0;
+ 	}
+      }
 
 	    if ( foundProfile == 1)
 	    {
@@ -992,8 +1016,8 @@
 void NetworkMan::setNotRoot()
 {
     // Disable functionality since we are not running as root
-    checkSysTray->setEnabled(TRUE);
-    checkSysTray->setHidden(FALSE);
+    checkSysTray->setEnabled(FALSE);
+    checkSysTray->setHidden(TRUE);
     lineDNS1->setEnabled(FALSE);
     lineDNS2->setEnabled(FALSE);
     lineHostname->setEnabled(FALSE);
@@ -1017,24 +1041,261 @@
    return "DOWN";
 }
 
-void NetworkMan::slotOpenAdminDlg()
+void NetworkMan::slotCheckGlobalText()
 {
-     QString program;
-     QStringList arguments;
 
-     // If we are running as root
-     if ( getuid() != 0 )
+   QRegExp hostnameRegExp("^(([a-z0-9][a-z0-9-]*[a-z0-9])|([a-z0-9]+))$");
+   textGlobalError->setText("");
+  
+     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;
+     }
+     
+     /**
+     Hostnames must:
+     - Contain only a-z, 0-9, and hyphens (-)
+     - Not have a hyphen as the first or last character
+     **/
+     lineHostname->setText(lineHostname->text().toLower());
+     if (lineHostname->text().isEmpty())
      {
-          program = "pc-su";
-	  arguments.clear();
-          arguments << "-d" << "--noignorebutton" << "pc-netadmin";
-     } else {
-          program = "pc-netadmin";
-	  arguments.clear();
+       textGlobalError->setText(tr("Please enter a hostname"));
+       return;
      }
+     else if (hostnameRegExp.indexIn(lineHostname->text()) == -1)
+     {
+        textGlobalError->setText(tr("Hostname may only contain letters and numbers"));
+	return;
+     }
 
-     ConfigSys = new QProcess( this );
-     connect( ConfigSys, SIGNAL(finished(int, QProcess::ExitStatus) ), this, SLOT(loadGlobals() ) );
-     ConfigSys->start(program, arguments); 
-       
+
+
+   // Check if we need to validate the PPPOE data
+   if ( groupBoxPPPOE->isEnabled() )
+   {
+      if (linePPPUsername->text().isEmpty() )
+      {
+        textGlobalError->setText(tr("Missing a PPPOE username!"));
+        return;
+      }
+
+      if (linePPPPassword->text().isEmpty() )
+      {
+        textGlobalError->setText(tr("Missing a PPPOE password!"));
+        return;
+      }
+   }
+
 }
+
+void NetworkMan::slotClose()
+{
+   close();
+}
+
+void NetworkMan::slotSave()
+{
+    
+   if ( lineHostname->text().isEmpty() ) {
+      saveValue("/etc/rc.conf", "hostname=", "hostname=\"" + lineHostname->text() + "\"", -1);
+      saveValue("/etc/hosts", "::1", "::1\t\t\tlocalhost localhost.localdomain " + lineHostname->text() + ".localhost " + lineHostname->text(), -1);
+      saveValue("/etc/hosts", "127.0.0.1", "127.0.0.1\t\tlocalhost localhost.localdomain " + lineHostname->text() + ".localhost " + 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);  
+   }   
+
+   if ( lineSearchDomain->text().isEmpty() ) {
+     saveValue("/etc/resolv.conf", "search", "", 1);
+   } else {
+     saveValue("/etc/resolv.conf", "search", "search " + lineSearchDomain->text(), 1);
+   }
+
+   
+   if (groupBoxPPPOE->isChecked())
+	savePPPOEConfig();
+   else
+	disablePPPOEConfig();
+   
+   // Save the IPv6 stuff
+    if ( groupIPv6->isChecked() ) {
+	saveValue("/etc/rc.conf", "ipv6_enable=", "ipv6_enable=\"YES\"", -1);
+	saveValue("/etc/rc.conf", "ipv6_defaultrouter=", "ipv6_defaultrouter=\"" + lineIPv6Gateway->text() + "\"", -1);
+    } else {
+	saveValue("/etc/rc.conf", "ipv6_enable=", "", -1);
+	saveValue("/etc/rc.conf", "ipv6_defaultrouter=", "", -1);
+    }
+
+    // Save the proxy config
+    saveProxyConfig();
+   
+    restartNetwork();
+}
+
+
+
+void NetworkMan::savePPPOEConfig()
+{
+        // Make or update the entry in the /etc/ppp.conf file
+        updatePPPconf();
+
+        saveValue( "/etc/rc.conf", "ppp_enable", "ppp_enable=\"YES\"", -1);
+        if ( checkPPPAlwaysOn->isChecked() ) {
+		saveValue( "/etc/rc.conf", "ppp_mode", "ppp_mode=\"ddial\"", -1);
+	} else {
+		saveValue( "/etc/rc.conf", "ppp_mode", "ppp_mode=\"background\"", -1);
+	}
+        if ( checkPPPNat->isChecked() ) {
+		saveValue( "/etc/rc.conf", "ppp_nat", "ppp_nat=\"YES\"", -1);
+	} else {
+		saveValue( "/etc/rc.conf", "ppp_nat", "ppp_nat=\"NO\"", -1);
+	}
+	
+	saveValue( "/etc/rc.conf", "ppp_profile", "ppp_profile=\"" + linePPPService->text() + "\"", -1);
+}
+
+
+void NetworkMan::updatePPPconf()
+{
+    
+     QString DeviceName = comboPPPOEDev->currentText();
+    
+     QFile filein( "/etc/ppp/ppp.conf" );
+     QFile fileout( "/etc/ppp/ppp.conf" );
+     QString SavedFile;
+     QString ProfileName = linePPPService->text();
+
+
+     SavedFile = "default:\n set timeout 180\n enable dns\n\n" + ProfileName + ":\n  set device PPPoE:" + DeviceName + ":" + ProfileName + "\n  set authname " + linePPPUsername->text() + "\n  set authkey " + linePPPPassword->text() + "\n  set dial\n  set login\n  set ifaddr 0 0\n  add default HISADDR";
+
+    if ( fileout.open( QIODevice::WriteOnly ) ) {
+        QTextStream streamout( &fileout );
+                    streamout << SavedFile;
+        fileout.close();
+    }
+
+
+    runCommand("chmod 755 /etc/ppp/ppp.conf");
+    
+}
+
+
+void NetworkMan::disablePPPOEConfig()
+{
+	// Update the ppp.conf file to remove any old profile information
+	updatePPPconf();
+	saveValue( "/etc/rc.conf", "ppp_enable", "", -1);
+	saveValue( "/etc/rc.conf", "ppp_mode", "", -1);
+	saveValue( "/etc/rc.conf", "ppp_nat", "", -1);
+	saveValue( "/etc/rc.conf", "ppp_profile", "", -1);
+}
+
+
+void NetworkMan::slotPPPOEChanged()
+{
+    // Run the check to see if we need to enable the apply button
+    slotCheckGlobalText();
+}
+
+void NetworkMan::slotProxyUserChecked() {
+  if ( checkProxyUser->isChecked() ) {
+    lineProxyUser->setEnabled(true);
+    lineProxyPass->setEnabled(true);
+  } else {
+    lineProxyUser->setEnabled(false);
+    lineProxyPass->setEnabled(false);
+  }
+}
+
+void NetworkMan::loadProxyConfig()
+{
+   QString tmp;
+   bool ok;
+
+   tmp = Utils::getProxyURL();
+   if ( tmp.isEmpty() )
+      groupProxySettings->setChecked(false);
+   else
+      groupProxySettings->setChecked(true); 
+
+   lineProxyAddress->setText(tmp);
+
+   tmp = Utils::getProxyUser();
+   lineProxyUser->setText(tmp);
+   if ( tmp.isEmpty() )
+      checkProxyUser->setChecked(false);
+   else
+      checkProxyUser->setChecked(true);
+
+   lineProxyPass->setText(Utils::getProxyPass());
+
+   tmp = Utils::getProxyPort();
+   tmp.toInt(&ok);
+   if ( ok )
+      spinProxyPort->setValue(tmp.toInt(&ok));
+   
+
+   tmp = Utils::getProxyType();
+   if ( tmp == "SOCKS5" )
+      radioSOCKSProxy->setChecked(true);
+   else
+      radioHTTPProxy->setChecked(true);
+
+   slotProxyUserChecked();
+}
+
+void NetworkMan::saveProxyConfig()
+{
+   if ( ! groupProxySettings->isChecked() ) {
+         Utils::setProxyURL(QString());
+         Utils::setProxyUser(QString());
+         Utils::setProxyPass(QString());
+         Utils::setProxyType(QString());
+         Utils::setProxyPort(QString());
+         return;
+   }
+
+   Utils::setProxyURL(lineProxyAddress->text());
+   Utils::setProxyUser(lineProxyUser->text());
+   Utils::setProxyPass(lineProxyPass->text());
+   if ( radioHTTPProxy->isChecked() )
+      Utils::setProxyType("HTTP");
+   else
+      Utils::setProxyType("SOCKS5");
+   Utils::setProxyPort(QString::number(spinProxyPort->value()));
+
+}

Modified: pcbsd/current/src-qt4/pc-netmanager/src/NetworkManager/networkman.h
===================================================================
--- pcbsd/current/src-qt4/pc-netmanager/src/NetworkManager/networkman.h	2010-10-01 17:45:41 UTC (rev 7687)
+++ pcbsd/current/src-qt4/pc-netmanager/src/NetworkManager/networkman.h	2010-10-01 18:14:51 UTC (rev 7688)
@@ -36,8 +36,12 @@
     void slotEnableDevice();
     void slotShowInfoConfig();
     void slotDoubleClick( QListWidgetItem * item );
-    void slotOpenAdminDlg();
     void loadGlobals();
+    void slotSave();
+    void slotClose();
+    void slotCheckGlobalText();
+    void slotPPPOEChanged();
+    void slotProxyUserChecked();
 
 
 private:
@@ -82,6 +86,11 @@
     QString getNextAvailWlan();
     QString getWifiParent(QString dev);
     void loadPPPOEConfig();
+    void disablePPPOEConfig();
+    void savePPPOEConfig();
+    void updatePPPconf();
+    void loadProxyConfig();
+    void saveProxyConfig();
 
 signals:
 	void changed(bool);

Modified: pcbsd/current/src-qt4/pc-netmanager/src/NetworkManager/networkman.ui
===================================================================
--- pcbsd/current/src-qt4/pc-netmanager/src/NetworkManager/networkman.ui	2010-10-01 17:45:41 UTC (rev 7687)
+++ pcbsd/current/src-qt4/pc-netmanager/src/NetworkManager/networkman.ui	2010-10-01 18:14:51 UTC (rev 7688)
@@ -7,7 +7,7 @@
     <x>0</x>
     <y>0</y>
     <width>658</width>
-    <height>400</height>
+    <height>451</height>
    </rect>
   </property>
   <property name="windowTitle">
@@ -102,6 +102,12 @@
        </item>
        <item row="4" column="0" colspan="2">
         <widget class="QLabel" name="textLabel2">
+         <property name="font">
+          <font>
+           <weight>75</weight>
+           <bold>true</bold>
+          </font>
+         </property>
          <property name="text">
           <string>Device Status</string>
          </property>
@@ -324,11 +330,7 @@
                </widget>
               </item>
               <item>
-               <widget class="QLabel" name="labelSearchDomain">
-                <property name="text">
-                 <string/>
-                </property>
-               </widget>
+               <widget class="QLineEdit" name="lineSearchDomain"/>
               </item>
              </layout>
             </item>
@@ -376,25 +378,6 @@
                 </property>
                </widget>
               </item>
-              <item>
-               <widget class="QLabel" name="textLabel11_2_4">
-                <property name="sizePolicy">
-                 <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
-                  <horstretch>0</horstretch>
-                  <verstretch>0</verstretch>
-                 </sizepolicy>
-                </property>
-                <property name="text">
-                 <string>IPv6 gateway:</string>
-                </property>
-                <property name="alignment">
-                 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-                </property>
-                <property name="wordWrap">
-                 <bool>false</bool>
-                </property>
-               </widget>
-              </item>
              </layout>
             </item>
             <item>
@@ -425,25 +408,6 @@
                 </property>
                </widget>
               </item>
-              <item>
-               <widget class="QLineEdit" name="lineIPv6Gateway">
-                <property name="sizePolicy">
-                 <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
-                  <horstretch>0</horstretch>
-                  <verstretch>0</verstretch>
-                 </sizepolicy>
-                </property>
-                <property name="inputMask">
-                 <string/>
-                </property>
-                <property name="text">
-                 <string/>
-                </property>
-                <property name="alignment">
-                 <set>Qt::AlignHCenter</set>
-                </property>
-               </widget>
-              </item>
              </layout>
             </item>
            </layout>
@@ -468,10 +432,13 @@
         </spacer>
        </item>
        <item row="1" column="1">
-        <widget class="QGroupBox" name="groupBox_2">
+        <widget class="QGroupBox" name="groupBoxPPPOE">
          <property name="title">
           <string>PPPoE configuration</string>
          </property>
+         <property name="checkable">
+          <bool>true</bool>
+         </property>
          <layout class="QGridLayout" name="gridLayout_9">
           <item row="0" column="0" rowspan="2">
            <spacer name="spacer32">
@@ -616,43 +583,6 @@
          </layout>
         </widget>
        </item>
-       <item row="2" column="1">
-        <layout class="QHBoxLayout" name="horizontalLayout_3">
-         <item>
-          <spacer name="horizontalSpacer">
-           <property name="orientation">
-            <enum>Qt::Horizontal</enum>
-           </property>
-           <property name="sizeHint" stdset="0">
-            <size>
-             <width>40</width>
-             <height>20</height>
-            </size>
-           </property>
-          </spacer>
-         </item>
-         <item>
-          <widget class="QPushButton" name="pushAdminConfig">
-           <property name="text">
-            <string>Change Configuration</string>
-           </property>
-          </widget>
-         </item>
-         <item>
-          <spacer name="horizontalSpacer_2">
-           <property name="orientation">
-            <enum>Qt::Horizontal</enum>
-           </property>
-           <property name="sizeHint" stdset="0">
-            <size>
-             <width>40</width>
-             <height>20</height>
-            </size>
-           </property>
-          </spacer>
-         </item>
-        </layout>
-       </item>
        <item row="3" column="0" colspan="3">
         <spacer name="spacer33">
          <property name="orientation">
@@ -669,10 +599,269 @@
          </property>
         </spacer>
        </item>
+       <item row="2" column="1">
+        <widget class="QGroupBox" name="groupIPv6">
+         <property name="title">
+          <string>Enable IPv6 support</string>
+         </property>
+         <property name="checkable">
+          <bool>true</bool>
+         </property>
+         <property name="checked">
+          <bool>false</bool>
+         </property>
+         <layout class="QGridLayout" name="gridLayout_5">
+          <item row="0" column="0">
+           <widget class="QLabel" name="textLabel11_2_4">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+            <property name="text">
+             <string>IPv6 gateway:</string>
+            </property>
+            <property name="alignment">
+             <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+            </property>
+            <property name="wordWrap">
+             <bool>false</bool>
+            </property>
+           </widget>
+          </item>
+          <item row="0" column="1">
+           <widget class="QLineEdit" name="lineIPv6Gateway">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+            <property name="inputMask">
+             <string/>
+            </property>
+            <property name="text">
+             <string/>
+            </property>
+            <property name="alignment">
+             <set>Qt::AlignHCenter</set>
+            </property>
+           </widget>
+          </item>
+          <item row="0" column="2">
+           <spacer name="horizontalSpacer_3">
+            <property name="orientation">
+             <enum>Qt::Horizontal</enum>
+            </property>
+            <property name="sizeType">
+             <enum>QSizePolicy::MinimumExpanding</enum>
+            </property>
+            <property name="sizeHint" stdset="0">
+             <size>
+              <width>40</width>
+              <height>20</height>
+             </size>
+            </property>
+           </spacer>
+          </item>
+         </layout>
+        </widget>
+       </item>
       </layout>
      </widget>
+     <widget class="QWidget" name="tab">
+      <attribute name="title">
+       <string>Proxy</string>
+      </attribute>
+      <layout class="QGridLayout" name="gridLayout">
+       <item row="0" column="0">
+        <widget class="QGroupBox" name="groupProxySettings">
+         <property name="title">
+          <string>Proxy Configuration</string>
+         </property>
+         <property name="checkable">
+          <bool>true</bool>
+         </property>
+         <property name="checked">
+          <bool>false</bool>
+         </property>
+         <layout class="QGridLayout" name="gridLayout_7">
+          <item row="0" column="0">
+           <widget class="QLabel" name="label_2">
+            <property name="text">
+             <string>Server Address</string>
+            </property>
+           </widget>
+          </item>
+          <item row="1" column="0">
+           <widget class="QLineEdit" name="lineProxyAddress"/>
+          </item>
+          <item row="2" column="0">
+           <widget class="QLabel" name="label_4">
+            <property name="text">
+             <string>Port Number</string>
+            </property>
+           </widget>
+          </item>
+          <item row="3" column="0">
+           <layout class="QHBoxLayout" name="horizontalLayout_5">
+            <item>
+             <widget class="QSpinBox" name="spinProxyPort">
+              <property name="maximum">
+               <number>99999</number>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <spacer name="horizontalSpacer_5">
+              <property name="orientation">
+               <enum>Qt::Horizontal</enum>
+              </property>
+              <property name="sizeHint" stdset="0">
+               <size>
+                <width>40</width>
+                <height>20</height>
+               </size>
+              </property>
+             </spacer>
+            </item>
+           </layout>
+          </item>
+          <item row="4" column="0">
+           <widget class="QLabel" name="label_5">
+            <property name="text">
+             <string>Proxy Type</string>
+            </property>
+           </widget>
+          </item>
+          <item row="5" column="0">
+           <layout class="QHBoxLayout" name="horizontalLayout_6">
+            <item>
+             <widget class="QRadioButton" name="radioHTTPProxy">
+              <property name="text">
+               <string>HTTP</string>
+              </property>
+              <property name="checked">
+               <bool>true</bool>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="QRadioButton" name="radioSOCKSProxy">
+              <property name="text">
+               <string>SOCKS5</string>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <spacer name="horizontalSpacer_6">
+              <property name="orientation">
+               <enum>Qt::Horizontal</enum>
+              </property>
+              <property name="sizeHint" stdset="0">
+               <size>
+                <width>40</width>
+                <height>20</height>
+               </size>
+              </property>
+             </spacer>
+            </item>
+           </layout>
+          </item>
+          <item row="6" column="0">
+           <widget class="QCheckBox" name="checkProxyUser">
+            <property name="text">
+             <string>Specify a Username / Password</string>
+            </property>
+           </widget>
+          </item>
+          <item row="7" column="0">
+           <layout class="QGridLayout" name="gridLayout_6">
+            <item row="0" column="0">
+             <widget class="QLabel" name="label_6">
+              <property name="text">
+               <string>Username</string>
+              </property>
+             </widget>
+            </item>
+            <item row="0" column="1">
+             <widget class="QLabel" name="label_7">
+              <property name="text">
+               <string>Password</string>
+              </property>
+             </widget>
+            </item>
+            <item row="1" column="0">
+             <widget class="QLineEdit" name="lineProxyUser"/>
+            </item>
+            <item row="1" column="1">
+             <widget class="QLineEdit" name="lineProxyPass">
+              <property name="echoMode">
+               <enum>QLineEdit::Password</enum>
+              </property>
+             </widget>
+            </item>
+            <item row="1" column="2">
+             <spacer name="horizontalSpacer_2">
+              <property name="orientation">
+               <enum>Qt::Horizontal</enum>
+              </property>
+              <property name="sizeHint" stdset="0">
+               <size>
+                <width>40</width>
+                <height>20</height>
+               </size>
+              </property>
+             </spacer>
+            </item>
+           </layout>
+          </item>
+         </layout>
+        </widget>
+       </item>
+      </layout>
+     </widget>
     </widget>
    </item>
+   <item row="2" column="0">
+    <layout class="QHBoxLayout" name="horizontalLayout_3">
+     <item>
+      <spacer name="horizontalSpacer">
+       <property name="orientation">
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeHint" stdset="0">
+        <size>
+         <width>40</width>
+         <height>20</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <widget class="QPushButton" name="pushSave">
+       <property name="text">
+        <string>&amp;Save</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="pushClose">
+       <property name="text">
+        <string>&amp;Close</string>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+   <item row="1" column="0">
+    <widget class="QLabel" name="textGlobalError_2">
+     <property name="text">
+      <string/>
+     </property>
+    </widget>
+   </item>
   </layout>
  </widget>
  <layoutdefault spacing="6" margin="11"/>

Modified: pcbsd/current/src-qt4/pc-netmanager/src/src.pro
===================================================================
--- pcbsd/current/src-qt4/pc-netmanager/src/src.pro	2010-10-01 17:45:41 UTC (rev 7687)
+++ pcbsd/current/src-qt4/pc-netmanager/src/src.pro	2010-10-01 18:14:51 UTC (rev 7688)
@@ -1,3 +1,3 @@
 TEMPLATE = subdirs
 
-SUBDIRS+= NetworkManager NetworkManagerAdmin wificonfig ethernetconfig NetworkTray
+SUBDIRS+= NetworkManager wificonfig ethernetconfig NetworkTray



More information about the Commits mailing list