Author: fmueller
Date: Mon Mar 14 06:50:23 2011
New Revision: 9359
URL: http://svn.slimdevices.com/jive?rev=9359&view=rev
Log:
Bug: 15741
Description: Automatically hide eject success window when SD card / USB device
is removed.
Modified:
7.6/trunk/squeezeplay/src/squeezeplay_fab4/share/applets/MediaManager/MediaManagerApplet.lua
Modified:
7.6/trunk/squeezeplay/src/squeezeplay_fab4/share/applets/MediaManager/MediaManagerApplet.lua
URL:
http://svn.slimdevices.com/jive/7.6/trunk/squeezeplay/src/squeezeplay_fab4/share/applets/MediaManager/MediaManagerApplet.lua?rev=9359&r1=9358&r2=9359&view=diff
==============================================================================
---
7.6/trunk/squeezeplay/src/squeezeplay_fab4/share/applets/MediaManager/MediaManagerApplet.lua
(original)
+++
7.6/trunk/squeezeplay/src/squeezeplay_fab4/share/applets/MediaManager/MediaManagerApplet.lua
Mon Mar 14 06:50:23 2011
@@ -354,6 +354,14 @@
---function _mountingDrive(self)
function _deviceRemoval(self, devName)
+ -- If unmount success window is still up - automatically hide it and go
home
+ -- This saves the user from needing to click 'ok' manually
+ if self.unmountSuccessWindow then
+ self.unmountSuccessWindow:hide()
+ self.unmountSuccessWindow = nil
+ Framework:pushAction("go_home")
+ end
+
-- if devName is still in the self.mountedDevices table, consider this
an unsafe eject
if self.mountedDevices and self.mountedDevices[devName] then
@@ -581,6 +589,10 @@
local window = Window("text_list", self:string("DEVICE_EJECTED"))
+
+ -- Keep a reference so we can hide window when user removed SD card
+ self.unmountSuccessWindow = window
+
window:setAllowScreensaver(false)
window:setButtonAction("rbutton", nil)
window:setButtonAction("lbutton", nil)
@@ -598,6 +610,9 @@
self.ejectWarningWindow = nil
end
window:hide()
+
+ -- User clicked ok before removing SD card - no need to
keep the reference
+ self.unmountSuccessWindow = nil
end
})
_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/jive-checkins