[PC-BSD Commits] r191 - pcbsd/trunk/wificonfig

svn at pcbsd.org svn at pcbsd.org
Tue Apr 24 12:16:02 PDT 2007


Author: kris
Date: 2007-04-24 20:16:02 +0100 (Tue, 24 Apr 2007)
New Revision: 191

Added:
   pcbsd/trunk/wificonfig/tray_wifi85.png
Modified:
   pcbsd/trunk/wificonfig/wificonfig.pro
   pcbsd/trunk/wificonfig/wificonfigwidgetbase.ui
   pcbsd/trunk/wificonfig/wificonfigwidgetbase.ui.h
Log:
Updates to WiFi config tool, should help prevent "hard-locks" when applying wifi settings. 

Added: pcbsd/trunk/wificonfig/tray_wifi85.png


Property changes on: pcbsd/trunk/wificonfig/tray_wifi85.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Modified: pcbsd/trunk/wificonfig/wificonfig.pro
===================================================================
--- pcbsd/trunk/wificonfig/wificonfig.pro	2007-04-23 13:08:04 UTC (rev 190)
+++ pcbsd/trunk/wificonfig/wificonfig.pro	2007-04-24 19:16:02 UTC (rev 191)
@@ -2,10 +2,7 @@
 LANGUAGE	= C++
 
 CONFIG	+= qt warn_on release
-TARGET  = wificonfig
-DESTDIR = /PCBSD/networkmanager/bin/
 
-
 LIBS	+= -lkdeui
 
 SOURCES	+= main.cpp
@@ -16,6 +13,13 @@
 	dialogwpapersonal.ui \
 	dialogwpaenterprise.ui
 
+TARGET  = wificonfig
+DESTDIR = /PCBSD/networkmanager/bin/
+
+
+
+
+
 unix {
   UI_DIR = .ui
   MOC_DIR = .moc

Modified: pcbsd/trunk/wificonfig/wificonfigwidgetbase.ui
===================================================================
--- pcbsd/trunk/wificonfig/wificonfigwidgetbase.ui	2007-04-23 13:08:04 UTC (rev 190)
+++ pcbsd/trunk/wificonfig/wificonfigwidgetbase.ui	2007-04-24 19:16:02 UTC (rev 191)
@@ -15,6 +15,9 @@
     <property name="caption">
         <string>Wireless Configuration</string>
     </property>
+    <property name="icon">
+        <pixmap>image0</pixmap>
+    </property>
     <grid>
         <property name="name">
             <cstring>unnamed</cstring>
@@ -829,6 +832,11 @@
         </widget>
     </grid>
 </widget>
+<images>
+    <image name="image0">
+        <data format="PNG" length="1003">89504e470d0a1a0a0000000d4948445200000016000000160806000000c4b46c3b000003b249444154388dd59541681c5518c77f3b794dbf49b7fa061ad9d506b2d0a029b574838a89164ca008490f6d0aa2f6d634424dc183370b3d4813115b8492f62078d1d28b7890d22d45887ab0512a1d2490ed453768601653dc4197cce7f665d7c3ced660ebb1073f78fce68337fff9cfff0ddf645aad160fa3bc87a2fa3085cdf2d2f2f38b3717df150023e0b4cd7ba5c03fbd3a451014656c78ecedc4254b00d56a95427f814413ca4b654ce94a69726a7aea0028ea364bfc5b32ed8d806973f6bdd9830b5f2d3c3e7f7efe7a678f6ffcb66375da8c63656265f73a861e1c60b88bc36020ed5b389a181a1fb8ab3d792bc4f598c9c3937b674ecc7c7ee495232f9f3a7dea3a40e212003c0c24aa8811c1d11023e0d82246323832293d316270c8ee7e8b3ac58a25bc19be5aba56ba7566eecc6317cf5f3c04e08bdfcf16868caaa22e419d7a18bad5299876960fa087032b6df1e1fdc3a8eab6f252f993d103a35f26f5a4e067fde3973fbb7cc30882b61db70fe67eb6d4692bed3d9180841aa2826f7cfcac4fb158a4688acf56562b8d7031fc7ee6c4ccb4176b0c4e51a70d0c4d75ba91b2e33483c14bb92e02810460682f013fe!
 b03d8388a9f1b191df902054fb8e7ac9966d995121c8891bb389a69d6dd3845b242900d4834c18a4544f0c507a117c778ad5ec35357eb7c9ff21fd96e491d83c12cdcae2106c4b6c5a23b116284c4250842a2c993e15288077ec7193836c4482bed3bdcd8cc5933f1477925221021b7334760032aab15c2c590a1e210413618285d2b4d788926d8acedc4d19566c92676596351a75ded579347c230e4d6ed323e3ef9be3cf91df9f6fd5921df9f5f13231b06430603f3f61215b78218b0e4f05548147c8104501b13df8991354b7427a274a5d28856236fe49991a664a5db06166b6d439d9ec631647cf1e7ce7d78eed3f8cfb885a2b57a2d23467af27df9ab1876e200c7cf955f2baf012e8ee3268ebf8e4d1f7bb11a55df096f87dfe46ceeebc1a706bbe2385ec4b08c614f66f34092ac4ce56cee10866d855d85fd003e3e894ba8ac547e50d5baaa7e74f6fdb3939387270fc771dc254640b871f4f5a38b5ad7df311055a3b90cedd1b915d83e7e70fcdbc181c15d51358acae5f2b2aaaee1c8485682c24061408cf48ebd34e64dbd31d5535babdd7314f4065c387fe1a7936f9ddc0bacdf37436dd6f6da1df6090cdb811ee051200714803d22f2c2a58f2ffdd6ea54235de975715ff1cd8e56e63ef507d7d6f4415b8bfb8ac78b4f17f7e6fbf37dd65ad1ba6e44d5e897702!
 9fc31fc2e9c53a7770132ffbb7fdedf3b50e7fd82ea86670000000049454e4!
 4ae42608
2</data>
+    </image>
+</images>
 <connections>
     <connection>
         <sender>buttonCancel</sender>
@@ -953,6 +961,7 @@
     <include location="local" impldecl="in declaration">dialogwpaenterprise.h</include>
     <include location="local" impldecl="in declaration">qdesktopwidget.h</include>
     <include location="local" impldecl="in declaration">qapplication.h</include>
+    <include location="local" impldecl="in declaration">qprocess.h</include>
     <include location="local" impldecl="in implementation">wificonfigwidgetbase.ui.h</include>
 </includes>
 <variables>
@@ -970,6 +979,7 @@
     <variable access="public">QString WPAEClientCert;</variable>
     <variable access="public">QString WPAEPrivKeyFile;</variable>
     <variable access="public">QString WPAEPassword;</variable>
+    <variable access="public">QProcess *netifProc;</variable>
 </variables>
 <slots>
     <slot access="private">slotClose()</slot>

Modified: pcbsd/trunk/wificonfig/wificonfigwidgetbase.ui.h
===================================================================
--- pcbsd/trunk/wificonfig/wificonfigwidgetbase.ui.h	2007-04-23 13:08:04 UTC (rev 190)
+++ pcbsd/trunk/wificonfig/wificonfigwidgetbase.ui.h	2007-04-24 19:16:02 UTC (rev 191)
@@ -181,10 +181,28 @@
     
     
       // Now restart the network for new settings to take effect
-      runCommand("/etc/rc.d/netif restart &");
-      runCommand("/etc/rc.d/routing restart &");
 
+
+    QFile filerestart( "/tmp/.netrestart.sh" );
+    if ( filerestart.open( IO_WriteOnly ) ) {
+	QTextStream streamrestart( &filerestart );
+	streamrestart << "#!/bin/sh\n";
+	streamrestart << "/etc/rc.d/netif restart\n";
+	streamrestart << "/etc/rc.d/routing restart";	
+	filerestart.close();
+    }
+
+
+     runCommand("chmod 755 /tmp/.netrestart.sh");
+     
        pushApply->setEnabled(FALSE);
+
+       netifProc = new QProcess( this );
+       netifProc->addArgument( "/tmp/.netrestart.sh" );
+
+       if ( !netifProc->start() ) {
+       }
+       
     
 }
 
@@ -596,7 +614,11 @@
 
 void wificonfigWidgetBase::slotOK()
 {
+    if ( pushApply->isEnabled() )
+    {
         slotApply();
+	sleep(1);
+    }
         close();
 }
 
@@ -1103,3 +1125,5 @@
 {
     pushApply->setEnabled(TRUE);
 }
+
+



More information about the Commits mailing list