[pkg-wpa-devel] r1011 - in /wpasupplicant/trunk/debian: changelog patches/31_wpa_gui_qt4_select_any.patch patches/series

kelmo-guest at users.alioth.debian.org kelmo-guest at users.alioth.debian.org
Mon Jan 7 11:13:17 UTC 2008


Author: kelmo-guest
Date: Mon Jan  7 11:13:16 2008
New Revision: 1011

URL: http://svn.debian.org/wsvn/pkg-wpa/?sc=1&rev=1011
Log:
* Add debian/patches/31_wpa_gui_qt4_select_any.patch to allow selection of
  any network already defined in network combobox when more than 1 network
  is defined.

Added:
    wpasupplicant/trunk/debian/patches/31_wpa_gui_qt4_select_any.patch
Modified:
    wpasupplicant/trunk/debian/changelog
    wpasupplicant/trunk/debian/patches/series

Modified: wpasupplicant/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-wpa/wpasupplicant/trunk/debian/changelog?rev=1011&op=diff
==============================================================================
--- wpasupplicant/trunk/debian/changelog (original)
+++ wpasupplicant/trunk/debian/changelog Mon Jan  7 11:13:16 2008
@@ -87,8 +87,11 @@
     pages.
   * Build upstream manual pages from sgml source. Build-Depend on docbook and
     docbook-utils.
-
- -- Kel Modderman <kel at otaku42.de>  Mon, 07 Jan 2008 02:48:17 +1000
+  * Add debian/patches/31_wpa_gui_qt4_select_any.patch to allow selection of
+    any network already defined in network combobox when more than 1 network
+    is defined.
+
+ -- Kel Modderman <kel at otaku42.de>  Mon, 07 Jan 2008 21:11:31 +1000
 
 wpasupplicant (0.6.1~git20071119-1) unstable; urgency=low
 

Added: wpasupplicant/trunk/debian/patches/31_wpa_gui_qt4_select_any.patch
URL: http://svn.debian.org/wsvn/pkg-wpa/wpasupplicant/trunk/debian/patches/31_wpa_gui_qt4_select_any.patch?rev=1011&op=file
==============================================================================
--- wpasupplicant/trunk/debian/patches/31_wpa_gui_qt4_select_any.patch (added)
+++ wpasupplicant/trunk/debian/patches/31_wpa_gui_qt4_select_any.patch Mon Jan  7 11:13:16 2008
@@ -1,0 +1,75 @@
+--- a/wpa_supplicant/wpa_gui-qt4/wpagui.cpp
++++ b/wpa_supplicant/wpa_gui-qt4/wpagui.cpp
+@@ -490,6 +490,11 @@
+ 		start = end + 1;
+ 	}
+ 
++	if (networkSelect->count() > 1) {
++		QString network = "Select any network";
++		networkSelect->addItem(network);
++	}
++
+ 	if (!selected && first_active >= 0)
+ 		networkSelect->setCurrentIndex(first_active);
+ 
+@@ -716,13 +721,17 @@
+ 	char reply[10];
+ 	size_t reply_len = sizeof(reply);
+ 
+-	int pos = cmd.indexOf(':');
+-	if (pos < 0) {
+-		printf("Invalid selectNetwork '%s'\n",
+-		       cmd.toAscii().constData());
+-		return;
++	if (cmd.startsWith("Select any")) {
++		cmd = "any";
++	} else {
++		int pos = cmd.indexOf(':');
++		if (pos < 0) {
++			printf("Invalid selectNetwork '%s'\n",
++			       cmd.toAscii().constData());
++			return;
++		}
++		cmd.truncate(pos);
+ 	}
+-	cmd.truncate(pos);
+ 	cmd.prepend("SELECT_NETWORK ");
+ 	ctrlRequest(cmd.toAscii().constData(), reply, &reply_len);
+ }
+@@ -731,20 +740,29 @@
+ void WpaGui::editNetwork()
+ {
+ 	QString sel(networkSelect->currentText());
+-	int pos = sel.indexOf(':');
+-	if (pos < 0) {
+-		printf("Invalid selectNetwork '%s'\n",
+-		       sel.toAscii().constData());
+-		return;
++	int id = -1;
++
++	if (!sel.startsWith("Select any")) {
++		int pos = sel.indexOf(':');
++		if (pos < 0) {
++			printf("Invalid selectNetwork '%s'\n",
++			       sel.toAscii().constData());
++			return;
++		}
++		sel.truncate(pos);
++		id = sel.toInt();
+ 	}
+-	sel.truncate(pos);
+ 
+ 	NetworkConfig *nc = new NetworkConfig();
+ 	if (nc == NULL)
+ 		return;
+ 	nc->setWpaGui(this);
+ 
+-	nc->paramsFromConfig(sel.toInt());
++	if (id >= 0)
++		nc->paramsFromConfig(id);
++	else
++		nc->newNetwork();
++
+ 	nc->show();
+ 	nc->exec();
+ }

Modified: wpasupplicant/trunk/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-wpa/wpasupplicant/trunk/debian/patches/series?rev=1011&op=diff
==============================================================================
--- wpasupplicant/trunk/debian/patches/series (original)
+++ wpasupplicant/trunk/debian/patches/series Mon Jan  7 11:13:16 2008
@@ -8,3 +8,4 @@
 20_madwifi_headers.patch
 21_config_driver_madwifi.patch
 30_scan_even_when_disconnected.patch
+31_wpa_gui_qt4_select_any.patch




More information about the Pkg-wpa-devel mailing list