Bug 6224 - Wallpaper current setting not shown, error dump when entering wallpaper applet
: Wallpaper current setting not shown, error dump when entering wallpaper applet
Status: RESOLVED FIXED
Product: SB Controller
Classification: Unclassified
Component: Settings
: unspecified
: Macintosh Other
: P2 normal (vote)
: ---
Assigned To: Richard Titmuss
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-11-25 00:15 UTC by KDF
Modified: 2007-12-06 16:09 UTC (History)
1 user (show)

See Also:
Category: ---


Attachments
fix (875 bytes, patch)
2007-11-25 00:17 UTC, KDF
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description KDF 2007-11-25 00:15:51 UTC
The current setting is not shown when entering wallpaper applet.  There is also an error dump:

error in network pump:
        ...jive/applets/SetupWallpaper/SetupWallpaperApplet.lua:196: bad argument #1 to 'pairs' (table expected, got nil)
stack traceback:
        [C 0x36138]: in function 'pairs'
        ...jive/applets/SetupWallpaper/SetupWallpaperApplet.lua:196: in function '_serverSink'
        ...jive/applets/SetupWallpaper/SetupWallpaperApplet.lua:143: in function 'func'


This appears to be due to a lack of server-side wallpaper, but we should skip the function call if there is no artwork on the server.

patch coming.
Comment 1 KDF 2007-11-25 00:17:04 UTC
Created attachment 2445 [details]
fix

grab the proper setting so that we show the current one.

also, make sure chunk also has chunk.data.item_loop before we call the _serverSink to add server wallpaper items.
Comment 2 Adrian Smith 2007-11-25 14:18:10 UTC
covered by checkin 1002.

Richard - 1002 needs merging to 7.0
Comment 3 KDF 2007-11-25 15:46:29 UTC
it's seem my little additional in the patch really only grabs the server wide setting.  Even after selecting a player specific wallpaper, I cannot go back into the wallpaper applet and get a selected radio button.  My fix obviously got around that by using the global pref, so it's not a full solution.  I'll update and try to test again with 1002.
Comment 4 KDF 2007-11-25 16:08:35 UTC
ok, 1002 is still not showing the current setting. here are the contents of the settings.lua in that applet:

settings = {};
settings["wallpaper"] = "sunrise.png";
settings["00:04:20:10:02:5b"] = "sunrise.png";
Comment 5 KDF 2007-11-25 16:25:27 UTC
ok, it seems this is what is required post 1002
Index: jive/share/applets/SetupWallpaper/SetupWallpaperApplet.lua
===================================================================
--- jive/share/applets/SetupWallpaper/SetupWallpaperApplet.lua  (revision 1002)
+++ jive/share/applets/SetupWallpaper/SetupWallpaperApplet.lua  (working copy)
@@ -97,7 +97,7 @@
 
        self.currentPlayer = _getCurrentPlayer()
 
-       local wallpaper = self:getSettings()[currentPlayer]
+       local wallpaper = self:getSettings()[self.currentPlayer]
 
        self.server = self:_getCurrentServer()
        self.group  = RadioGroup()


I've added this at r1003 but it should probably also go into 7.0
Comment 6 Adrian Smith 2007-11-26 11:16:14 UTC
right both 1002 and 1003 should go in 7.0 - leaving merge to Richard..
Comment 7 Richard Titmuss 2007-12-06 16:09:13 UTC
This is not needed in the 7.0 branch (which will soon be renamed). Marking as fixed.