Author: bklaas
Date: Tue Jun 15 09:56:25 2010
New Revision: 8859

URL: http://svn.slimdevices.com/jive?rev=8859&view=rev
Log:
 r39...@daddymac-520 (orig r8853):  bklaas | 2010-06-15 10:57:29 -0500
 Fixed Bug: 16263
 Description: prepend /media on to paths for finding .Squeezebox dir to delete 
in wipe/rescan
 
 r39...@daddymac-520 (orig r8854):  bklaas | 2010-06-15 11:02:16 -0500
 Fixed Bug: 15658
 Description: add System:hasBatteryCapability() method for returning whether a 
device is capable of having a battery
 Baby and Jive are battery capable, Desktop and Fab4 are not
 Add code to SetupSoundEffects to not present option for Battery Charging in 
sound effects menu when not applicable
 
 r39...@daddymac-520 (orig r8855):  bklaas | 2010-06-15 11:04:42 -0500
 Fixed Bug: 15684
 Description: never have elapsed time exceed track duration, nor remaining time 
go less than zero
 
 r39...@daddymac-520 (orig r8856):  bklaas | 2010-06-15 11:06:22 -0500
 Fixed Bug: 15951
 Description: show header widget when entering menu and ssh is already enabled
 
 r39...@daddymac-520 (orig r8858):  bklaas | 2010-06-15 11:50:32 -0500
 Fixed Bug: 14122
 along with server side checkin r30884 or later, XMLBrowse menus that have 
thumbnails for any/all items will now have the window style of 'home_menu', 
which will put a placeholder icon by default into place on the menu item before 
the thumbnail loads
 

Modified:
    7.6/trunk/   (props changed)
    
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/NowPlaying/NowPlayingApplet.lua
    
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/QVGAbaseSkin/QVGAbaseSkinApplet.lua
    
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/SetupSoundEffects/SetupSoundEffectsApplet.lua
    
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/WQVGAsmallSkin/WQVGAsmallSkinApplet.lua
    7.6/trunk/squeezeplay/src/squeezeplay/share/jive/System.lua
    
7.6/trunk/squeezeplay/src/squeezeplay_baby/share/applets/SqueezeboxBaby/SqueezeboxBabyApplet.lua
    
7.6/trunk/squeezeplay/src/squeezeplay_fab4/share/applets/SqueezeCenter/SqueezeCenterApplet.lua
    
7.6/trunk/squeezeplay/src/squeezeplay_jive/share/applets/SqueezeboxJive/SqueezeboxJiveApplet.lua
    
7.6/trunk/squeezeplay/src/squeezeplay_squeezeos/share/applets/SetupSSH/SetupSSHApplet.lua

Propchange: 7.6/trunk/
------------------------------------------------------------------------------
--- svk:merge (original)
+++ svk:merge Tue Jun 15 09:56:25 2010
@@ -13,7 +13,7 @@
 bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.4/private-branches/fab4-skin:4552
 bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.4/private-branches/new-alsa:6567
 bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.4/trunk:8423
-bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.5/trunk:8847
+bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.5/trunk:8858
 bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/7.0:2013
 bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/SN:1083
 bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/scrolling:1378

Modified: 
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/NowPlaying/NowPlayingApplet.lua
URL: 
http://svn.slimdevices.com/jive/7.6/trunk/squeezeplay/src/squeezeplay/share/applets/NowPlaying/NowPlayingApplet.lua?rev=8859&r1=8858&r2=8859&view=diff
==============================================================================
--- 
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/NowPlaying/NowPlayingApplet.lua
 (original)
+++ 
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/NowPlaying/NowPlayingApplet.lua
 Tue Jun 15 09:56:25 2010
@@ -959,10 +959,19 @@
        local elapsed, duration = self.player:getTrackElapsed()
 
        if elapsed then
-               strElapsed = _secondsToString(elapsed)
-       end
+               if duration and duration > 0 and elapsed > duration then
+                       strElapsed = _secondsToString(duration)
+               else
+                       strElapsed = _secondsToString(elapsed)
+               end
+       end
+
        if elapsed and elapsed >= 0 and duration and duration > 0 then
-               strRemain = "-" .. _secondsToString(duration - elapsed)
+               if elapsed > duration then
+                       strRemain = "-" .. _secondsToString(0)
+               else
+                       strRemain = "-" .. _secondsToString(duration - elapsed)
+               end
        end
 
        if self.progressGroup then

Modified: 
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/QVGAbaseSkin/QVGAbaseSkinApplet.lua
URL: 
http://svn.slimdevices.com/jive/7.6/trunk/squeezeplay/src/squeezeplay/share/applets/QVGAbaseSkin/QVGAbaseSkinApplet.lua?rev=8859&r1=8858&r2=8859&view=diff
==============================================================================
--- 
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/QVGAbaseSkin/QVGAbaseSkinApplet.lua
 (original)
+++ 
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/QVGAbaseSkin/QVGAbaseSkinApplet.lua
 Tue Jun 15 09:56:25 2010
@@ -932,6 +932,37 @@
                                        },
                                }),
                        },
+               },
+       })
+
+       s.home_menu.menu.item.icon_no_artwork = {
+               img = _loadImage(self, "IconsResized/icon_loading" .. 
skinSuffix ),
+               w = 51,
+               padding = { 0, 1, 0, 0 },
+       }
+       s.home_menu.menu.selected.item.icon_no_artwork = {
+               img = _loadImage(self, "IconsResized/icon_loading" .. 
skinSuffix ),
+               w   = 51,
+               padding = { 0, 1, 0, 0 },
+       }
+       s.home_menu.menu.locked.item.icon_no_artwork = {
+               img = _loadImage(self, "IconsResized/icon_loading" .. 
skinSuffix ),
+               w   = 51,
+               padding = { 0, 1, 0, 0 },
+       }
+       s.home_menu.menu.item_play = _uses(s.home_menu.menu.item, {
+               arrow = { 
+                       img = false, 
+               },
+       })
+       s.home_menu.menu.selected.item_play = 
_uses(s.home_menu.menu.selected.item, {
+               arrow = { 
+                       img = false, 
+               },
+       })
+       s.home_menu.menu.locked.item_play = _uses(s.home_menu.menu.locked.item, 
{
+               arrow = { 
+                       img = false, 
                },
        })
 

Modified: 
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/SetupSoundEffects/SetupSoundEffectsApplet.lua
URL: 
http://svn.slimdevices.com/jive/7.6/trunk/squeezeplay/src/squeezeplay/share/applets/SetupSoundEffects/SetupSoundEffectsApplet.lua?rev=8859&r1=8858&r2=8859&view=diff
==============================================================================
--- 
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/SetupSoundEffects/SetupSoundEffectsApplet.lua
 (original)
+++ 
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/SetupSoundEffects/SetupSoundEffectsApplet.lua
 Tue Jun 15 09:56:25 2010
@@ -131,44 +131,45 @@
        -- add sounds
        local effectsEnabled = false
        for k,v in pairs(groups) do
-               local soundEnabled = Framework:isSoundEnabled(v[1])
-               effectsEnabled = effectsEnabled or soundEnabled
-
-               local button = Checkbox(
-                       "checkbox", 
-                       function(obj, isSelected)
-                               for i,snd in ipairs(v) do
-                                       settings[snd] = isSelected
-                                       Framework:enableSound(snd, isSelected)
-                               end
-
-                               if isSelected then
-                                       offButton:setSelected(false)
-                               end
-
-                               -- turn on off switch?
-                               local s = false
-                               for b,_ in pairs(allButtons) do
-                                       s = s or b:isSelected()
-                               end
-                               
-                               if s == false then
-                                       offButton:setSelected(true)
-                               end
-                       end,
-                       soundEnabled
-               )
-
-               allButtons[button] = v
-
-               if k ~= "SOUND_NONE" then
-                       -- insert suitable entry for Choice menu
-                       menu:addItem({
-                                            text = self:string(k),
-                                               style = 'item_choice',
-                                            check = button,
-                                            weight = 10
-                                    })
+               if k ~= 'SOUND_CHARGING' or ( k == 'SOUND_CHARGING' and 
System:hasBatteryCapability() ) then
+                       local soundEnabled = Framework:isSoundEnabled(v[1])
+                       effectsEnabled = effectsEnabled or soundEnabled
+                               local button = Checkbox(
+                                       "checkbox", 
+                                       function(obj, isSelected)
+                                               for i,snd in ipairs(v) do
+                                                       settings[snd] = 
isSelected
+                                                       
Framework:enableSound(snd, isSelected)
+                                               end
+
+                                               if isSelected then
+                                                       
offButton:setSelected(false)
+                                               end
+
+                                               -- turn on off switch?
+                                               local s = false
+                                               for b,_ in pairs(allButtons) do
+                                                       s = s or b:isSelected()
+                                               end
+                                               
+                                               if s == false then
+                                                       
offButton:setSelected(true)
+                                               end
+                                       end,
+                                       soundEnabled
+                               )
+
+                               allButtons[button] = v
+
+                       if k ~= "SOUND_NONE" then
+                               -- insert suitable entry for Choice menu
+                               menu:addItem({
+                                                    text = self:string(k),
+                                                       style = 'item_choice',
+                                                    check = button,
+                                                    weight = 10
+                                            })
+                       end
                end
        end
 

Modified: 
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/WQVGAsmallSkin/WQVGAsmallSkinApplet.lua
URL: 
http://svn.slimdevices.com/jive/7.6/trunk/squeezeplay/src/squeezeplay/share/applets/WQVGAsmallSkin/WQVGAsmallSkinApplet.lua?rev=8859&r1=8858&r2=8859&view=diff
==============================================================================
--- 
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/WQVGAsmallSkin/WQVGAsmallSkinApplet.lua
 (original)
+++ 
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/WQVGAsmallSkin/WQVGAsmallSkinApplet.lua
 Tue Jun 15 09:56:25 2010
@@ -1638,6 +1638,15 @@
                        },
                },
        })
+
+       s.home_menu.menu.item.icon_no_artwork = {
+               img = _loadImage(self, "IconsResized/icon_loading" .. 
skinSuffix ),
+               h   = THUMB_SIZE,
+               padding = MENU_ITEM_ICON_PADDING,
+               align = 'center',
+       }
+       s.home_menu.menu.selected.item.icon_no_artwork = 
s.home_menu.menu.item.icon_no_artwork
+       s.home_menu.menu.locked.item.icon_no_artwork = 
s.home_menu.menu.item.icon_no_artwork
 
        -- icon_list window
        s.icon_list = _uses(s.window, {

Modified: 7.6/trunk/squeezeplay/src/squeezeplay/share/jive/System.lua
URL: 
http://svn.slimdevices.com/jive/7.6/trunk/squeezeplay/src/squeezeplay/share/jive/System.lua?rev=8859&r1=8858&r2=8859&view=diff
==============================================================================
--- 7.6/trunk/squeezeplay/src/squeezeplay/share/jive/System.lua (original)
+++ 7.6/trunk/squeezeplay/src/squeezeplay/share/jive/System.lua Tue Jun 15 
09:56:25 2010
@@ -154,6 +154,10 @@
        return self:hasUSB() or self:hasSDCard() or not self:isHardware()
 end
 
+function hasBatteryCapability(self)
+       return _capabilities["batteryCapable"] ~= nil
+end
+
 -- rest is C implementation
 
 

Modified: 
7.6/trunk/squeezeplay/src/squeezeplay_baby/share/applets/SqueezeboxBaby/SqueezeboxBabyApplet.lua
URL: 
http://svn.slimdevices.com/jive/7.6/trunk/squeezeplay/src/squeezeplay_baby/share/applets/SqueezeboxBaby/SqueezeboxBabyApplet.lua?rev=8859&r1=8858&r2=8859&view=diff
==============================================================================
--- 
7.6/trunk/squeezeplay/src/squeezeplay_baby/share/applets/SqueezeboxBaby/SqueezeboxBabyApplet.lua
 (original)
+++ 
7.6/trunk/squeezeplay/src/squeezeplay_baby/share/applets/SqueezeboxBaby/SqueezeboxBabyApplet.lua
 Tue Jun 15 09:56:25 2010
@@ -147,6 +147,7 @@
                ["volumeKnob"] = 1,
                ["audioByDefault"] = 1,
                ["wiredNetworking"] = 1,
+               ["batteryCapable"] = 1,
        })
 
        -- warn if uuid or mac are invalid

Modified: 
7.6/trunk/squeezeplay/src/squeezeplay_fab4/share/applets/SqueezeCenter/SqueezeCenterApplet.lua
URL: 
http://svn.slimdevices.com/jive/7.6/trunk/squeezeplay/src/squeezeplay_fab4/share/applets/SqueezeCenter/SqueezeCenterApplet.lua?rev=8859&r1=8858&r2=8859&view=diff
==============================================================================
--- 
7.6/trunk/squeezeplay/src/squeezeplay_fab4/share/applets/SqueezeCenter/SqueezeCenterApplet.lua
 (original)
+++ 
7.6/trunk/squeezeplay/src/squeezeplay_fab4/share/applets/SqueezeCenter/SqueezeCenterApplet.lua
 Tue Jun 15 09:56:25 2010
@@ -498,7 +498,9 @@
        end
 
        -- wipe the .Squeezebox directory forcefully through linux
-       local command = "rm -rf " .. scDrive .. "/.Squeezebox &"
+       local command = "rm -rf /media/" .. scDrive .. "/.Squeezebox &"
+
+       log:debug('remove .Squeezebox dir: ', command)
        os.execute(command)
 
        self.wipeTimeout = 0
@@ -700,7 +702,8 @@
 function squeezeboxDirPresent(self, scDrive)
        local present = false
        
-       for f in lfs.dir(scDrive) do
+       local scDriveLocation = "/media/" .. scDrive
+       for f in lfs.dir(scDriveLocation) do
                present = string.match(f, "^\.Squeezebox")
                if present then
                        log:info("squeezeboxDirPresent(), found it: ", present)

Modified: 
7.6/trunk/squeezeplay/src/squeezeplay_jive/share/applets/SqueezeboxJive/SqueezeboxJiveApplet.lua
URL: 
http://svn.slimdevices.com/jive/7.6/trunk/squeezeplay/src/squeezeplay_jive/share/applets/SqueezeboxJive/SqueezeboxJiveApplet.lua?rev=8859&r1=8858&r2=8859&view=diff
==============================================================================
--- 
7.6/trunk/squeezeplay/src/squeezeplay_jive/share/applets/SqueezeboxJive/SqueezeboxJiveApplet.lua
 (original)
+++ 
7.6/trunk/squeezeplay/src/squeezeplay_jive/share/applets/SqueezeboxJive/SqueezeboxJiveApplet.lua
 Tue Jun 15 09:56:25 2010
@@ -96,6 +96,7 @@
                ["homeAsPowerKey"] = 1,
                ["deviceRotation"] = 1,
                ["sdcard"] = 1,
+               ["batteryCapable"] = 1,
        })
        
        -- warn if uuid or mac are invalid

Modified: 
7.6/trunk/squeezeplay/src/squeezeplay_squeezeos/share/applets/SetupSSH/SetupSSHApplet.lua
URL: 
http://svn.slimdevices.com/jive/7.6/trunk/squeezeplay/src/squeezeplay_squeezeos/share/applets/SetupSSH/SetupSSHApplet.lua?rev=8859&r1=8858&r2=8859&view=diff
==============================================================================
--- 
7.6/trunk/squeezeplay/src/squeezeplay_squeezeos/share/applets/SetupSSH/SetupSSHApplet.lua
 (original)
+++ 
7.6/trunk/squeezeplay/src/squeezeplay_squeezeos/share/applets/SetupSSH/SetupSSHApplet.lua
 Tue Jun 15 09:56:25 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

Reply via email to