Author: fmueller
Date: Tue Mar 20 06:13:14 2012
New Revision: 9665
URL: http://svn.slimdevices.com/jive?rev=9665&view=rev
Log:
Bug: n/a
Description: Network setup changes
- Removed Ethernet / WiFi selection step
- Added shortcut to automatically use Ethernet if available and link is up
- Added Ethernet option to SSID list
- Disabled SSID autorefresh
- Added rescan network option to SSID list
- Added enter network name option to SSID list
Modified:
7.8/trunk/squeezeplay/src/squeezeplay_squeezeos/share/applets/SetupNetworking/SetupNetworkingApplet.lua
Modified:
7.8/trunk/squeezeplay/src/squeezeplay_squeezeos/share/applets/SetupNetworking/SetupNetworkingApplet.lua
URL:
http://svn.slimdevices.com/jive/7.8/trunk/squeezeplay/src/squeezeplay_squeezeos/share/applets/SetupNetworking/SetupNetworkingApplet.lua?rev=9665&r1=9664&r2=9665&view=diff
==============================================================================
---
7.8/trunk/squeezeplay/src/squeezeplay_squeezeos/share/applets/SetupNetworking/SetupNetworkingApplet.lua
(original)
+++
7.8/trunk/squeezeplay/src/squeezeplay_squeezeos/share/applets/SetupNetworking/SetupNetworkingApplet.lua
Tue Mar 20 06:13:14 2012
@@ -169,6 +169,28 @@
assert(self.wlanIface or self.ethIface)
+-- fm+
+ -- Shortcut to use Ethernet immediately if available and link is up
+ if self.ethIface then
+ Task("halfDuplexBugVerification", self,
+ function()
+ local status = self.ethIface:t_wpaStatus()
+ if status.link then
+ return _halfDuplexBugVerification(self,
self.ethIface)
+ else
+ -- Ethernet available but no link - do
a wireless scan
+ return _networkScan(self,
self.wlanIface)
+ end
+ end
+ ):addTask()
+ else
+ -- Only wireless available - do a wireless scan
+ return _networkScan(self, self.wlanIface)
+ end
+-- fm-
+
+
+--[[
-- short cut if only one interface is available
if not self.wlanIface then
-- Only ethernet available
@@ -209,6 +231,7 @@
_helpAction(self, window, "NETWORK_CONNECTION_HELP",
"NETWORK_CONNECTION_HELP_BODY", connectionMenu)
self:tieAndShowWindow(window)
+--]]
end
@@ -350,6 +373,8 @@
function _networkScanComplete(self, iface)
self.scanResults = {}
+-- fm+
+--[[
-- for ethernet, automatically connect
if not iface:isWireless() then
local nextStep = function()
@@ -366,6 +391,8 @@
return
end
end
+--]]
+-- fm-
local window = Window("text_list",
self:string("NETWORK_WIRELESS_NETWORKS"), 'setuptitle')
window:setAllowScreensaver(false)
@@ -375,14 +402,45 @@
-- add hidden ssid menu
menu:addItem({
- text = self:string("NETWORK_ENTER_ANOTHER_NETWORK"),
+-- fm+
+-- text = self:string("NETWORK_ENTER_ANOTHER_NETWORK"),
+ text = self:string("NETWORK_ENTER_SSID"),
+-- fm-
sound = "WINDOWSHOW",
callback = function()
- _chooseEnterSSID(self, iface)
+-- fm+
+-- _chooseEnterSSID(self, iface)
+ _enterSSID(self, iface)
+-- fm-
end,
weight = 3
})
+-- fm+
+ -- add 'Ethernet' menu item if available
+ if self.ethIface then
+ menu:addItem({
+ text = self:string("NETWORK_ETHERNET"),
+ sound = "WINDOWSHOW",
+ callback = function()
+ _halfDuplexBugVerification(self, self.ethIface)
+ end,
+ weight = 11
+ })
+ end
+
+ -- add 'search again' menu item
+ menu:addItem({
+ text = self:string("NETWORK_SEARCH_FOR_MY_NETWORK"),
+ sound = "WINDOWSHOW",
+ callback = function()
+ _networkScanAgain(self, iface, false)
+ end,
+ weight = 12
+ })
+-- fm-
+
+
window:addWidget(menu)
self.scanWindow = window
@@ -391,6 +449,8 @@
-- process existing scan results
_scanResults(self, iface)
+-- fm+
+--[[
-- schedule network scan
self.scanMenu:addTimer(5000,
function()
@@ -405,7 +465,8 @@
_scanResults(self, iface)
end)
end)
-
+--]]
+-- fm-
_helpAction(self, window, "NETWORK_LIST_HELP",
"NETWORK_LIST_HELP_BODY", self.scanMenu)
self:tieAndShowWindow(window)
@@ -475,6 +536,23 @@
end
end
end
+
+-- fm+
+function _halfDuplexBugVerification(self, iface)
+ log:info("_halfDuplexBugVerification")
+ local nextStep = function()
+ _connect(self, iface, iface:getName(), true, false)
+ end
+
+ if appletManager:callService("performHalfDuplexBugTest") then
+ _halfDuplexBugTest(self, iface, nextStep)
+ return
+ else
+ nextStep()
+ return
+ end
+end
+-- fm-
function _halfDuplexBugTest(self, iface, nextStep, useShowInstead)
log:info("_halfDuplexBugTest:")
@@ -533,7 +611,8 @@
-------- WIRELESS SSID AND PASSWORD --------
-
+-- fm+
+--[[
function _chooseEnterSSID(self, iface)
local window = Window("help_list",
self:string("NETWORK_DONT_SEE_YOUR_NETWORK"), 'setuptitle')
window:setAllowScreensaver(false)
@@ -564,7 +643,8 @@
self:tieAndShowWindow(window)
end
-
+--]]
+-- fm-
function _enterSSID(self, iface)
assert(iface, debug.traceback())
_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/jive-checkins