Author: titmuss
Date: Sat Jan 19 14:53:00 2008
New Revision: 1515
URL: http://svn.slimdevices.com?rev=1515&root=Jive&view=rev
Log:
Bug: N/A
Description:
Fix rendering popups when window transitions are happening underneath.
Add a HomeMenu:hideToHome() as a shortcut to get back to the home menu.
Modified:
trunk/jive/src/pkg/jive/share/jive/JiveMain.lua
trunk/jive/src/pkg/jive/share/jive/ui/HomeMenu.lua
trunk/jive/src/pkg/jive/src/ui/jive_window.c
Modified: trunk/jive/src/pkg/jive/share/jive/JiveMain.lua
URL:
http://svn.slimdevices.com/trunk/jive/src/pkg/jive/share/jive/JiveMain.lua?rev=1515&root=Jive&r1=1514&r2=1515&view=diff
==============================================================================
--- trunk/jive/src/pkg/jive/share/jive/JiveMain.lua (original)
+++ trunk/jive/src/pkg/jive/share/jive/JiveMain.lua Sat Jan 19 14:53:00 2008
@@ -103,9 +103,7 @@
if #windowStack > 1 then
Framework:playSound("JUMP")
- while #windowStack > 1 do
- windowStack[#windowStack - 1]:hide(nil, "JUMP")
- end
+ jiveMain:closeToHome(true)
else
Framework:playSound("BUMP")
windowStack[1]:bumpLeft()
Modified: trunk/jive/src/pkg/jive/share/jive/ui/HomeMenu.lua
URL:
http://svn.slimdevices.com/trunk/jive/src/pkg/jive/share/jive/ui/HomeMenu.lua?rev=1515&root=Jive&r1=1514&r2=1515&view=diff
==============================================================================
--- trunk/jive/src/pkg/jive/share/jive/ui/HomeMenu.lua (original)
+++ trunk/jive/src/pkg/jive/share/jive/ui/HomeMenu.lua Sat Jan 19 14:53:00 2008
@@ -4,6 +4,7 @@
local oo = require("loop.base")
local table = require("jive.utils.table")
+local Framework = require("jive.ui.Framework")
local SimpleMenu = require("jive.ui.SimpleMenu")
local Window = require("jive.ui.Window")
@@ -45,6 +46,30 @@
self.window:setTitle(title)
else
self.window:setTitle(self.windowTitle)
+ end
+end
+
+
+--[[
+
+Close all windows to expose the home menu. By default alwaysOnTop windows
+are not hidden.
+
+--]]
+function closeToHome(self, hideAlwaysOnTop)
+ local stack = Framework.windowStack
+
+ local k = 1
+ for i = 1, #stack do
+ if stack[i].alwaysOnTop and ~hideAlwaysOnTop then
+ k = i + 1
+ end
+
+ if stack[i] == self.window then
+ for j = i - 1, k, -1 do
+ stack[j]:hide()
+ end
+ end
end
end
Modified: trunk/jive/src/pkg/jive/src/ui/jive_window.c
URL:
http://svn.slimdevices.com/trunk/jive/src/pkg/jive/src/ui/jive_window.c?rev=1515&root=Jive&r1=1514&r2=1515&view=diff
==============================================================================
--- trunk/jive/src/pkg/jive/src/ui/jive_window.c (original)
+++ trunk/jive/src/pkg/jive/src/ui/jive_window.c Sat Jan 19 14:53:00 2008
@@ -204,13 +204,13 @@
Uint32 layer = luaL_optinteger(L, 3, JIVE_LAYER_ALL);
lua_getfield(L, 1, "transparent");
- if (lua_toboolean(L, -1) && (layer & JIVE_LAYER_FRAME)) {
+ if (lua_toboolean(L, -1)) {
/* draw underneath a popup */
if (jive_getmethod(L, 1, "getLowerWindow")) {
lua_pushvalue(L, 1);
lua_call(L, 1, 1);
- if (jive_getmethod(L, -1, "draw")) {
+ if ((layer & JIVE_LAYER_FRAME) && jive_getmethod(L, -1,
"draw")) {
lua_pushvalue(L, -2);
lua_pushvalue(L, 2);
lua_pushinteger(L, JIVE_LAYER_ALL);
@@ -218,7 +218,7 @@
lua_call(L, 3, 0);
}
- if (!lua_isnil(L, -1) && peer->mask_tile) {
+ if ((layer & peer->w.layer) && !lua_isnil(L, -1) &&
peer->mask_tile) {
JiveWidget *peer2;
lua_getfield(L, -1, "peer");
_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/cgi-bin/mailman/listinfo/jive-checkins