Author: fmueller
Date: Fri Mar 23 04:37:45 2012
New Revision: 9676

URL: http://svn.slimdevices.com/jive?rev=9676&view=rev
Log:
Bug: n/a 
Description: Network setup changes
- Simplify WEP input (figure out encryption from length of entered key) 

Modified:
    
7.8/trunk/squeezeplay/src/squeezeplay_squeezeos/share/applets/SetupNetworking/SetupNetworkingApplet.lua
    
7.8/trunk/squeezeplay/src/squeezeplay_squeezeos/share/applets/SetupNetworking/strings.txt
    
7.8/trunk/squeezeplay/src/squeezeplay_squeezeos/share/jive/net/Networking.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=9676&r1=9675&r2=9676&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
 Fri Mar 23 04:37:45 2012
@@ -750,7 +750,11 @@
                return _enterPSK(self, iface, ssid)
 
        elseif string.find(flags, "WEP") then
-               return _chooseWEPLength(self, iface, ssid)
+-- fm+
+--             return _chooseWEPLength(self, iface, ssid)
+               self.encryption = "wep40_104"
+               return _enterWEPKey(self, iface, ssid)
+-- fm-
 
        elseif string.find(flags, "WPA%-EAP") or string.find(flags, 
"WPA2%-EAP") then
                return _enterEAP(self, iface, ssid)
@@ -778,6 +782,62 @@
                                _connect(self, iface, ssid, true, false)
                        end
                },
+-- fm+
+--             {
+--                     text = self:string("NETWORK_WEP_64"),
+--                     sound = "WINDOWSHOW",
+--                     callback = function()
+--                             self.encryption = "wep40"
+--                             _enterWEPKey(self, iface, ssid)
+--                     end
+--             },
+-- fm-
+
+               {
+                       text = self:string("NETWORK_WEP_64_128"),
+                       sound = "WINDOWSHOW",
+                       callback = function()
+-- fm+
+--                             self.encryption = "wep104"
+                               self.encryption = "wep40_104"
+-- fm-
+                               _enterWEPKey(self, iface, ssid)
+                       end
+               },
+               {
+                       text = self:string("NETWORK_WPA"),
+                       sound = "WINDOWSHOW",
+                       callback = function()
+                               self.encryption = "wpa"
+                               _enterPSK(self, iface, ssid)
+                       end
+               },
+               {
+                       text = self:string("NETWORK_WPA2"),
+                       sound = "WINDOWSHOW",
+                       callback = function()
+                               self.encryption = "wpa2"
+                               _enterPSK(self, iface, ssid)
+                       end
+               },
+       })
+       window:addWidget(menu)
+
+       --_helpAction(self, window, "NETWORK_WIRELESS_ENCRYPTION", 
"NETWORK_WIRELESS_ENCRYPTION_HELP")
+       _helpAction(self, window, nil, nil, menu)
+
+       self:tieAndShowWindow(window)
+end
+
+
+function _chooseWEPLength(self, iface, ssid)
+       assert(iface and ssid, debug.traceback())
+
+       local window = Window("text_list", 
self:string("NETWORK_PASSWORD_TYPE"), 'setuptitle')
+       window:setAllowScreensaver(false)
+       window:setButtonAction("rbutton", nil)
+
+       local menu = SimpleMenu("menu", {
                {
                        text = self:string("NETWORK_WEP_64"),
                        sound = "WINDOWSHOW",
@@ -794,22 +854,6 @@
                                _enterWEPKey(self, iface, ssid)
                        end
                },
-               {
-                       text = self:string("NETWORK_WPA"),
-                       sound = "WINDOWSHOW",
-                       callback = function()
-                               self.encryption = "wpa"
-                               _enterPSK(self, iface, ssid)
-                       end
-               },
-               {
-                       text = self:string("NETWORK_WPA2"),
-                       sound = "WINDOWSHOW",
-                       callback = function()
-                               self.encryption = "wpa2"
-                               _enterPSK(self, iface, ssid)
-                       end
-               },
        })
        window:addWidget(menu)
 
@@ -820,40 +864,6 @@
 end
 
 
-function _chooseWEPLength(self, iface, ssid)
-       assert(iface and ssid, debug.traceback())
-
-       local window = Window("text_list", 
self:string("NETWORK_PASSWORD_TYPE"), 'setuptitle')
-       window:setAllowScreensaver(false)
-       window:setButtonAction("rbutton", nil)
-
-       local menu = SimpleMenu("menu", {
-               {
-                       text = self:string("NETWORK_WEP_64"),
-                       sound = "WINDOWSHOW",
-                       callback = function()
-                               self.encryption = "wep40"
-                               _enterWEPKey(self, iface, ssid)
-                       end
-               },
-               {
-                       text = self:string("NETWORK_WEP_128"),
-                       sound = "WINDOWSHOW",
-                       callback = function()
-                               self.encryption = "wep104"
-                               _enterWEPKey(self, iface, ssid)
-                       end
-               },
-       })
-       window:addWidget(menu)
-
-       --_helpAction(self, window, "NETWORK_WIRELESS_ENCRYPTION", 
"NETWORK_WIRELESS_ENCRYPTION_HELP")
-       _helpAction(self, window, nil, nil, menu)
-
-       self:tieAndShowWindow(window)
-end
-
-
 function _enterWEPKey(self, iface, ssid)
        assert(iface and ssid, debug.traceback())
 
@@ -861,12 +871,19 @@
        window:setAllowScreensaver(false)
 
        local v
-       -- set the initial value
-       if self.encryption == "wep40" then
-               v = Textinput.hexValue("", 10, 10)
-       else
-               v = Textinput.hexValue("", 26, 26)
-       end
+
+-- fm+
+--     -- set the initial value
+--     if self.encryption == "wep40" then
+--             v = Textinput.hexValue("", 10, 10)
+--     else
+--             v = Textinput.hexValue("", 26, 26)
+--     end
+
+       -- allow for longer input
+       self.encryption = "wep40_104"
+       v = Textinput.hexValue("", 10, 26)
+-- fm-
 
        local textinput = Textinput("textinput", v,
                                    function(widget, value)

Modified: 
7.8/trunk/squeezeplay/src/squeezeplay_squeezeos/share/applets/SetupNetworking/strings.txt
URL: 
http://svn.slimdevices.com/jive/7.8/trunk/squeezeplay/src/squeezeplay_squeezeos/share/applets/SetupNetworking/strings.txt?rev=9676&r1=9675&r2=9676&view=diff
==============================================================================
--- 
7.8/trunk/squeezeplay/src/squeezeplay_squeezeos/share/applets/SetupNetworking/strings.txt
 (original)
+++ 
7.8/trunk/squeezeplay/src/squeezeplay_squeezeos/share/applets/SetupNetworking/strings.txt
 Fri Mar 23 04:37:45 2012
@@ -437,6 +437,21 @@
        PL      WEP 128 bitów (26 znaków)
        RU      128-разрядный WEP (26 знаков)
        SV      128-bitars WEP (26 tecken)
+
+NETWORK_WEP_64_128
+       CS      WEP 64-bit (10 znaků) / WEP 128-bit (26 znaků)
+       DA      WEP 64-bit (10 tegn) / WEP 128-bit (26 tegn)
+       DE      64-Bit-WEP (10 Zeichen) / 128-Bit-WEP (26 Zeichen)
+       EN      WEP 64-bit (10 Characters) / WEP 128-bit (26 Characters)
+       ES      WEP de 64 bits (10 caracteres) / WEP de 128 bits (26 caracteres)
+       FI      WEP 64-bittinen (10 merkkiä) / WEP 128-bittinen (26 merkkiä)
+       FR      WEP 64 bits (10 caractères) / WEP 128 bits (26 caractères)
+       IT      WEP a 64 bit (10 caratteri) / WEP a 128 bit (26 caratteri)
+       NL      WEP 64-bits (10 tekens) / WEP 128 bits (26 tekens)
+       NO      WEP 64-bit (10 tegn) / WEP 128-bit (26 tegn)
+       PL      WEP 64 bity (10 znaków) / WEP 128 bitów (26 znaków)
+       RU      64-разрядный WEP (10 знаков) / 
128-разрядный WEP (26 знаков)
+       SV      64-bitars WEP (10 tecken) / 128-bitars WEP (26 tecken)
 
 NETWORK_WPA
        CS      WPA Personal

Modified: 
7.8/trunk/squeezeplay/src/squeezeplay_squeezeos/share/jive/net/Networking.lua
URL: 
http://svn.slimdevices.com/jive/7.8/trunk/squeezeplay/src/squeezeplay_squeezeos/share/jive/net/Networking.lua?rev=9676&r1=9675&r2=9676&view=diff
==============================================================================
--- 
7.8/trunk/squeezeplay/src/squeezeplay_squeezeos/share/jive/net/Networking.lua 
(original)
+++ 
7.8/trunk/squeezeplay/src/squeezeplay_squeezeos/share/jive/net/Networking.lua 
Fri Mar 23 04:37:45 2012
@@ -981,7 +981,10 @@
                assert(self:request(request) == "OK\n", "wpa_cli failed:" .. 
request)
        end
 
-       if option.encryption == "wep40" or option.encryption == "wep104" then
+-- fm+
+--     if option.encryption == "wep40" or option.encryption == "wep104" then
+       if option.encryption == "wep40_104" then
+-- fm-
                log:info("encryption WEP")
 
                request = 'SET_NETWORK ' .. id .. ' wep_key0 ' .. option.key
@@ -1961,12 +1964,18 @@
                -- No encryption
                if proto == nil and psk == nil and key == nil then
                        status.wps_encryption = "none"
-               -- WEP 64
-               elseif key ~= nil and #key <= 10 then
-                       status.wps_encryption = "wep40"
-               -- WEP 128
+
+-- fm+
+--             -- WEP 64
+--             elseif key ~= nil and #key <= 10 then
+--                     status.wps_encryption = "wep40"
+--             -- WEP 128
+--             elseif key ~= nil then
+--                     status.wps_encryption = "wep104"
                elseif key ~= nil then
-                       status.wps_encryption = "wep104"
+                       status.wps_encryption = "wep10_104"
+-- fm-
+
                -- WPA
                elseif proto == "WPA" then
                        status.wps_encryption = "wpa"

_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/jive-checkins

Reply via email to