From 2e050cdc70f256dedf8980a9d78ae9cdad572ac6 Mon Sep 17 00:00:00 2001
From: "p.kosyh"
Date: Tue, 6 Oct 2009 18:22:52 +0000
Subject: [PATCH] Unneeded code? Need to test...
---
Rules.make.standalone | 4 ++--
stead/gui.lua | 19 +++++++------------
2 files changed, 9 insertions(+), 14 deletions(-)
diff --git a/Rules.make.standalone b/Rules.make.standalone
index f80a615..2b2c298 100644
--- a/Rules.make.standalone
+++ b/Rules.make.standalone
@@ -16,8 +16,8 @@ LUA_LFLAGS=$(shell pkg-config --libs lua5.1)
# for arch linux, fedora (may be others) use this
#
-# LUA_CFLAGS=$(shell pkg-config --cflags lua)
-# LUA_LFLAGS=$(shell pkg-config --libs lua)
+LUA_CFLAGS=$(shell pkg-config --cflags lua)
+LUA_LFLAGS=$(shell pkg-config --libs lua)
#
SDL_CFLAGS=$(shell sdl-config --cflags)
diff --git a/stead/gui.lua b/stead/gui.lua
index 302c6ea..39ed2ae 100644
--- a/stead/gui.lua
+++ b/stead/gui.lua
@@ -6,26 +6,21 @@ iface.img = function(self, str)
end;
iface.xref = function(self, str, obj)
- local o = ref(here():srch(obj));
+ local o = ref(obj);
local cmd=''
- if not o then
- o = ref(ways():srch(obj));
- if o then
- cmd = 'go ';
- end
- end
- if not o then
- o = ref(me():srch(obj));
- if o ~= nil then
- cmd = 'use ';
- end
+
+ if ref(ways():srch(obj)) then
+ cmd = 'go ';
end
+
if not isObject(o) or isStatus(o) or not o.id then
return str;
end
+
if isMenu(o) then
cmd = 'act ';
end
+
return cat('',str,'');
end;