wpa_gui: select any network as the first entry in the list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello all!

I'd like to suggest a little change in the "List of networks". Let's put "Select any network" option to the top of the list, otherwise, when there are many networks I have to scroll all the way to the bottom each time.

For now, the only reason I see it is at the end, is because the option should only appear if there is more than 1 network. But this is most often true.

Here is an example of change:

diff --git a/wpa_supplicant/wpa_gui-qt4/wpagui.cpp b/wpa_supplicant/wpa_gui-qt4/wpagui.cpp
index 9404ab424..ea36ab85b 100644
--- a/wpa_supplicant/wpa_gui-qt4/wpagui.cpp
+++ b/wpa_supplicant/wpa_gui-qt4/wpagui.cpp
@@ -656,6 +656,8 @@ void WpaGui::updateNetworks()
 	networkSelect->clear();
 	networkList->clear();

+    networkSelect->addItem(tr("Select any network"));
+
 	if (ctrl_conn == NULL)
 		return;

@@ -733,9 +735,6 @@ void WpaGui::updateNetworks()
 		start++;
 	}

-	if (networkSelect->count() > 1)
-		networkSelect->addItem(tr("Select any network"));
-
 	if (!current && first_active >= 0)
 		networkSelect->setCurrentIndex(first_active);

I successfully built wpa_supplicant with this patch on my Gentoo, and it works. But I feel like this functionality could be useful for others as well :)

Cheers,
Victor

_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux