I've tracked down the reason why I can't use:
        string const arg = lcolor.getLyXName(lc) + string(" black");
        LyXFunC::Dispatch(LFUN_SET_COLOR, arg);

when I'm editing the colors in FormPreferences and LyX has no document open.

About line 488 of Dispatch, there is the code:
        // We cannot use this function here
        if (getStatus(ac) & Disabled)
                goto exit_with_message;

The action is disabled without a buffer and no progress can, therefore be 
made.

I have used a work around in FormPreferences: 
        if buffer exists
                use Dispatch, 
        else
                use setColor direct.

Clearly, it would be better to allow the colors to be editted without a 
buffer present.

Anyway, I think I have cleaned up the bugs in the colors tab. Will submit 
once cvs is working again. Currently it's seems to be taking an age to do 
very little.

Angus

        

Reply via email to