Author: titmuss
Date: Fri Apr 25 04:49:44 2008
New Revision: 2357

URL: http://svn.slimdevices.com?rev=2357&root=Jive&view=rev
Log:
 [EMAIL PROTECTED] (orig r2349):  awy | 2008-04-24 17:28:48 +0100
 Linux x86_64; this disables MMX by default in Makefile.linux
 [EMAIL PROTECTED] (orig r2355):  titmuss | 2008-04-25 12:47:07 +0100
  [EMAIL PROTECTED] (orig r2350):  bklaas | 2008-04-24 18:39:02 +0100
  Bug: 6461, 7734
  Description: always update text of nodes so lang changes are reflected 
immediately
  [EMAIL PROTECTED] (orig r2351):  bklaas | 2008-04-25 02:23:41 +0100
  Bug: 6461
  Description: set window title as well as menu item
  [EMAIL PROTECTED] (orig r2352):  titmuss | 2008-04-25 11:21:47 +0100
  Bug: N/A
  Description:
  Make textarea have a zero width,height when the content is nil.
  
  
  [EMAIL PROTECTED] (orig r2353):  titmuss | 2008-04-25 12:41:33 +0100
  Bug: N/A
  Description:
  Allow Controller firmware upgrades to be optional or forced.
  
  
  [EMAIL PROTECTED] (orig r2354):  titmuss | 2008-04-25 12:45:15 +0100
  Bug: N/A
  Description:
  Turn off logging for 7.0.1 release.
  
  
 
 [EMAIL PROTECTED] (orig r2356):  titmuss | 2008-04-25 12:47:43 +0100
 Bug: N/A
 Description:
 Enabled logging for beta builds.
 
 

Modified:
    7.2/trunk/   (props changed)
    7.2/trunk/squeezeplay/src/Makefile.linux
    7.2/trunk/squeezeplay/src/luaexpat-1.0.2/config
    7.2/trunk/squeezeplay/src/luaexpat-1.0.2/config_include.linux
    7.2/trunk/squeezeplay/src/squeezeplay/share/jive/ui/HomeMenu.lua
    7.2/trunk/squeezeplay/src/squeezeplay/share/jive/utils/locale.lua
    7.2/trunk/squeezeplay/src/squeezeplay/src/ui/jive_textarea.c
    
7.2/trunk/squeezeplay/src/squeezeplay_jive/share/applets/SetupFirmwareUpgrade/SetupFirmwareUpgradeApplet.lua
    
7.2/trunk/squeezeplay/src/squeezeplay_jive/share/applets/SetupFirmwareUpgrade/SetupFirmwareUpgradeMeta.lua
    
7.2/trunk/squeezeplay/src/squeezeplay_jive/share/applets/SetupFirmwareUpgrade/strings.txt

Propchange: 7.2/trunk/
------------------------------------------------------------------------------
--- svk:merge (original)
+++ svk:merge Fri Apr 25 04:49:44 2008
@@ -1,5 +1,5 @@
-bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.0/trunk:2318
-bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.1/trunk:2345
+bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.0/trunk:2354
+bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.1/trunk:2356
 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.2/trunk/squeezeplay/src/Makefile.linux
URL: 
http://svn.slimdevices.com/7.2/trunk/squeezeplay/src/Makefile.linux?rev=2357&root=Jive&r1=2356&r2=2357&view=diff
==============================================================================
--- 7.2/trunk/squeezeplay/src/Makefile.linux (original)
+++ 7.2/trunk/squeezeplay/src/Makefile.linux Fri Apr 25 04:49:44 2008
@@ -23,6 +23,7 @@
 export SDL_CONFIG = ${BUILD_TOP}/bin/sdl-config
 
 ENABLE_PROFILING=--enable-profiling --disable-shared
+USE_MMX=--disable-mmx
 
 
 #
@@ -70,7 +71,7 @@
 
 # sdl_gfx
 SDL_gfx-2.0.15/Makefile:
-       cd SDL_gfx-2.0.15; ./configure ${ENABLE_PROFILING} --prefix=${PREFIX}
+       cd SDL_gfx-2.0.15; ./configure ${ENABLE_PROFILING} ${USE_MMX} 
--prefix=${PREFIX}
 
 sdl-gfx: SDL_gfx-2.0.15/Makefile
        cd SDL_gfx-2.0.15; make && make install

Modified: 7.2/trunk/squeezeplay/src/luaexpat-1.0.2/config
URL: 
http://svn.slimdevices.com/7.2/trunk/squeezeplay/src/luaexpat-1.0.2/config?rev=2357&root=Jive&r1=2356&r2=2357&view=diff
==============================================================================
--- 7.2/trunk/squeezeplay/src/luaexpat-1.0.2/config (original)
+++ 7.2/trunk/squeezeplay/src/luaexpat-1.0.2/config Fri Apr 25 04:49:44 2008
@@ -20,5 +20,5 @@
         -Wshadow \
         -Wwrite-strings
 
-CFLAGS := $(CWARNS) -ansi -O2 -I$(LUA_INC) -I$(EXPAT_INC)
+CFLAGS := $(CWARNS) -ansi -O2 -I$(LUA_INC) -I$(EXPAT_INC) $(PLATFORM_CFLAGS)
 CC ?= gcc

Modified: 7.2/trunk/squeezeplay/src/luaexpat-1.0.2/config_include.linux
URL: 
http://svn.slimdevices.com/7.2/trunk/squeezeplay/src/luaexpat-1.0.2/config_include.linux?rev=2357&root=Jive&r1=2356&r2=2357&view=diff
==============================================================================
--- 7.2/trunk/squeezeplay/src/luaexpat-1.0.2/config_include.linux (original)
+++ 7.2/trunk/squeezeplay/src/luaexpat-1.0.2/config_include.linux Fri Apr 25 
04:49:44 2008
@@ -1,4 +1,5 @@
 # OS dependent
 LIB_OPTION= -shared -fPIC -L${PREFIX}/lib
+PLATFORM_CFLAGS = -fPIC
 # Expat includes directory
 EXPAT_INC= ${PREFIX}/include

Modified: 7.2/trunk/squeezeplay/src/squeezeplay/share/jive/ui/HomeMenu.lua
URL: 
http://svn.slimdevices.com/7.2/trunk/squeezeplay/src/squeezeplay/share/jive/ui/HomeMenu.lua?rev=2357&root=Jive&r1=2356&r2=2357&view=diff
==============================================================================
--- 7.2/trunk/squeezeplay/src/squeezeplay/share/jive/ui/HomeMenu.lua (original)
+++ 7.2/trunk/squeezeplay/src/squeezeplay/share/jive/ui/HomeMenu.lua Fri Apr 25 
04:49:44 2008
@@ -100,10 +100,11 @@
 
        -- remove node from previous node (if changed)
        if self.menuTable[item.id] then
+               self.menuTable[item.id].text = item.text
                local newNode    = item.node
                local prevNode   = self.menuTable[item.id].node
                if newNode != prevNode then
-                       _changeNode(item.id, newNode)
+                       _changeNode(self, item.id, newNode)
                end
 
                return
@@ -133,7 +134,8 @@
 
        if not item.callback then
                item.callback = function () 
-                                window:show()
+                       window:setTitle(item.text)
+                       window:show()
                end
        end
 
@@ -152,14 +154,8 @@
                item.weight = 100
        end
 
-       if not self.menuTable[item.id] then
-               log:debug("JiveMain.addItem: Adding ", item.text, " to ", 
item.node)
-               self.menuTable[item.id] = item
-
-       else
-               log:debug("THIS ID ALREADY EXISTS, removing existing item")
-               self.menuTable[item.id] = item
-       end
+       -- add or update the item from the menuTable
+       self.menuTable[item.id] = item
 
        if self.nodeTable[item.node] then
                self.nodeTable[item.node].items[item.id] = item

Modified: 7.2/trunk/squeezeplay/src/squeezeplay/share/jive/utils/locale.lua
URL: 
http://svn.slimdevices.com/7.2/trunk/squeezeplay/src/squeezeplay/share/jive/utils/locale.lua?rev=2357&root=Jive&r1=2356&r2=2357&view=diff
==============================================================================
--- 7.2/trunk/squeezeplay/src/squeezeplay/share/jive/utils/locale.lua (original)
+++ 7.2/trunk/squeezeplay/src/squeezeplay/share/jive/utils/locale.lua Fri Apr 
25 04:49:44 2008
@@ -249,7 +249,11 @@
        if select('#', ...) == 0 then
                return self[token] or token
        else
-               return string.format(self[token].str or token, ...)
+               if self[token] then
+                       return string.format(self[token].str or token, ...)
+               else
+                       return string.format(token, ...)
+               end
        end
 end
 

Modified: 7.2/trunk/squeezeplay/src/squeezeplay/src/ui/jive_textarea.c
URL: 
http://svn.slimdevices.com/7.2/trunk/squeezeplay/src/squeezeplay/src/ui/jive_textarea.c?rev=2357&root=Jive&r1=2356&r2=2357&view=diff
==============================================================================
--- 7.2/trunk/squeezeplay/src/squeezeplay/src/ui/jive_textarea.c (original)
+++ 7.2/trunk/squeezeplay/src/squeezeplay/src/ui/jive_textarea.c Fri Apr 25 
04:49:44 2008
@@ -93,6 +93,15 @@
        }
 
        peer = jive_getpeer(L, 1, &textareaPeerMeta);
+
+       if (peer->num_lines == 0) {
+               /* empty textarea */
+               lua_pushnil(L);
+               lua_pushnil(L);
+               lua_pushinteger(L, 0);
+               lua_pushinteger(L, 0);
+               return 4;
+       }
 
        w = peer->w.bounds.w + peer->w.padding.left + peer->w.padding.right;
        h = (peer->num_lines * peer->line_height) + peer->w.padding.top + 
peer->w.padding.bottom;
@@ -184,8 +193,18 @@
        /* word wrap text */
        lua_getglobal(L, "tostring");
        lua_getfield(L, 1, "text");
+       if (lua_isnil(L, -1)) {
+               /* nil is empty textarea */
+               lua_pop(L, 2);
+
+               peer->num_lines = 0;
+               lua_pushinteger(L, peer->num_lines);
+               lua_setfield(L, 1, "numLines");
+
+               return 0;
+       }
+
        lua_call(L, 1, 1);
-
        text = lua_tostring(L, -1);
 
        visible_lines = peer->w.bounds.h / peer->line_height;
@@ -254,7 +273,7 @@
        JiveSurface *srf = tolua_tousertype(L, 2, 0);
        bool drawLayer = luaL_optinteger(L, 3, JIVE_LAYER_ALL) & peer->w.layer;
 
-       if (!drawLayer) {
+       if (!drawLayer || peer->num_lines == 0) {
                return 0;
        }
 

Modified: 
7.2/trunk/squeezeplay/src/squeezeplay_jive/share/applets/SetupFirmwareUpgrade/SetupFirmwareUpgradeApplet.lua
URL: 
http://svn.slimdevices.com/7.2/trunk/squeezeplay/src/squeezeplay_jive/share/applets/SetupFirmwareUpgrade/SetupFirmwareUpgradeApplet.lua?rev=2357&root=Jive&r1=2356&r2=2357&view=diff
==============================================================================
--- 
7.2/trunk/squeezeplay/src/squeezeplay_jive/share/applets/SetupFirmwareUpgrade/SetupFirmwareUpgradeApplet.lua
 (original)
+++ 
7.2/trunk/squeezeplay/src/squeezeplay_jive/share/applets/SetupFirmwareUpgrade/SetupFirmwareUpgradeApplet.lua
 Fri Apr 25 04:49:44 2008
@@ -63,9 +63,6 @@
 
 
 function _firmwareVersion(self, url)
-
-       log:warn("url=", url)
-
        local major, minor = string.match(url, "jive_([^_]+)_([^_]+)\.bin")
 
        if not major then
@@ -76,7 +73,7 @@
 end
 
 
-function _makeUpgradeItems(self, window, menu, url)
+function _makeUpgradeItems(self, window, menu, optional, url, urlHelp)
        local help = Textarea("help", "")
 
        local version = self:_firmwareVersion(url)
@@ -89,9 +86,9 @@
                end,
                focusGained = function()
                        if version == JIVE_VERSION then
-                               
help:setValue(self:string("UPDATE_BEGIN_REINSTALL", version or "?"))
+                               help:setValue(self:string(urlHelp or 
"UPDATE_BEGIN_REINSTALL", version or "?"))
                        else
-                               
help:setValue(self:string("UPDATE_BEGIN_UPGRADE", version or "?"))
+                               help:setValue(self:string(urlHelp or 
"UPDATE_BEGIN_UPGRADE", version or "?"))
                        end
                end
        })
@@ -115,17 +112,26 @@
                end
        end
 
+       if optional then
+               -- offered upgrade
+               menu:addItem({
+                       text = self:string("UPDATE_CANCEL"),
+                       sound = "WINDOWHIDE",
+                       callback = function()
+                               window:hide()
+                       end,
+                       focusGained = function()
+                               help:setValue(nil)
+                       end
+               })
+       end
+
        window:addWidget(help)
        window:addWidget(menu)
 end
 
 
-function forceUpgrade(self, upgUrl)
-       local window = Window("window", self:string("UPDATE"), 
firmwareupgradeTitleStyle)
-
-       local menu = SimpleMenu("menu")
-       menu:setCloseable(false)
-
+function forceUpgrade(self, optional, upgUrl, urlHelp)
        local url = upgUrl
        if not upgUrl then
                url = upgradeUrl[1]
@@ -134,17 +140,25 @@
                url = DEFAULT_FIRMWARE_URL
        end
 
-       window:addListener(EVENT_KEY_PRESS,
-                          function(event)
-                                  local keycode = event:getKeycode()
-                                  if keycode == KEY_HOME then
-                                          return EVENT_CONSUME
-                                  end
-
-                                  return EVENT_UNUSED
-                          end)
-
-       self:_makeUpgradeItems(window, menu, url)
+       local window = Window("window", self:string("UPDATE"), 
firmwareupgradeTitleStyle)
+       local menu = SimpleMenu("menu")
+
+       if not optional then
+               -- forced upgrade, don't allow the user to break out
+               menu:setCloseable(false)
+
+               window:addListener(EVENT_KEY_PRESS,
+                       function(event)
+                               local keycode = event:getKeycode()
+                               if keycode == KEY_HOME then
+                                       return EVENT_CONSUME
+                               end
+
+                               return EVENT_UNUSED
+                       end)
+       end
+
+       self:_makeUpgradeItems(window, menu, optional, url, urlHelp)
 
        self:tieAndShowWindow(window)
        return window
@@ -161,7 +175,7 @@
                url = DEFAULT_FIRMWARE_URL
        end
 
-       self:_makeUpgradeItems(window, menu, url)
+       self:_makeUpgradeItems(window, menu, true, url)
 
        self:tieAndShowWindow(window)
        return window

Modified: 
7.2/trunk/squeezeplay/src/squeezeplay_jive/share/applets/SetupFirmwareUpgrade/SetupFirmwareUpgradeMeta.lua
URL: 
http://svn.slimdevices.com/7.2/trunk/squeezeplay/src/squeezeplay_jive/share/applets/SetupFirmwareUpgrade/SetupFirmwareUpgradeMeta.lua?rev=2357&root=Jive&r1=2356&r2=2357&view=diff
==============================================================================
--- 
7.2/trunk/squeezeplay/src/squeezeplay_jive/share/applets/SetupFirmwareUpgrade/SetupFirmwareUpgradeMeta.lua
 (original)
+++ 
7.2/trunk/squeezeplay/src/squeezeplay_jive/share/applets/SetupFirmwareUpgrade/SetupFirmwareUpgradeMeta.lua
 Fri Apr 25 04:49:44 2008
@@ -56,11 +56,11 @@
                                log:info("Firmware URL=", upgradeUrl[1])
                        end
 
-                       -- are we forcing an upgrade
+                       -- are we offering or forcing an upgrade
                        if tonumber(chunk.data.firmwareUpgrade) == 1 then
-                               log:info("Force firmware upgrade")
+                               log:info("Firmware upgrade")
                                local applet = 
appletManager:loadApplet("SetupFirmwareUpgrade")
-                               applet:forceUpgrade(upgradeUrl[1])
+                               
applet:forceUpgrade(tonumber(chunk.data.firmwareOptional) == 1, upgradeUrl[1], 
chunk.data.firmwareHelp)
 
                                meta.player:unsubscribe('/slim/firmwarestatus/' 
.. meta.player.id)
                        end

Modified: 
7.2/trunk/squeezeplay/src/squeezeplay_jive/share/applets/SetupFirmwareUpgrade/strings.txt
URL: 
http://svn.slimdevices.com/7.2/trunk/squeezeplay/src/squeezeplay_jive/share/applets/SetupFirmwareUpgrade/strings.txt?rev=2357&root=Jive&r1=2356&r2=2357&view=diff
==============================================================================
--- 
7.2/trunk/squeezeplay/src/squeezeplay_jive/share/applets/SetupFirmwareUpgrade/strings.txt
 (original)
+++ 
7.2/trunk/squeezeplay/src/squeezeplay_jive/share/applets/SetupFirmwareUpgrade/strings.txt
 Fri Apr 25 04:49:44 2008
@@ -128,3 +128,12 @@
        IT      Collocare il telecomando nella base di ricarica per continuare 
l'aggiornamento del software.
        NL      Zet deze afstandsbediening in de oplader om de software-upgrade 
voort te zetten.
 
+UPDATE_CANCEL
+       DA      Afbryd
+       DE      Abbrechen
+       EN      Cancel
+       ES      Cancelar
+       FR      Annuler
+       IT      Annulla
+       NL      Annuleren
+

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

Reply via email to