On Thursday 07 December 2000 10:34, Jean-Marc Lasgouttes wrote:
> >>>>> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes:
>
> Angus> Well, we can at least activate the Ok button. I don't use
> Angus> pybliographer and will find it hard to test this. However, if
> Angus> you compiled 1.1.6pre2 yourself, then perhaps you'll do the
> Angus> testing for me.
>
> Angus> This is a general call, I guess. Anybody out there using
> Angus> pybliographer in a position to test this patch?
>
> Angus> I'll think about the "old way". Angus
>
> Why does your patch still opens the popup when the citation has been
> provided? This should not happen, since there is nothing to edit.
>
> JMarc

My patch doesn't address this issue. It addresses the more general issue of 

If I launch a popup to create a new inset AND pass sufficient info to do so, 
then the Ok,Apply buutons should be activated.

To address your issue would required the following change to lyxfunc.C. (I 
think: note that I am unable to test this because I don't have 
pybibliographic.) Anyway, something like:

In LyXFunc::Dispatch():

        case LFUN_CITATION_CREATE:
        {
                // Should do this "at source"
                InsetCommandParams p( "cite" );
                
                if (contains(argument, "|")) {
                        p.setContents( token(argument, '|', 0) );
                        p.setOptions(  token(argument, '|', 1) );
                } else {
                        p.setContents( argument );
                }

                owner->getDialogs()->createCitation( p.getAsString() );
        }
        break;
                    
        case LFUN_CITATION_INSERT:
        {
+               if (!argument.empty()) {
+                       Dispatch(LFUN_CITATION_CREATE, argument);
+                       break;
+               }
+               
                InsetCommandParams p;
                p.setFromString( argument );

                InsetCitation * inset = new InsetCitation( p );
                if (!owner->view()->insertInset(inset))
                        delete inset;
                else
                        owner->view()->updateInset( inset, true );
        }
        break;

However, I don't know what pybibliographic passes as "argument", so don't 
know if/what manipulation this string needs. Can you help here?

Angus

                    





Reply via email to