[tekui-devel] tekui: Drawable, Window: windows now remember their previous size

Timm S. Mueller tmueller at neoscientists.org
Thu May 15 00:08:22 CEST 2008


details:   http://hg.teklib.org/tekui/rev/4fbafce031d6
changeset: 484:4fbafce031d6
user:      Timm S. Mueller <tmueller at neoscientists.org>
date:      Sun May 11 09:29:59 2008 +0200
description:
Drawable, Window: windows now remember their previous size

diffs (56 lines):

diff -r f4c05efc2af1 -r 4fbafce031d6 tek/class/ui/drawable.lua
--- a/tek/class/ui/drawable.lua	Sun May 11 09:06:41 2008 +0200
+++ b/tek/class/ui/drawable.lua	Sun May 11 09:29:59 2008 +0200
@@ -19,7 +19,7 @@ local HUGE = ui.HUGE
 local HUGE = ui.HUGE
 
 module("tek.class.ui.drawable", tek.class.ui.object)
-_VERSION = "Drawable 3.7"
+_VERSION = "Drawable 3.8"
 
 -------------------------------------------------------------------------------
 -- Class implementation:
@@ -78,7 +78,8 @@ function Drawable:open(title, w, h, minw
 		end
 
 		self.Visual:setinput("close", "keydown", "keyup", "newsize",
-			"mousebutton", "refresh", "mousemove", "mouseover", "interval", "focus")
+			"mousebutton", "refresh", "mousemove", "mouseover", "interval",
+			"focus")
 
 		local penalloc = { }
 		for i, v in ipairs(self.Display.Theme.RGBTab) do
@@ -96,6 +97,7 @@ end
 
 function Drawable:close()
 	if self.Visual then
+		self:getAttrs()
 		self.Visual:close()
 		self.Visual = false
 		return true
diff -r f4c05efc2af1 -r 4fbafce031d6 tek/class/ui/window.lua
--- a/tek/class/ui/window.lua	Sun May 11 09:06:41 2008 +0200
+++ b/tek/class/ui/window.lua	Sun May 11 09:29:59 2008 +0200
@@ -26,7 +26,7 @@ local unpack = unpack
 local unpack = unpack
 
 module("tek.class.ui.window", tek.class.ui.group)
-_VERSION = "Window 2.3"
+_VERSION = "Window 2.4"
 
 -------------------------------------------------------------------------------
 --	Constants & Class data:
@@ -230,9 +230,11 @@ end
 -------------------------------------------------------------------------------
 
 function Window:closeWindow()
-	assert(self.Drawable)
+	local d = self.Drawable
+	assert(d)
 	if self.Status ~= "hide" then
-		if self.Drawable:close() then
+		if d:close() then
+			self.Width, self.Height = d.Width, d.Height
 			self:setValue("Status", "hide")
 		end
 	end


More information about the tekui-devel mailing list