Author: bklaas
Date: Mon Feb 25 07:55:41 2008
New Revision: 2021
URL: http://svn.slimdevices.com?rev=2021&root=Jive&view=rev
Log:
Bug: 6942
Description: remove getCurrentIndex menu method from Menu.lua and replace with
more appropriate getItems, which returns the menu list
SlimBrowser now queries getItems to inspect for currentIndex
Modified:
trunk/jive/src/pkg/jive/share/applets/SlimBrowser/SlimBrowserApplet.lua
trunk/jive/src/pkg/jive/share/jive/ui/Menu.lua
Modified:
trunk/jive/src/pkg/jive/share/applets/SlimBrowser/SlimBrowserApplet.lua
URL:
http://svn.slimdevices.com/trunk/jive/src/pkg/jive/share/applets/SlimBrowser/SlimBrowserApplet.lua?rev=2021&root=Jive&r1=2020&r2=2021&view=diff
==============================================================================
--- trunk/jive/src/pkg/jive/share/applets/SlimBrowser/SlimBrowserApplet.lua
(original)
+++ trunk/jive/src/pkg/jive/share/applets/SlimBrowser/SlimBrowserApplet.lua Mon
Feb 25 07:55:41 2008
@@ -1601,7 +1601,6 @@
initialText = '0'
end
local timeFormat = _getTimeFormat()
- log:warn('DATETIME FORMAT RETURNED AS ', timeFormat)
local _v = DateTime:timeFromSFM(v, timeFormat)
v = Textinput.timeValue(_v, timeFormat)
end
@@ -1917,8 +1916,9 @@
if playlistSize == nil or (playlistSize and playlistSize <= 1)
then
_statusStep.menu:setSelectedIndex(1)
- elseif _statusStep.menu:getCurrentIndex() then
-
_statusStep.menu:setSelectedIndex(_statusStep.menu:getCurrentIndex())
+ -- where we are in the playlist is stored in the item list as
currentIndex
+ elseif _statusStep.menu:getItems() and
_statusStep.menu:getItems().currentIndex then
+
_statusStep.menu:setSelectedIndex(_statusStep.menu:getItems().currentIndex)
end
_statusStep.window:addListener(EVENT_KEY_PRESS,
Modified: trunk/jive/src/pkg/jive/share/jive/ui/Menu.lua
URL:
http://svn.slimdevices.com/trunk/jive/src/pkg/jive/share/jive/ui/Menu.lua?rev=2021&root=Jive&r1=2020&r2=2021&view=diff
==============================================================================
--- trunk/jive/src/pkg/jive/share/jive/ui/Menu.lua (original)
+++ trunk/jive/src/pkg/jive/share/jive/ui/Menu.lua Mon Feb 25 07:55:41 2008
@@ -384,21 +384,15 @@
--[[
-=head2 jive.ui.Menu:getCurrentIndex()
-
-Returns the index of the item that is marked as the currentIndex
-Used primarily in the current playlist
-
-=cut
---]]
-function getCurrentIndex(self)
- if self.list and self.list.currentIndex then
- return self.list.currentIndex
- else
- return false
- end
-end
-
+=head2 jive.ui.Menu:getItems()
+
+Returns the list items from a menu
+
+=cut
+--]]
+function getItems(self)
+ return self.list
+end
--[[
_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/cgi-bin/mailman/listinfo/jive-checkins