Author: bklaas
Date: Tue Jun 15 09:06:22 2010
New Revision: 8856
URL: http://svn.slimdevices.com/jive?rev=8856&view=rev
Log:
Fixed Bug: 15951
Description: show header widget when entering menu and ssh is already enabled
Modified:
7.5/trunk/squeezeplay/src/squeezeplay_squeezeos/share/applets/SetupSSH/SetupSSHApplet.lua
Modified:
7.5/trunk/squeezeplay/src/squeezeplay_squeezeos/share/applets/SetupSSH/SetupSSHApplet.lua
URL:
http://svn.slimdevices.com/jive/7.5/trunk/squeezeplay/src/squeezeplay_squeezeos/share/applets/SetupSSH/SetupSSHApplet.lua?rev=8856&r1=8855&r2=8856&view=diff
==============================================================================
---
7.5/trunk/squeezeplay/src/squeezeplay_squeezeos/share/applets/SetupSSH/SetupSSHApplet.lua
(original)
+++
7.5/trunk/squeezeplay/src/squeezeplay_squeezeos/share/applets/SetupSSH/SetupSSHApplet.lua
Tue Jun 15 09:06:22 2010
@@ -52,13 +52,16 @@
self.window = window
self.menu = menu
+ if sshEnabled then
+ self:_addHelpInfo()
+ end
self:tieAndShowWindow(window)
return window
end
-function _enableSSH(self, window)
+function _addHelpInfo(self)
local ipaddr = _getIPAddress()
local password = "1234"
@@ -67,11 +70,16 @@
self.howto = Textarea("help_text", self:string("SSH_HOWTO",
tostring(password), tostring(ipaddr)))
self.menu:setHeaderWidget(self.howto)
+
+ self.window:focusWidget(self.menu)
+
+end
+
+
+function _enableSSH(self, window)
+
+ self:_addHelpInfo()
self.menu:reLayout()
-
- -- FIXME currently the last widget added to the window has focus, until
this is fixed
- -- pass events from the textarea to the menu.
- self.howto:addListener(EVENT_ALL, function(event) return
Framework:dispatchEvent(self.menu, event) end)
-- enable SSH
_fileSub("/etc/inetd.conf", "^#ssh", "ssh")
@@ -83,10 +91,7 @@
function _disableSSH(self, window)
- if self.howto then
- self.window:removeWidget(self.howto)
- self.howto = nil
- end
+ self.howto = nil
-- disable SSH
_fileSub("/etc/inetd.conf", "^ssh", "#ssh")
_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/jive-checkins