Index: share/applets/SelectPlayer/SelectPlayerApplet.lua =================================================================== --- share/applets/SelectPlayer/SelectPlayerApplet.lua (revision 7110) +++ share/applets/SelectPlayer/SelectPlayerApplet.lua (working copy) @@ -423,15 +423,6 @@ function selectPlayer(self, player) - -- if connecting to SqueezeNetwork, first check we are linked - if player:getPin() then - -- as we are not linked this is a dummy player, after we need linked we - -- need to return to the choose player screen - appletManager:callService("enterPin", nil, player) - - return false - end - -- set the current player self.selectedPlayer = player appletManager:callService("setCurrentPlayer", player) Index: share/applets/SqueezeNetworkPIN/strings.txt =================================================================== --- share/applets/SqueezeNetworkPIN/strings.txt (revision 7106) +++ share/applets/SqueezeNetworkPIN/strings.txt (working copy) @@ -1,75 +0,0 @@ -SQUEEZENETWORK_PIN_TITLE - CS Aktivovat účet - DA Aktiver konto - DE Konto aktivieren - EN Activate Account - ES Activar cuenta - FI Aktivoi tili - FR Activer le compte - IT Attiva account - NL Account activeren - NO Aktiver konto - PL Uaktywnij konto - RU Активировать учетную запись - SV Aktivera konto - -SQUEEZENETWORK_PIN - CS PIN přehrávače: %s - DA Afspillerens pinkode: %s - DE Player-PIN: %s - EN Player PIN: %s - ES PIN de reproductor: %s - FI Soittimen PIN: %s - FR PIN de la platine: %s - IT PIN lettore: %s - NL Muzieksysteem-PIN: %s - NO Pin-kode for spiller: %s - PL Kod PIN odtwarzacza: %s - RU PIN-код плеера: %s - SV PIN-kod för spelare: %s - -SQUEEZENETWORK_PIN_HELP - CS Navštivte\n%s\na zadejte svůj PIN pro připojení k vašemu účtu. Po zadání PIN kódu stiskněte prostřední tlačítko. - DA Gå til\n%s\nog indtast pinkoden, så oprettes der forbindelse til din konto. Tryk på midterknappen når du har indtastet pinkoden. - DE Gehen Sie zu\n%s\nund geben Sie Ihre PIN ein, um eine Verbindung zum Konto herzustellen. Drücken Sie anschließend die mittlere Taste. - EN Visit\n%s\nand enter your PIN to connect to your account. Press the center button after you have entered your PIN. - ES Visite\n%s\ne introduzca el PIN para conectarse a su cuenta. Cuando haya introducido el PIN, pulse el botón central. - FI Muodosta yhteys tiliin käymällä osoitteessa\n%s\nja antamalla PIN-koodi. Paina keskipainiketta, kun olet antanut PIN-koodin. - FR Rendez-vous sur\n%s\net spécifiez votre code PIN pour accéder à votre compte. Appuyez sur le bouton central une fois que vous avez spécifié le code PIN. - IT Visitare il sito Web\n%s\ne inserire il PIN per accedere all'account. Premere il pulsante centrale dopo avere inserito il PIN. - NL Ga naar\n%s\nen voer je pincode in om naar je account te gaan. Druk op de middelste knop nadat je je pincode hebt ingevoerd. - NO Gå til\n%s\n og skriv inn pin-koden for å kople til kontoen din. Trykk på midtknappen etter at du har oppgitt pin-koden. - PL Odwiedź\n%s\ni wprowadź kod PIN, aby połączyć się z kontem. Naciśnij środkowy przycisk po wprowadzeniu kodu PIN. - RU Посетите\n%s\nи введите PIN-код, чтобы подключиться к своей учетной записи. После ввода PIN-кода нажмите центральную кнопку. - SV Gå till\n%s\noch ange din PIN-kod för att ansluta till kontot. Tryck på mittenknappen när du har angett PIN-koden. - -SQUEEZENETWORK_NOT_LINKED - CS Nemohu ověřit váš PIN. Zadali jste jej na webu? - DA Pinkoden kunne ikke verificeres. Har du angivet den på websiden? - DE Ihre PIN konnte nicht bestätigt werden. Haben Sie sie auf der Website eingegeben? - EN Could not verify your PIN. Have you entered it on the website? - ES No se ha podido verificar el PIN. ¿Lo ha introducido en el sitio Web? - FI PIN-koodia ei voi vahvistaa. Annoitko sen WWW-sivustolla? - FR Impossible de vérifier le code PIN. Spécifiez le code sur le site Web. - IT Impossibile verificare il PIN. È stato inserito nel sito Web? - NL Pincode kan niet worden geverifieerd. Heb je deze op de website ingevoerd? - NO Pin-koden ble ikke godkjent. Har du tastet den inn på nettsiden? - PL Nie można zweryfikować kodu PIN. Czy został on wprowadzony w witrynie internetowej? - RU Не удалось проверить PIN-код. Вы ввели его на веб-сайте? - SV Det gick inte att verifiera PIN-koden. Har du angett koden på webbplatsen? - -SQUEEZENETWORK_GO_BACK - CS Jít zpět - DA Gå tilbage - DE Zurück - EN Go back - ES Regresar - FI Takaisin - FR Retour - IT Indietro - NL Terug - NO Gå tilbake - PL Wstecz - RU Назад - SV Tillbaka - Index: share/applets/SqueezeNetworkPIN/SqueezeNetworkPINApplet.lua =================================================================== --- share/applets/SqueezeNetworkPIN/SqueezeNetworkPINApplet.lua (revision 7106) +++ share/applets/SqueezeNetworkPIN/SqueezeNetworkPINApplet.lua (working copy) @@ -1,169 +0,0 @@ - --- stuff we use -local tostring = tostring -local oo = require("loop.simple") - -local string = require("string") -local table = require("jive.utils.table") - -local Applet = require("jive.Applet") -local System = require("jive.System") -local Framework = require("jive.ui.Framework") -local Icon = require("jive.ui.Icon") -local Label = require("jive.ui.Label") -local Tile = require("jive.ui.Tile") -local SimpleMenu = require("jive.ui.SimpleMenu") -local Surface = require("jive.ui.Surface") -local Textarea = require("jive.ui.Textarea") -local Window = require("jive.ui.Window") -local Popup = require("jive.ui.Popup") - -local debug = require("jive.utils.debug") - -local jnt = jnt - -module(..., Framework.constants) -oo.class(_M, Applet) - - -function enterPin(self, server, player, next) - self:_enterPin(false, server, player, next) -end - - -function forcePin(self, player) - self:_enterPin(false, player:getSlimServer(), player) -end - - -function _enterPin(self, force, server, player, next) - local window = Window("help_list", self:string("SQUEEZENETWORK_PIN_TITLE"), "settingstitle") - window:setAllowScreensaver(false) - - local menu = SimpleMenu("menu") - if force then - menu:setCloseable(false) - end - - self.pin = player and player:getPin() or server:getPin() - - if not server then - server = player:getSlimServer() - end - - local nextfunc = function() - -- Always close the pin entry window - window:hide() - if next then - next() - end - end - - menu:addItem( { - text = self:string( "SQUEEZENETWORK_PIN", self.pin ), - sound = "WINDOWSHOW", - callback = function() - self:_checkLinked(server, - nextfunc, - function() - self:displayNotLinked() - end) - end - } ) - - -- automatically check if we are linked every 5 seconds - -- XXX check this is ok with Andy and Dean... - menu:addTimer(5000, - function() - self:_checkLinked(server, - nextfunc, - nil) - end) - - menu:setHeaderWidget(Textarea("help_text", self:string("SQUEEZENETWORK_PIN_HELP", jnt:getSNHostname()))) - window:addWidget(menu) - - self:tieAndShowWindow(window) - return window -end - - -function _checkLinked(self, server, next, fail) - -- When the user clicks the button, ask SN if we're registered - local uuid = System:getUUID() - local cmd = { 'islinked', uuid } - - local checkLinkedSink = function(chunk, err) - if err then - log:warn(err) - return - end - - if chunk.data.islinked and chunk.data.islinked == 1 then - - -- Jive is linked! - log:debug("checkLinkedSink: Jive is linked") - - -- The pin will be cleared on the next serverstatus, - -- but this is not instant, so clear the pin now - server:linked(self.pin) - - -- Reconnect to SN, refreshes the list of players - server:reconnect() - - if next then - next() - end - else - log:debug("checkLinkedSink: Jive is not linked yet") - - if fail then - fail() - end - end - end - - -- make sure the server is connected - server:connect() - - server:userRequest( checkLinkedSink, nil, cmd ) -end - - -function displayNotLinked(self) - local window = Window("text_list", self:string("SQUEEZENETWORK_PIN_TITLE"), "settingstitle") - window:setAllowScreensaver(false) - - local textarea = Textarea("text", self:string("SQUEEZENETWORK_NOT_LINKED")) - - local menu = SimpleMenu("menu", - { - { - text = self:string("SQUEEZENETWORK_GO_BACK"), - sound = "WINDOWHIDE", - callback = function() - window:hide() - end - }, - }) - - - window:addWidget(textarea) - window:addWidget(menu) - - window:hideOnAllButtonInput() - - self:tieAndShowWindow(window) - return window -end - ---[[ - -=head1 LICENSE - -Copyright 2007 Logitech. All Rights Reserved. - -This file is subject to the Logitech Public Source License Version 1.0. Please see the LICENCE file for details. - -=cut ---]] Index: share/applets/SqueezeNetworkPIN/SqueezeNetworkPINMeta.lua =================================================================== --- share/applets/SqueezeNetworkPIN/SqueezeNetworkPINMeta.lua (revision 7106) +++ share/applets/SqueezeNetworkPIN/SqueezeNetworkPINMeta.lua (working copy) @@ -1,47 +0,0 @@ -local oo = require("loop.simple") - -local AppletMeta = require("jive.AppletMeta") -local debug = require("jive.utils.debug") - -local appletManager = appletManager -local jiveMain = jiveMain -local jnt = jnt - -module(...) -oo.class(_M, AppletMeta) - -function jiveVersion(meta) - return 1, 1 -end - -function registerApplet(meta) - - meta:registerService("enterPin") - meta:registerService("forcePin") - - -- check for SN PIN when we connect to a new player - -- this is needed after upgrading from the MP firmware if - -- SqueezeNetwork was selected during Ray setup - jnt:subscribe(meta) -end - - -function notify_playerCurrent(self, player) - if player and player:getPin() then - log:debug("SqueezeNetworkPIN: player has a PIN") - appletManager:callService("forcePin", player) - end -end - - ---[[ - -=head1 LICENSE - -Copyright 2007 Logitech. All Rights Reserved. - -This file is subject to the Logitech Public Source License Version 1.0. Please see the LICENCE file for details. - -=cut ---]] - Index: share/applets/SetupSqueezebox/SetupSqueezeboxApplet.lua =================================================================== --- share/applets/SetupSqueezebox/SetupSqueezeboxApplet.lua (revision 7110) +++ share/applets/SetupSqueezebox/SetupSqueezeboxApplet.lua (working copy) @@ -1269,17 +1269,7 @@ -- if connecting to SqueezeNetwork, first check jive is linked if slimserver:isSqueezeNetwork() then - if slimserver:getPin() then - appletManager:callService("enterPin", slimserver, nil, - function() - self:_registerPlayer(slimserver) - end) - return - else - self:_registerPlayer(slimserver) - end - - return + return self:_registerPlayer(slimserver) end -- we are not SqueezeNetwork, so continue Index: share/applets/SlimDiscovery/SlimDiscoveryMeta.lua =================================================================== --- share/applets/SlimDiscovery/SlimDiscoveryMeta.lua (revision 7106) +++ share/applets/SlimDiscovery/SlimDiscoveryMeta.lua (working copy) @@ -140,8 +140,9 @@ appletManager:callService("setupShowSelectPlayer", function() end) - appletManager:callService("forcePin", player) - + -- FIXME we used to call force pin here, we probably need to return + -- into the setup flow somehow? this case should be moved into the + -- SetupWelcome applet for Jive? end Index: share/applets/ChooseMusicSource/ChooseMusicSourceApplet.lua =================================================================== --- share/applets/ChooseMusicSource/ChooseMusicSourceApplet.lua (revision 7106) +++ share/applets/ChooseMusicSource/ChooseMusicSourceApplet.lua (working copy) @@ -563,16 +563,7 @@ -- connect player to server function connectPlayerToServer(self, player, server) log:info('connectPlayerToServer() ', player, " ", server) - -- if connecting to SqueezeNetwork, first check jive is linked - if server:getPin() then - appletManager:callService("enterPin", server, nil, - function() - self:connectPlayerToServer(player, server) - end) - return - end - self:_showConnectToServer(player, server) -- we are now ready to connect to SqueezeCenter