On Fri, 11 Feb 2005, Cas Cremers wrote:

> 
> I'm running the current version of ion3 from svn, and I cannot get the
> min_tabs.lua script to work. I've put it in my ~/.ion3 directory, and
> added 'dopath("min_tabs")' to cfg_ion.lua.

> It doesn't generate any errors, but it doesn't seem to work either.
> Does anybody else have it working on a current version of ion3, and if
> so, are there any special fixes necessary?

I'm the one originally responsible for that piece of dubious hacking :-)

I've had it working for all the Ion3 versions of used (my current latest
is 20050102 snapshot) and as far as I can see I'm not doing anything other
than what I put in my instructions. (The only thing is I put the script
directly in the main configuration directory /usr/local/etc/ion3/ : can
anyone confirm that putting things in ~/.ion3 will give the same result?)

Otherwise, without any error messages it's
difficult to see what could be going wrong.
If it's not a path issue, could you try adding following print statements 
and letting me know what output, if any, is generated.

<<<<<<<<<<<<<<<<<<<<<<<<<<
if _LOADED["minimalTabs"] then return end


function show_only_necessary_tabs_in_frame(f)
        local fp=f.frame
        io.stderr:write("in base call\n")
        if obj_typename(fp)=="WFrame" then
            io.stderr:write("decided is frame\n")
            local t_hid=fp:is_tabbar_hidden()
            local gteq_two=fp:lcount(1)>=2
            --unfortunately we don't have an primitive xor in lua
            if (t_hid and gteq_two) or (not(t_hid or gteq_two)) then
                io.stderr:write("calling toggle_tabbar\n")
                fp:toggle_tabbar()
            end
        end
end


function dst_setup_hook()
    local hk=ioncore.get_hook("frame_managed_changed_hook")
    hk:add(show_only_necessary_tabs_in_frame)
    io.stderr:write("finished hook setup\n")
end

dst_setup_hook()
<<<<<<<<<<<<<<<<<<<<<

-- 
__cheers, dave____________________________________________
homepages.inf.ed.ac.uk/dtweed/       tel: +44 131 651 3447
JCMB, Kings Buildings, Edinburgh     fax: +44 131 651 3435
X wrote a book about this, which Y was carrying around for
a long time with little discernible effect -- John Baez

Reply via email to