On Monday 24 June 2002 10:37 am, Lars Gullik Bjønnes wrote: > Angus Leeming <[EMAIL PROTECTED]> writes: > | I thought I'd try and move the minibuffer behind the frontends firewall > | and so had a look at which functions are used by the "general public". It > | transpires that only addSet and getString are used. > | > | I propose, therefore, getting rid entirely of LyXView::getMiniBuffer() > | and replacing it with two boost::functions. The minibuffer can then > | disappear from view. > | > | Any objections? Reasons please... > > I am not sure how this will look.
lyxview().minibufferAddSet(...); or isn't this what you mean? > | * This command is used to append the command shortcut to the displayed > | lyxfunc. Might a better name be "void appendShortCut(string const & sc)"? > > Isn't it also used internally in the minibuffer? For telling then end > of history is reached etc. ? No. Maybe it was once, but no more: aleem@pneumon:src-> grep -n addSet minibuffer.* minibuffer.C:355:void MiniBuffer::addSet(string const & s1, string const & s2) minibuffer.h:42: void addSet(string const &, > > | /** Makes the minibuffer wait for a string to be inserted. > | Waits for a string to be inserted into the minibuffer, when > | the string has been inserted the signal stringReady is > | emitted. > | */ > | void MiniBuffer::getString(State spaces, > | vector<string> const & completion, > | vector<string> & history) > | * Again, I think that this name is confusing. Why not prepareBuffer(...)? > | or some such? > > If you read the comment the same of the funciton is perfectly sane.. > IMHO. > We use it to get a string (and it is delivered through a signal.) Well you might call it sane. I'm not going to call it insane, just clumsy. foo::callingFunc() { minibuffer.getString(); } foo::receivingFunc is connected to minibuffer::signalReady. To my eyes, this code suggests that I now have a string to manipulate, whereas actually I have nothing until another foo function is called when the signal is emitted. So, why not reflect this reality in the names: void minibuffer::prepareForInput(...); boost::signal1<void, string const &> minibuffer::inputString; Incidentally, I for one would be happier if the excesssive name calling that's been creeping into this list recently were to creep out again. No, this isn't directed at Lars; I think he's had to bear the brunt of the abuse recently. To my eyes "STFU" helps no-one. Angus