Author: adrian
Date: Mon May 24 13:54:03 2010
New Revision: 8808

URL: http://svn.slimdevices.com/jive?rev=8808&view=rev
Log:
Bug: N/A
Description: add update all option to applet installer

Modified:
    
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/SetupAppletInstaller/SetupAppletInstallerApplet.lua
    
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/SetupAppletInstaller/strings.txt

Modified: 
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/SetupAppletInstaller/SetupAppletInstallerApplet.lua
URL: 
http://svn.slimdevices.com/jive/7.6/trunk/squeezeplay/src/squeezeplay/share/applets/SetupAppletInstaller/SetupAppletInstallerApplet.lua?rev=8808&r1=8807&r2=8808&view=diff
==============================================================================
--- 
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/SetupAppletInstaller/SetupAppletInstallerApplet.lua
 (original)
+++ 
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/SetupAppletInstaller/SetupAppletInstallerApplet.lua
 Mon May 24 13:54:03 2010
@@ -202,6 +202,10 @@
                                        status = "REINSTALL"
                                else
                                        status = entry.version == 
installed[entry.name] and "INSTALLED" or "UPDATES"
+                                       if status == "UPDATES" then
+                                               self.updateall = self.updateall 
or {}
+                                               self.updateall[entry.name] = { 
url = entry.url, ver = entry.version, sha = entry.sha }
+                                       end
                                end
                        end
 
@@ -238,6 +242,21 @@
                        callback = function(event, menuItem)
                                self.toremove = self.reinstall 
                                self.todownload = self.reinstall
+                               self:action()
+                       end,
+                       weight = 1
+               })
+       end
+
+       if self.updateall then
+               local count = 0
+               for _, _ in pairs(self.updateall) do count = count + 1 end
+               self.menu:addItem({
+                       text = tostring(self:string("UPDATE_ALL")) .. " (" .. 
count .. ")",
+                       sound = "WINDOWSHOW",
+                       callback = function(event, menuItem)
+                               self.toremove = self.updateall 
+                               self.todownload = self.updateall
                                self:action()
                        end,
                        weight = 1

Modified: 
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/SetupAppletInstaller/strings.txt
URL: 
http://svn.slimdevices.com/jive/7.6/trunk/squeezeplay/src/squeezeplay/share/applets/SetupAppletInstaller/strings.txt?rev=8808&r1=8807&r2=8808&view=diff
==============================================================================
--- 
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/SetupAppletInstaller/strings.txt
 (original)
+++ 
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/SetupAppletInstaller/strings.txt
 Mon May 24 13:54:03 2010
@@ -193,6 +193,9 @@
        RU      Переустановить все
        SV      Installera om alla
 
+UPDATE_ALL
+       EN      Update All
+
 APPLET_WARN
        CS      Aplety třetích stran nejsou podporovány a měly by být 
instalovány na vlastní riziko. Před instalací se ujistěte se, že 
důvěřujete autorovi apletu.
        DA      Underprogrammer fra tredjepart understøttes ikke, og 
installationen sker på eget ansvar. Du skal sikre dig at du kan stole på 
udgiveren, inden du installerer underprogrammet.

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

Reply via email to