Author: mherger
Date: Thu Feb 11 07:00:16 2010
New Revision: 8485

URL: http://svn.slimdevices.com/jive?rev=8485&view=rev
Log:
Fixed Bug: 13136
Description: add loading icon to ImageViewer. Use app specific icon if possible.

Added:
    
7.5/trunk/squeezeplay/src/squeezeplay/share/applets/QVGAbaseSkin/images/Icons/image_viewer_loading.png
   (with props)
    
7.5/trunk/squeezeplay/src/squeezeplay/share/applets/WQVGAsmallSkin/images/Icons/image_viewer_loading.png
   (with props)
Modified:
    
7.5/trunk/squeezeplay/src/squeezeplay/share/applets/ImageViewer/ImageSource.lua
    
7.5/trunk/squeezeplay/src/squeezeplay/share/applets/ImageViewer/ImageSourceServer.lua
    
7.5/trunk/squeezeplay/src/squeezeplay/share/applets/ImageViewer/ImageViewerApplet.lua
    
7.5/trunk/squeezeplay/src/squeezeplay/share/applets/QVGAbaseSkin/QVGAbaseSkinApplet.lua
    
7.5/trunk/squeezeplay/src/squeezeplay/share/applets/QVGAlandscapeSkin/QVGAlandscapeSkinApplet.lua
    
7.5/trunk/squeezeplay/src/squeezeplay/share/applets/WQVGAlargeSkin/WQVGAlargeSkinApplet.lua
    
7.5/trunk/squeezeplay/src/squeezeplay/share/applets/WQVGAsmallSkin/WQVGAsmallSkinApplet.lua

Modified: 
7.5/trunk/squeezeplay/src/squeezeplay/share/applets/ImageViewer/ImageSource.lua
URL: 
http://svn.slimdevices.com/jive/7.5/trunk/squeezeplay/src/squeezeplay/share/applets/ImageViewer/ImageSource.lua?rev=8485&r1=8484&r2=8485&view=diff
==============================================================================
--- 
7.5/trunk/squeezeplay/src/squeezeplay/share/applets/ImageViewer/ImageSource.lua 
(original)
+++ 
7.5/trunk/squeezeplay/src/squeezeplay/share/applets/ImageViewer/ImageSource.lua 
Thu Feb 11 07:00:16 2010
@@ -23,6 +23,7 @@
 local string        = require("jive.utils.string")
 local Textarea      = require("jive.ui.Textarea")
 local Window        = require("jive.ui.Window")
+local Icon          = require("jive.ui.Icon")
 local log           = require("jive.utils.log").logger("applet.ImageViewer")
 local jiveMain      = jiveMain
 
@@ -104,6 +105,7 @@
 
 --optionally, image sources can modify the icon that appears on the loading 
page, to, for instance, show a Flickr icon instead
 function updateLoadingIcon(self, icon)
+       return Icon("icon_photo_loading")
 end
 
 function nextImage(self, ordering)

Modified: 
7.5/trunk/squeezeplay/src/squeezeplay/share/applets/ImageViewer/ImageSourceServer.lua
URL: 
http://svn.slimdevices.com/jive/7.5/trunk/squeezeplay/src/squeezeplay/share/applets/ImageViewer/ImageSourceServer.lua?rev=8485&r1=8484&r2=8485&view=diff
==============================================================================
--- 
7.5/trunk/squeezeplay/src/squeezeplay/share/applets/ImageViewer/ImageSourceServer.lua
 (original)
+++ 
7.5/trunk/squeezeplay/src/squeezeplay/share/applets/ImageViewer/ImageSourceServer.lua
 Thu Feb 11 07:00:16 2010
@@ -28,6 +28,7 @@
 local SlimServer    = require("jive.slim.SlimServer")
 local RequestHttp      = require("jive.net.RequestHttp")
 local URL              = require("socket.url")
+local Icon             = require("jive.ui.Icon")
 local Surface          = require("jive.ui.Surface")
 local Framework                = require("jive.ui.Framework")
 
@@ -252,13 +253,20 @@
 
 
 function settings(self, window)
-    return window
-end
-
-function updateLoadingIcon(self, icon)
-       if self.serverData.appParameters and 
self.serverData.appParameters.iconId then
-               
self.serverData.server:fetchArtwork(self.serverData.appParameters.iconId, icon, 
jiveMain:getSkinParam('THUMB_SIZE'), 'png')
-       end
+       return window
+end
+
+function updateLoadingIcon(self)
+       local icon = Icon("icon_photo_loading")
+
+       if self.serverData.appParameters and 
self.serverData.appParameters.iconId 
+               and not string.match(self.serverData.appParameters.iconId, 
"MyApps") then
+
+               -- don't display the My Apps icon in case we're browsing 
flickr/facebook through the My Apps menu
+               
self.serverData.server:fetchArtwork(self.serverData.appParameters.iconId, icon, 
jiveMain:getSkinParam('POPUP_THUMB_SIZE'), 'png')
+       end
+       
+       return icon
 end
 
 function useAutoZoom(self)

Modified: 
7.5/trunk/squeezeplay/src/squeezeplay/share/applets/ImageViewer/ImageViewerApplet.lua
URL: 
http://svn.slimdevices.com/jive/7.5/trunk/squeezeplay/src/squeezeplay/share/applets/ImageViewer/ImageViewerApplet.lua?rev=8485&r1=8484&r2=8485&view=diff
==============================================================================
--- 
7.5/trunk/squeezeplay/src/squeezeplay/share/applets/ImageViewer/ImageViewerApplet.lua
 (original)
+++ 
7.5/trunk/squeezeplay/src/squeezeplay/share/applets/ImageViewer/ImageViewerApplet.lua
 Thu Feb 11 07:00:16 2010
@@ -148,6 +148,12 @@
        local popup = Window("black_popup", "")
 
        popup:setAutoHide(true)
+       popup:setShowFrameworkWidgets(false)
+       
+       local icon = self.imgSource:updateLoadingIcon()
+       if icon then
+               popup:addWidget(icon)
+       end
 
        local sublabel = Label("subtext", self:string("IMAGE_VIEWER_LOADING"))
        popup:addWidget(sublabel)

Modified: 
7.5/trunk/squeezeplay/src/squeezeplay/share/applets/QVGAbaseSkin/QVGAbaseSkinApplet.lua
URL: 
http://svn.slimdevices.com/jive/7.5/trunk/squeezeplay/src/squeezeplay/share/applets/QVGAbaseSkin/QVGAbaseSkinApplet.lua?rev=8485&r1=8484&r2=8485&view=diff
==============================================================================
--- 
7.5/trunk/squeezeplay/src/squeezeplay/share/applets/QVGAbaseSkin/QVGAbaseSkinApplet.lua
 (original)
+++ 
7.5/trunk/squeezeplay/src/squeezeplay/share/applets/QVGAbaseSkin/QVGAbaseSkinApplet.lua
 Thu Feb 11 07:00:16 2010
@@ -1813,8 +1813,8 @@
        })
 
        s.icon_photo_loading = _uses(s._icon, {
-               img = _loadImage(self, "IconsResized/icon_image_viewer" .. 
skinSuffix),
-               padding = { 5, 55, 0, 5 }
+               img = _loadImage(self, "Icons/image_viewer_loading.png"),
+               padding = { 5, 40, 0, 5 }
        })
 
        s.icon_software_update = _uses(s._icon, {

Added: 
7.5/trunk/squeezeplay/src/squeezeplay/share/applets/QVGAbaseSkin/images/Icons/image_viewer_loading.png
URL: 
http://svn.slimdevices.com/jive/7.5/trunk/squeezeplay/src/squeezeplay/share/applets/QVGAbaseSkin/images/Icons/image_viewer_loading.png?rev=8485&view=auto
==============================================================================
Binary file - no diff available.

Propchange: 
7.5/trunk/squeezeplay/src/squeezeplay/share/applets/QVGAbaseSkin/images/Icons/image_viewer_loading.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Modified: 
7.5/trunk/squeezeplay/src/squeezeplay/share/applets/QVGAlandscapeSkin/QVGAlandscapeSkinApplet.lua
URL: 
http://svn.slimdevices.com/jive/7.5/trunk/squeezeplay/src/squeezeplay/share/applets/QVGAlandscapeSkin/QVGAlandscapeSkinApplet.lua?rev=8485&r1=8484&r2=8485&view=diff
==============================================================================
--- 
7.5/trunk/squeezeplay/src/squeezeplay/share/applets/QVGAlandscapeSkin/QVGAlandscapeSkinApplet.lua
 (original)
+++ 
7.5/trunk/squeezeplay/src/squeezeplay/share/applets/QVGAlandscapeSkin/QVGAlandscapeSkinApplet.lua
 Thu Feb 11 07:00:16 2010
@@ -325,6 +325,11 @@
 
        s.npvolumeB = { hidden = 1 }
 
+       s.icon_photo_loading = _uses(s._icon, {
+               img = _loadImage(self, "Icons/image_viewer_loading.png"),
+               padding = { 5, 5, 0, 5 }
+       })
+
 end
 
 

Modified: 
7.5/trunk/squeezeplay/src/squeezeplay/share/applets/WQVGAlargeSkin/WQVGAlargeSkinApplet.lua
URL: 
http://svn.slimdevices.com/jive/7.5/trunk/squeezeplay/src/squeezeplay/share/applets/WQVGAlargeSkin/WQVGAlargeSkinApplet.lua?rev=8485&r1=8484&r2=8485&view=diff
==============================================================================
--- 
7.5/trunk/squeezeplay/src/squeezeplay/share/applets/WQVGAlargeSkin/WQVGAlargeSkinApplet.lua
 (original)
+++ 
7.5/trunk/squeezeplay/src/squeezeplay/share/applets/WQVGAlargeSkin/WQVGAlargeSkinApplet.lua
 Thu Feb 11 07:00:16 2010
@@ -1894,7 +1894,7 @@
        })
 
        s.icon_photo_loading = _uses(_icon, {
-               img = _loadImage(self, "IconsResized/icon_image_viewer" .. 
skinSuffix),
+               img = _loadImage(self, "Icons/image_viewer_loading.png"),
        })
 
        s.icon_software_update = _uses(_icon, {

Modified: 
7.5/trunk/squeezeplay/src/squeezeplay/share/applets/WQVGAsmallSkin/WQVGAsmallSkinApplet.lua
URL: 
http://svn.slimdevices.com/jive/7.5/trunk/squeezeplay/src/squeezeplay/share/applets/WQVGAsmallSkin/WQVGAsmallSkinApplet.lua?rev=8485&r1=8484&r2=8485&view=diff
==============================================================================
--- 
7.5/trunk/squeezeplay/src/squeezeplay/share/applets/WQVGAsmallSkin/WQVGAsmallSkinApplet.lua
 (original)
+++ 
7.5/trunk/squeezeplay/src/squeezeplay/share/applets/WQVGAsmallSkin/WQVGAsmallSkinApplet.lua
 Thu Feb 11 07:00:16 2010
@@ -2413,7 +2413,7 @@
        })
 
        s.icon_photo_loading = _uses(_icon, {
-               img = _loadImage(self, "IconsResized/icon_image_viewer" .. 
skinSuffix),
+               img = _loadImage(self, "Icons/image_viewer_loading.png"),
        })
 
        s.icon_software_update = _uses(_icon, {

Added: 
7.5/trunk/squeezeplay/src/squeezeplay/share/applets/WQVGAsmallSkin/images/Icons/image_viewer_loading.png
URL: 
http://svn.slimdevices.com/jive/7.5/trunk/squeezeplay/src/squeezeplay/share/applets/WQVGAsmallSkin/images/Icons/image_viewer_loading.png?rev=8485&view=auto
==============================================================================
Binary file - no diff available.

Propchange: 
7.5/trunk/squeezeplay/src/squeezeplay/share/applets/WQVGAsmallSkin/images/Icons/image_viewer_loading.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

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

Reply via email to